CN105208100A - Interface data processing method - Google Patents

Interface data processing method Download PDF

Info

Publication number
CN105208100A
CN105208100A CN201510525227.2A CN201510525227A CN105208100A CN 105208100 A CN105208100 A CN 105208100A CN 201510525227 A CN201510525227 A CN 201510525227A CN 105208100 A CN105208100 A CN 105208100A
Authority
CN
China
Prior art keywords
data
interface
response data
forwarding
retransmitting paramater
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510525227.2A
Other languages
Chinese (zh)
Other versions
CN105208100B (en
Inventor
吴锁明
罗义斌
孙力斌
祝云开
赵立阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Lianchuang Smart City Technology Co ltd
Original Assignee
China Automobile Alliance Motor Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Automobile Alliance Motor Service Co Ltd filed Critical China Automobile Alliance Motor Service Co Ltd
Priority to CN201510525227.2A priority Critical patent/CN105208100B/en
Publication of CN105208100A publication Critical patent/CN105208100A/en
Application granted granted Critical
Publication of CN105208100B publication Critical patent/CN105208100B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The embodiment of the invention discloses an interface data processing method, relates to the technical field of electronic information, and can reduce the number of times of access to a data interface. Interface data reassembling is also adopted at a rear end so that the number of times of access to the business data interface is reduced and response speed of a front end is enhanced; besides, network consumption of the front end is reduced by data reassembling of the rear end. The method comprises the steps that forwarding parameters are parsed and an original interface is scheduled; response data are assembled according to the forwarding parameters, and the forwarding parameters are set in a reverse proxy server; and the response data are returned to the foreground, and validity of the front-end data is set according to a http cache protocol. The interface data processing method is suitable for dynamic assembling of the HTTP interface data.

Description

A kind of processing method of interface data
Technical field
The present invention relates to electronic information technical field, particularly relate to a kind of processing method of interface data.
Background technology
Current electric terminal is on the market of a great variety, such as the most frequently used Pad, smart mobile phone, notebook computer etc.But different types of terminal exists difference on communication modes, also different transfer of data or data processing method can be adopted, such as Android, IOS because system is different with regard to of a sort terminal at last.
The responding ability of traditional browser end can not meet the communicating requirement of different terminals, therefore needs developer to develop customization different editions data transmission interface.In order to promote development efficiency, usually front and back end can be separated, wherein, services/data interface is responsible in rear end, and front end is responsible for representing/interaction logic, the multiple version of same part data-interface customized development, thus meets the communicating requirement of each terminal.
But, owing to needing the communication request processing magnanimity, the data-interface of rear end needs a large amount of access of process, very large load can be caused to rear end, final access result is made to be difficult to feed back to front end rapidly, this reduces the response speed of front end, and due to access times more, also can cause the problem that the network consumption of front end is higher.
Summary of the invention
Embodiments of the invention provide a kind of processing method of interface data, can reduce the access times to data-interface; Also achieve and adopt interface data restructuring in rear end, reduce the access times to business datum interface, improve the response speed of front end; And by re-assemblying the network consumption reducing front end in the data of rear end.
For achieving the above object, embodiments of the invention adopt following technical scheme:
Embodiments of the invention provide a kind of processing method of interface data, comprising:
Resolve retransmitting paramater and call clean interface;
According to described retransmitting paramater assembling response data, described retransmitting paramater is arranged in Reverse Proxy;
Described response data is returned to foreground, and the front end data term of validity is set according to http caching protocol.
The processing method of the interface data that the embodiment of the present invention provides, arranges retransmitting paramater by Reverse Proxy, and by request forward in forwarding service; Forwarding server is resolved retransmitting paramater and is called clean interface, then re-assemblies data according to retransmitting paramater; Meanwhile, according to cashing indication, buffer memory is carried out to the above-mentioned clean interface return data called, facilitate call next time and take; Afterwards foreground is returned to the data re-assemblied, and the front end data term of validity is set according to http caching protocol.Thus achieve at calling interface use employing buffer memory, reduce the access times to data-interface; Also achieve and adopt interface data restructuring in rear end, reduce the access times to business datum interface, improve the response speed of front end; And by re-assemblying the network consumption reducing front end in the data of rear end.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The roughly flow chart of the processing method of the interface data that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of data twist process example that Fig. 2 provides for the embodiment of the present invention;
The schematic flow sheet of a kind of data assembling process instance that Fig. 3 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of processing method of interface data, as shown in Figure 1, comprising:
101, resolve retransmitting paramater and call clean interface.
Wherein, the retransmitting paramater described in the present embodiment mainly comprises: method represents the interface requests mode of forwarding, and default value is GET.ShortUrl represents the interface relative address of forwarding.RequestParam represents the interface requests parameter of forwarding.RetKey represents the key assignments that the interface data after process is deposited, and default value represents retKey.SplitPath represents the PATH path of the data needing the node intercepted in returned packet.CacheTime represents that cache-time controls mark.Re-assembly in the process of data for processing forward mark according to forwarding mark, the node path of the data arranged in splitPath, node path grammer is with reference to el expression formula.
102, according to described retransmitting paramater assembling response data, described retransmitting paramater is arranged in Reverse Proxy.
103, described response data is returned to foreground, and the front end data term of validity is set according to http caching protocol.
In the present embodiment, can data required for the PATH path extraction of JSON, re-assembly data, to facilitate the data of front-end control interface to export, can browser rs cache be used simultaneously, reduce the scheme of back end interface pressure.Can service data cache module and data assembling module on the equipment of operation the present embodiment method flow.Wherein, described data cache module, for buffer memory clean interface data and rent converting interface data message; Described data assembling module, for re-assemblying interface data according to parameter.
In the present embodiment, also comprise before calling clean interface at parsing retransmitting paramater:
Add Host parameter at request header, and arrange the website HOST needing agency, the setting of described Host parameter is for avoiding the mistake of the check request source initiation of described clean interface.
Add proxy_host parameter at described request head, and arrange the HOST after needing the website of agency to forward, the setting of described proxy_host parameter is used for when calling described clean interface, assembles the domain of described clean interface URL.
Add forward_tag parameter at described request head, whether the setting of described forward_tag parameter is used for differentiation and forwards, and wherein, is set to true and then resolves package interface data, be set to false then transparent data interface.
In the present embodiment, the data that returned to described foreground by described clean interface of buffer memory.
Wherein, forwarding server local cache adopts LRU to delete data farthest of last access time.Network cache servers is for storing all data returned to described foreground by described clean interface.Such as: forwarding server local cache adopts LRU to eliminate data farthest of last access time, does not exist, asks network cache servers.Network cache servers stores all data cached, periodic cleaning inactive or lost efficacy data cached.In the present embodiment, data cached use priority is browser rs cache > server local cache > file server buffer memory > request clean interface.
Wherein, foreground is returned to the data re-assemblied, and according to the specific implementation means that http caching protocol arranges the front end data term of validity can be: according to the time of the set of time buffer memory of cacheTime optimum configurations, http protocol is set in head response simultaneously.
Concrete, the present embodiment comprises data twist process as shown in Figure 2, wherein at least comprises:
When receiving HTTP request, and detect and exist when forwarding mark and cashing indication, detect the described forwarding server response data whether described in local cache, cashing indication is corresponding, if exist, forward end returns the response data of described forwarding server buffer memory.If do not exist, detect described network cache servers and whether store response data corresponding to described cashing indication.
If described network cache servers stores response data corresponding to described cashing indication, then forward end returns the response data that described network cache servers stores.If described network cache servers does not store response data corresponding to described cashing indication, then transparent data interface.
Concrete, the present embodiment comprises data assembling process as shown in Figure 3, described according to described retransmitting paramater assembling response data, comprising:
Detect whether buffer memory and need the response data of assembling, then extract described clean interface according to described retransmitting paramater if not, and ask described clean interface.
Detect and whether there is described cashing indication, if exist, buffer memory, via the data of described clean interface, if do not exist, detects and whether there is data cutout mark, if there is data cutout mark, assemble response data.
The processing method of the interface data that the embodiment of the present invention provides, arranges retransmitting paramater by Reverse Proxy, and by request forward in forwarding service; Forwarding server is resolved retransmitting paramater and is called clean interface, then re-assemblies data according to retransmitting paramater; Meanwhile, according to cashing indication, buffer memory is carried out to the above-mentioned clean interface return data called, facilitate call next time and take; Afterwards foreground is returned to the data re-assemblied, and the front end data term of validity is set according to http caching protocol.Thus achieve at calling interface use employing buffer memory, reduce the access times to data-interface; Also achieve and adopt interface data restructuring in rear end, reduce the access times to business datum interface, improve the response speed of front end; And by re-assemblying the network consumption reducing front end in the data of rear end.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for apparatus embodiments, because it is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (RandomAccessMemory, RAM) etc.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (6)

1. a processing method for interface data, is characterized in that, comprising:
Resolve retransmitting paramater and call clean interface;
According to described retransmitting paramater assembling response data, described retransmitting paramater is arranged in Reverse Proxy;
Described response data is returned to foreground, and the front end data term of validity is set according to http caching protocol.
2. method according to claim 1, is characterized in that, described retransmitting paramater comprises: method represents the interface requests mode of forwarding, and default value is GET; ShortUrl represents the interface relative address of forwarding; RequestParam represents the interface requests parameter of forwarding; RetKey represents the key assignments that the interface data after process is deposited, and default value represents retKey; SplitPath represents the PATH path of the data needing the node intercepted in returned packet; CacheTime represents that cache-time controls mark.
3. method according to claim 1, is characterized in that, also to comprise before calling clean interface at parsing retransmitting paramater:
Add Host parameter at request header, and arrange the website HOST needing agency, the setting of described Host parameter is for avoiding the mistake of the check request source initiation of described clean interface;
Add proxy_host parameter at described request head, and arrange the HOST after needing the website of agency to forward, the setting of described proxy_host parameter is used for when calling described clean interface, assembles the domain of described clean interface URL;
Add forward_tag parameter at described request head, whether the setting of described forward_tag parameter is used for differentiation and forwards, and wherein, is set to true and then resolves package interface data, be set to false then transparent data interface.
4. method according to claim 1, is characterized in that, also comprises:
The data that buffer memory is returned to described foreground by described clean interface;
Wherein, forwarding server local cache adopts LRU to delete data farthest of last access time; Network cache servers is for storing all data returned to described foreground by described clean interface.
5. method according to claim 4, is characterized in that, also comprises:
When receiving HTTP request, and detect and exist when forwarding mark and cashing indication, detect the described forwarding server response data whether described in local cache, cashing indication is corresponding, if exist, forward end returns the response data of described forwarding server buffer memory; If do not exist, detect described network cache servers and whether store response data corresponding to described cashing indication;
If described network cache servers stores response data corresponding to described cashing indication, then forward end returns the response data that described network cache servers stores; If described network cache servers does not store response data corresponding to described cashing indication, then transparent data interface.
6., according to the method in claim 1-5 described in any one, it is characterized in that, described according to described retransmitting paramater assembling response data, comprising:
Detect whether buffer memory and need the response data of assembling, then extract described clean interface according to described retransmitting paramater if not, and ask described clean interface;
Detect and whether there is described cashing indication, if exist, buffer memory, via the data of described clean interface, if do not exist, detects and whether there is data cutout mark, if there is data cutout mark, assemble response data.
CN201510525227.2A 2015-08-25 2015-08-25 A kind of processing method of interface data Active CN105208100B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510525227.2A CN105208100B (en) 2015-08-25 2015-08-25 A kind of processing method of interface data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510525227.2A CN105208100B (en) 2015-08-25 2015-08-25 A kind of processing method of interface data

Publications (2)

Publication Number Publication Date
CN105208100A true CN105208100A (en) 2015-12-30
CN105208100B CN105208100B (en) 2018-11-06

Family

ID=54955524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510525227.2A Active CN105208100B (en) 2015-08-25 2015-08-25 A kind of processing method of interface data

Country Status (1)

Country Link
CN (1) CN105208100B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105681892A (en) * 2016-02-19 2016-06-15 网宿科技股份有限公司 Differential data transmission method, device and system
CN108650213A (en) * 2018-03-15 2018-10-12 北京雷石天地电子技术有限公司 A kind of service providing method and device
CN110868452A (en) * 2019-10-23 2020-03-06 中国建设银行股份有限公司 Data transmission method and system
CN111124555A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Method and device for calling big data interface, computer equipment and storage medium
CN113973135A (en) * 2021-10-19 2022-01-25 北京沃东天骏信息技术有限公司 Data caching processing method and device, caching grid platform and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040044768A1 (en) * 2002-03-09 2004-03-04 International Business Machines Corporation Reverse proxy mediator for servers
CN101753606A (en) * 2008-12-03 2010-06-23 北京天融信科技有限公司 Method for realizing WEB reverse proxy
CN101840537A (en) * 2010-03-29 2010-09-22 苏州同程旅游网络科技有限公司 Travel agency comprehensive business management system
CN101997854A (en) * 2009-08-31 2011-03-30 阿里巴巴集团控股有限公司 Processing system and method for providing data service
CN103139252A (en) * 2011-11-30 2013-06-05 北京网康科技有限公司 Achieving method of network proxy cache acceleration and device thereof
CN104539724A (en) * 2015-01-14 2015-04-22 浪潮(北京)电子信息产业有限公司 Information processing method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040044768A1 (en) * 2002-03-09 2004-03-04 International Business Machines Corporation Reverse proxy mediator for servers
CN101753606A (en) * 2008-12-03 2010-06-23 北京天融信科技有限公司 Method for realizing WEB reverse proxy
CN101997854A (en) * 2009-08-31 2011-03-30 阿里巴巴集团控股有限公司 Processing system and method for providing data service
CN101840537A (en) * 2010-03-29 2010-09-22 苏州同程旅游网络科技有限公司 Travel agency comprehensive business management system
CN103139252A (en) * 2011-11-30 2013-06-05 北京网康科技有限公司 Achieving method of network proxy cache acceleration and device thereof
CN104539724A (en) * 2015-01-14 2015-04-22 浪潮(北京)电子信息产业有限公司 Information processing method and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105681892A (en) * 2016-02-19 2016-06-15 网宿科技股份有限公司 Differential data transmission method, device and system
CN105681892B (en) * 2016-02-19 2019-03-15 网宿科技股份有限公司 The method, apparatus and system of differential data transmission
CN108650213A (en) * 2018-03-15 2018-10-12 北京雷石天地电子技术有限公司 A kind of service providing method and device
CN110868452A (en) * 2019-10-23 2020-03-06 中国建设银行股份有限公司 Data transmission method and system
CN110868452B (en) * 2019-10-23 2021-12-07 中国建设银行股份有限公司 Data transmission method and system
CN111124555A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Method and device for calling big data interface, computer equipment and storage medium
CN113973135A (en) * 2021-10-19 2022-01-25 北京沃东天骏信息技术有限公司 Data caching processing method and device, caching grid platform and storage medium

Also Published As

Publication number Publication date
CN105208100B (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN105208100A (en) Interface data processing method
CN102651861B (en) Download method for mobile terminal, mobile terminal and proxy download server
US9424363B2 (en) Dynamic tag management for optimizing content delivery
CN101741986B (en) Page cache method for mobile communication equipment terminal
CN102143243B (en) Dynamic routing processing method and dynamic routing processing device and home gateway thereof
CN104980289B (en) Information push method, device and system
CN104468363B (en) Page reorientation method, routing device, terminal device and system
CN102790776A (en) Heartbeat connection normalizing processing method, terminal, server and communication system
CN108804514A (en) A kind of webpage loading method, server and webpage loading system
CN111064804B (en) Network access method and device
CN103475682A (en) File transfer method and file transfer equipment
CN103209214A (en) Not only structured query language (NoSQL)-based method for realizing message-oriented middleware
CN111193783B (en) Service access processing method and device
CN108737343B (en) Method and device for realizing secure access to network
CN103533080A (en) Dispatching method and device for LVS (Linux virtual server)
CN104270362A (en) Request handling method and device
CN107197000B (en) Static and dynamic hybrid caching method, device and system
CN104079598A (en) Method and device for realizing collaborative browsing of webpages
CN106412296A (en) Terminal device control method and apparatus
CN104615597A (en) Method, device and system for clearing cache file in browser
CN103326889B (en) Communicate between a kind of new and old edition compatible method and device
CN104702709A (en) Method and device for marking terminal type, and method and device for identifying terminal type
CN106126663A (en) page aggregation method and device
CN113132273B (en) Data forwarding method and device
US11804986B2 (en) Method for the remote management of a device connected to a residential gateway

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 210036 Drum Tower International Software and Service Outsourcing Industrial Park, 18 Jihui Road, Drum Tower District, Nanjing, Jiangsu Province

Applicant after: LIAN wisdom Driving Technology Co.,Ltd.

Address before: 210036 LIAN science and technology building, 18 Hui Ji Road, Gulou District, Nanjing, Jiangsu

Applicant before: CHINA AUTOMOBILE ALLIANCE MOTOR SERVICE Co.,Ltd.

Address after: 210036 Drum Tower International Software and Service Outsourcing Industrial Park, 18 Jihui Road, Drum Tower District, Nanjing, Jiangsu Province

Applicant after: Automobile services Co.,Ltd. of Linkage

Address before: 210036 Drum Tower International Software and Service Outsourcing Industrial Park, 18 Jihui Road, Drum Tower District, Nanjing, Jiangsu Province

Applicant before: LIAN wisdom Driving Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230324

Address after: No. 801-806, Floor 8, Building 4, No. 168, Software Avenue, Yuhuatai District, Nanjing, Jiangsu Province, 210012

Patentee after: Nanjing Lianchuang Smart City Technology Co.,Ltd.

Address before: 210036 Drum Tower International Software and Service Outsourcing Industrial Park, 18 Jihui Road, Drum Tower District, Nanjing, Jiangsu Province

Patentee before: Automobile services Co.,Ltd. of Linkage

TR01 Transfer of patent right