CN102480504B - Method and system for accessing enumerated data - Google Patents

Method and system for accessing enumerated data Download PDF

Info

Publication number
CN102480504B
CN102480504B CN201010565732.7A CN201010565732A CN102480504B CN 102480504 B CN102480504 B CN 102480504B CN 201010565732 A CN201010565732 A CN 201010565732A CN 102480504 B CN102480504 B CN 102480504B
Authority
CN
China
Prior art keywords
data
enumerate
request
enumerating
release parameter
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.)
Active
Application number
CN201010565732.7A
Other languages
Chinese (zh)
Other versions
CN102480504A (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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201010565732.7A priority Critical patent/CN102480504B/en
Publication of CN102480504A publication Critical patent/CN102480504A/en
Application granted granted Critical
Publication of CN102480504B publication Critical patent/CN102480504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method and system for accessing enumerated data. The method for accessing the enumerated data comprises the following steps: obtaining an enumerated data access request of a user, wherein the enumerated data access request is contained in a user page access request as an independent request and comprises the version parameter of the enumerated data; when the enumerated data in a client side cache is within a period of validity, judging whether the version parameter of the enumerated data contained in the enumerated data access request is consistent with the version parameter of the enumerated data in the client side cache; and if so, loading the enumerated data in the client side cache to an access page corresponding to the page access request. According to the method and the system, an independent enumerated data request response is cached into a client side by a client side request mechanism, and the enumerated data locally cached is directly used when the page is requested again or other pages comprising the enumerated data are requested so as to save the computing resource of a service side and the transmission bandwidth of the network and shorten page loading time.

Description

A kind of access method and system enumerating data
Technical field
The present invention relates to Computer Applied Technology field, particularly relate to a kind of access method and the system of enumerating data.
Background technology
Enumerating data is that web page shows the data acquisition system needing in interface or computing to use in client, and the set of these data is relatively stablized, infrequently changed, the set of such as Chinese city.Enumerate data usually to exist with the form of drop down list control in web page.
In prior art, when the browser of client sends page request to server, enumerating data if related in the page, normally directly obtaining enumerated value from enumerating data source, and directly will enumerate data and cover in the page.
But, for data volume larger enumerate data, such as city gather, may have thousands of, the access mode of prior art, have access at every turn and comprise this when enumerating the page of data, all inquire about from enumerating data source, and cover in the page of use by enumerating data, obviously can take the transmission bandwidth of a large amount of computational resource of service end and network, the load time of the page also can be longer simultaneously.
Summary of the invention
In view of this, the invention provides a kind of access method and the system of enumerating data, bring with the access method solving prior art, take the transmission bandwidth of a large amount of computational resource of service end and network, and the problem that the load time of the page is long, technical scheme is as follows:
Enumerate an access method for data, comprising:
Obtain user enumerate data access request, described in enumerate data access request as independently request be included in the accessing page request of user, and described in enumerate in data access request the Release parameter comprising and enumerate data;
When in client-cache enumerate data before the deadline time, enumerate described in judgement comprise in data access request enumerate data Release parameter, with the Release parameter enumerating data in client-cache with whether consistent;
When described enumerate comprise in data access request enumerate data Release parameter, time consistent with the Release parameter enumerating data in client-cache, enumerate data by described client-cache, be loaded in the accession page corresponding to described accessing page request.
Preferably, in said method, also comprise:
When described enumerate comprise in data access request enumerate data Release parameter, time inconsistent with the Release parameter enumerating data in client-cache, described data access request of enumerating is redirected to and enumerates data source;
The enumerating in the accession page that data are loaded into corresponding to described accessing page request of data source is enumerated by described.
Preferably, in said method, also comprise:
According to described enumerate data source enumerate data Release parameter, what upgrade described client-cache enumerates data Release parameter.
Preferably, in said method, describedly will to enumerate in accession page that data are loaded into corresponding to described accessing page request, be specially:
By described data of enumerating according to initialize data encapsulation technology, after being packaged into array, described array is loaded in the accession page corresponding to described accessing page request.
Enumerate an access system for data, comprising:
Acquisition request unit, enumerates data access request for what obtain user, described in enumerate data access request and be included in the accessing page request of user as independently request, and described in enumerate in data access request the Release parameter comprising and enumerate data;
Judging unit, for when in client-cache enumerate data before the deadline time, enumerate described in judgement comprise in data access request enumerate data Release parameter, with the Release parameter enumerating data in client-cache with whether consistent;
Data import unit, for when described in enumerate comprise in data access request enumerate data Release parameter, time consistent with the Release parameter enumerating data in client-cache, enumerate data by described client-cache, be loaded in the accession page corresponding to described accessing page request.
Preferably, in said system, also comprise:
Be redirected unit, for when described in enumerate comprise in data access request enumerate data Release parameter, time inconsistent with the Release parameter enumerating data in client-cache, described data access request of enumerating is redirected to and enumerates data source;
Data reloading unit, for enumerating the enumerating in the accession page that data are loaded into corresponding to described accessing page request of data source by described.
Preferably, in said system, also comprise:
Updating block, enumerate data Release parameter for what enumerate data source described in basis, what upgrade described client-cache enumerates data Release parameter.
Technical scheme provided by the present invention, the son request of request as User Page request of data will be enumerated, make to enumerate request of data to separate with page request, thus make the request of independently enumerating data respond the client-requested mechanism that http protocol can be utilized to define to be cached to client, when again asking this page, or ask other comprise this when enumerating the page of data, direct use local cache enumerate data, thus the about computational resource of service end and the transmission bandwidth of network, shorten the load time of the page.
Accompanying drawing explanation
In order to be illustrated more clearly in technical scheme of the present invention, below the accompanying drawing used required in describing the present invention is briefly described, 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.
A kind of access method flow chart one enumerating data that Fig. 1 provides for the embodiment of the present invention;
A kind of access method flowchart 2 enumerating data that Fig. 2 provides for the embodiment of the present invention;
A kind of access method flow chart 3 enumerating data that Fig. 3 provides for the embodiment of the present invention;
A kind of structural representation one enumerating the access system of data that Fig. 4 provides for the embodiment of the present invention;
A kind of structural representation two enumerating the access system of data that Fig. 5 provides for the embodiment of the present invention;
A kind of structural representation three enumerating the access system of data that Fig. 6 provides for the embodiment of the present invention.
Embodiment
First a kind of access method enumerating data that the embodiment of the present invention provides is described, comprises:
Obtain user enumerate data access request, described in enumerate data access request as independently request be included in the accessing page request of user, and described in enumerate in data access request the Release parameter comprising and enumerate data;
When in client-cache enumerate data before the deadline time, enumerate described in judgement comprise in data access request enumerate data Release parameter, with the Release parameter enumerating data in client-cache with whether consistent;
When described enumerate comprise in data access request enumerate data Release parameter, time consistent with the Release parameter enumerating data in client-cache, enumerate data by described client-cache, be loaded in the accession page corresponding to described accessing page request.
Provided by the present inventionly enumerate data access method, the son request of request as User Page request of data will be enumerated, make to enumerate request of data to separate with page request, thus make the request of independently enumerating data respond the client-requested mechanism that http protocol can be utilized to define to be cached to client, when again asking this page, or ask other comprise this when enumerating the page of data, direct use local cache enumerate data, thus saved the computational resource of service end and the transmission bandwidth of network, shorten the load time of the page.
In order to make those skilled in the art understand the present invention program better, below in conjunction with embodiment, the present invention is described in further detail.
Shown in Figure 1, a kind of access method enumerating data that the embodiment of the present invention provides, can comprise the following steps:
S101, obtain user enumerate data access request, described in enumerate data access request as independently request be included in the accessing page request of user, and described in enumerate in data access request the Release parameter comprising and enumerate data.
For the enumerated data type of buffer memory, internal system storage has a version information of this enumeration type, and the data of enumerating in buffer memory use and unified enumerate data respond services, independently enumerate data access request for response.For convenience, by this service called after enumService, request URL is /service/enumService.
When carrying out enumerating data access, what first obtain user enumerates data access request.Described enumerate data access request as independently request be included in the accessing page request of user, and described in enumerate in data access request the Release parameter comprising and enumerate data.Such as, does is the access request that data are enumerated in city /service/enumService? enumType=city, does is so final request /service/enumService if current version is v001? enumType=city & version=v001.
S102, when in client-cache enumerate data before the deadline time, enumerate described in judgement comprise in data access request enumerate data Release parameter, with the Release parameter enumerating data in client-cache with whether consistent.
Enumerate data respond services and enumService process when enumerating request of data, first detect and whether before the deadline to enumerate data in client-cache, during actual detection, because Expires defines in buffer memory the maximum term of validity enumerating data, therefore the property value that enumService responds Expires packet header in packet header only need be detected.
Determine in client-cache enumerate data before the deadline after, judge enumerate comprise in data access request enumerate data Release parameter, with the Release parameter enumerating data in client-cache with whether consistent, during practical operation, because define in buffer memory the version value enumerating data in ETag, therefore the property value that enumService responds ETag packet header in packet header only need be detected.
S103, when described enumerate comprise in data access request enumerate data Release parameter, time consistent with the Release parameter enumerating data in client-cache, enumerate data by described client-cache, be loaded in the accession page corresponding to described accessing page request.
When determine to enumerate comprise in data access request enumerate data Release parameter, after consistent with the Release parameter enumerating data in client-cache, enumerate data respond services and enumService directly to call and enumerate data in client-cache, be loaded in the accession page corresponding to User Page access request.
Wherein, describedly will enumerate in accession page that data are loaded into corresponding to described accessing page request, concrete implementation process can be: will enumerate data according to initialize data encapsulation technology, after being packaged into array, array be loaded in accession page, described initialize data encapsulation technology can be javascript, vbscript, JSON etc.
As can be seen from above-described embodiment, the present invention will enumerate the son request of request as User Page request of data, make to enumerate request of data to separate with page request, thus make the request of independently enumerating data respond the client-requested mechanism that http protocol can be utilized to define to be cached to client, when again asking this page, or ask other comprise this when enumerating the page of data, direct use local cache enumerate data, thus saved the computational resource of service end and the transmission bandwidth of network, shorten the load time of the page.
Shown in Figure 2, in one embodiment of the invention, provided by the inventionly enumerate data access method, can further include following steps:
S104, when described enumerate comprise in data access request enumerate data Release parameter, time inconsistent with the Release parameter enumerating data in client-cache, described data access request of enumerating is redirected to and enumerates data source.
When determine to enumerate comprise in data access request enumerate data Release parameter, time inconsistent with the Release parameter enumerating data in client-cache, enumerating data respond services and enumService can reset to enumerating data source enumerating data access request, enumerating data from what enumerate that data source obtains the redaction needed.
S105, enumerates the enumerating in the accession page that data are loaded into corresponding to described accessing page request of data source by described.
Enumerate data source find the redaction of needs enumerate data after, be loaded in the accession page corresponding to accessing page request.
Shown in Figure 3, in one embodiment of the invention, provided by the inventionly enumerate data access method, can further include following steps:
S106, according to described enumerate data source enumerate data Release parameter, what upgrade described client-cache enumerates data Release parameter.
Internal system storage has in buffer memory the version information enumerating data, in time enumerating data and change, as newly increased or delete an enumerate key, or when changing an enumerate key, enumerating data and just can enumerate this information of data upgraded edition according to what enumerate data source in buffer memory.Like this, once access in this enumerates data upper, just directly can call from client-cache, instead of go to obtain with enumerating data source.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that program command is relevant, aforesaid program can be stored in a computer read/write memory medium, this program, when performing, performs the step comprising said method embodiment; Also can realize the present invention in a distributed computing environment, in these distributed computing environment (DCE), be executed the task by the remote processing devices be connected by communication network.In a distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium comprising memory device.And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Corresponding to embodiment of the method above, the embodiment of the present invention also provides a kind of access system enumerating data.
Shown in Figure 4, in one embodiment of the present of invention, a kind of access system enumerating data provided by the invention, can comprise with lower unit:
Acquisition request unit 100, enumerates data access request for what obtain user, described in enumerate data access request and be included in the accessing page request of user as independently request, and described in enumerate in data access request the Release parameter comprising and enumerate data.
Judging unit 200, for when in client-cache enumerate data before the deadline time, enumerate described in judgement comprise in data access request enumerate data Release parameter, with the Release parameter enumerating data in client-cache with whether consistent.
Data import unit 300, for when described in enumerate comprise in data access request enumerate data Release parameter, time consistent with the Release parameter enumerating data in client-cache, enumerate data by described client-cache, be loaded in the accession page corresponding to described accessing page request.
In the present embodiment, the son request of request as User Page request of data will be enumerated, make to enumerate request of data to separate with page request, thus make the request of independently enumerating data respond the client-requested mechanism that http protocol can be utilized to define to be cached to client, when again asking this page, or ask other comprise this when enumerating the page of data, direct use local cache enumerate data, thus saved the computational resource of service end and the transmission bandwidth of network, shorten the load time of the page.
Shown in Figure 5, in one embodiment of the present of invention, a kind of access system enumerating data provided by the invention, can further include with lower unit:
Be redirected unit 400, for when described in enumerate comprise in data access request enumerate data Release parameter, time inconsistent with the Release parameter enumerating data in client-cache, described data access request of enumerating is redirected to and enumerates data source.
Data reloading unit 500, for enumerating the enumerating in the accession page that data are loaded into corresponding to described accessing page request of data source by described.
Shown in Figure 6, in an embodiment of invention, a kind of access system enumerating data provided by the invention, can further include with lower unit:
Updating block 600, enumerate data Release parameter for what enumerate data source described in basis, what upgrade described client-cache enumerates data Release parameter.
For system embodiment, because it is substantially corresponding to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.System embodiment described above is only schematic, the wherein said unit illustrated as separating component or can may not be and physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
Be understandable that, the present invention can be used in numerous general or special purpose computing system environment or configuration.Such as: personal computer, server computer, handheld device or portable set, laptop device, multicomputer system, system, Set Top Box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer, the distributed computing environment (DCE) comprising above any system or equipment etc. based on microprocessor.
The above is only the specific embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (5)

1. enumerate an access method for data, it is characterized in that, comprising:
Obtain user enumerate data access request, described in enumerate data access request as independently request be included in the accessing page request of user, and described in enumerate in data access request the Release parameter comprising and enumerate data;
When in client-cache enumerate data before the deadline time, enumerate the Release parameter enumerating data comprised in data access request described in judgement, whether consistent with the Release parameter enumerating data in client-cache;
When described enumerate comprise in data access request enumerate data Release parameter, time consistent with the Release parameter enumerating data in client-cache, enumerate data by described client-cache, be loaded in the accession page corresponding to described accessing page request;
When described enumerate comprise in data access request enumerate data Release parameter, time inconsistent with the Release parameter enumerating data in client-cache, described data access request of enumerating is redirected to and enumerates data source;
The enumerating in the accession page that data are loaded into corresponding to described accessing page request of data source is enumerated by described.
2. method according to claim 1, is characterized in that, also comprises:
According to described enumerate data source enumerate data Release parameter, what upgrade described client-cache enumerates data Release parameter.
3. the method according to claim 1-2 any one, is characterized in that, describedly will enumerate in accession page that data are loaded into corresponding to described accessing page request, is specially:
By described data of enumerating according to initialize data encapsulation technology, after being packaged into array, described array is loaded in the accession page corresponding to described accessing page request.
4. enumerate an access system for data, it is characterized in that, comprising:
Acquisition request unit, enumerates data access request for what obtain user, described in enumerate data access request and be included in the accessing page request of user as independently request, and described in enumerate in data access request the Release parameter comprising and enumerate data;
Judging unit, for when in client-cache enumerate data before the deadline time, enumerate described in judgement comprise in data access request enumerate data Release parameter, whether consistent with the Release parameter enumerating data in client-cache;
Data import unit, for when described in enumerate comprise in data access request enumerate data Release parameter, time consistent with the Release parameter enumerating data in client-cache, enumerate data by described client-cache, be loaded in the accession page corresponding to described accessing page request;
Be redirected unit, for when described in enumerate comprise in data access request enumerate data Release parameter, time inconsistent with the Release parameter enumerating data in client-cache, described data access request of enumerating is redirected to and enumerates data source;
Data reloading unit, for enumerating the enumerating in the accession page that data are loaded into corresponding to described accessing page request of data source by described.
5. system according to claim 4, is characterized in that, also comprises:
Updating block, enumerate data Release parameter for what enumerate data source described in basis, what upgrade described client-cache enumerates data Release parameter.
CN201010565732.7A 2010-11-30 2010-11-30 Method and system for accessing enumerated data Active CN102480504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010565732.7A CN102480504B (en) 2010-11-30 2010-11-30 Method and system for accessing enumerated data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010565732.7A CN102480504B (en) 2010-11-30 2010-11-30 Method and system for accessing enumerated data

Publications (2)

Publication Number Publication Date
CN102480504A CN102480504A (en) 2012-05-30
CN102480504B true CN102480504B (en) 2015-06-10

Family

ID=46092984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010565732.7A Active CN102480504B (en) 2010-11-30 2010-11-30 Method and system for accessing enumerated data

Country Status (1)

Country Link
CN (1) CN102480504B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102439B (en) * 2013-04-08 2019-06-18 深圳富泰宏精密工业有限公司 Event triggering system and method
CN104301556B (en) 2014-09-26 2017-12-29 小米科技有限责任公司 Phone exchange method, device and system
CN105630948B (en) * 2015-12-23 2021-07-23 小米科技有限责任公司 Network page display method and device
CN109683870A (en) * 2017-10-18 2019-04-26 北京京东尚科信息技术有限公司 Method and apparatus for enumerating data access
CN110019407B (en) * 2017-12-29 2021-07-13 北京金风科创风电设备有限公司 Processing method, device, equipment and storage medium for enumeration data in wind power plant
CN108629039B (en) * 2018-05-11 2021-02-19 北京汉能光伏投资有限公司 Data processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005060201A1 (en) * 2003-12-15 2005-06-30 International Business Machines Corporation Apparatus, system, and method for grid based data storage
CN1773928A (en) * 2004-11-10 2006-05-17 英业达股份有限公司 System for controlling Internet web update utilizing intermediate control layer and method thereof
CN101539911A (en) * 2008-03-18 2009-09-23 盛大计算机(上海)有限公司 Device and method for accelerating display of web page of browser

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005060201A1 (en) * 2003-12-15 2005-06-30 International Business Machines Corporation Apparatus, system, and method for grid based data storage
CN1773928A (en) * 2004-11-10 2006-05-17 英业达股份有限公司 System for controlling Internet web update utilizing intermediate control layer and method thereof
CN101539911A (en) * 2008-03-18 2009-09-23 盛大计算机(上海)有限公司 Device and method for accelerating display of web page of browser

Also Published As

Publication number Publication date
CN102480504A (en) 2012-05-30

Similar Documents

Publication Publication Date Title
CN102480504B (en) Method and system for accessing enumerated data
JP6797877B2 (en) How to implement web applications, devices, servers, and systems
US10652083B1 (en) System and method for a self service portal and automation for internally hosted virtual server resources
CN102833323B (en) Method and system for remote control of controlled terminal by server
KR101512118B1 (en) Exposing resource capabilities to web applications
US9235451B2 (en) Browser kernel switching method
CN109542427A (en) A kind of system customization method, apparatus and electronic equipment and storage medium
CN103685269B (en) A kind of web browser carries out the method and system of both-way communication with server
CN102904947A (en) Application client presentation style updating and/or content expanding method and system
US20100180188A1 (en) Management of rotating browser content
CN106897336A (en) Web page files sending method, webpage rendering intent and device, webpage rendering system
WO2014034001A1 (en) Web content prefetch control device, web content prefetch control program, and web content prefetch control method
CN104113567A (en) Content distribution network data processing method, device and system
CN109670126B (en) Cross-border access acceleration method and device
JP6088853B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND COMMUNICATION PROGRAM
CN112243033B (en) Method, device and equipment for acquiring memory information and computer readable storage medium
US8959209B1 (en) Systems and methods to indicate compatibility
CN104796929A (en) Network debugging method and device
CN103441925A (en) Home gateway device and method for mounting storage device on home gateway device
JP5643449B1 (en) Server and method for displaying display screen on terminal device
CN102469109A (en) Display method of browser homepage in mobile terminal and apparatus thereof
CN114610239A (en) Method and device for operating file in portable memory by mobile terminal
JP5245629B2 (en) Relay device, communication relay method, program thereof, and relay system
CN109189588B (en) Browser function implementation method, device, terminal and storage medium
US11288336B2 (en) Systems and methods for providing content items in situations involving suboptimal network conditions

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant