CN104123101A - Method and device for presenting data - Google Patents
Method and device for presenting data Download PDFInfo
- Publication number
- CN104123101A CN104123101A CN201410346363.0A CN201410346363A CN104123101A CN 104123101 A CN104123101 A CN 104123101A CN 201410346363 A CN201410346363 A CN 201410346363A CN 104123101 A CN104123101 A CN 104123101A
- Authority
- CN
- China
- Prior art keywords
- data
- key
- template
- value pair
- buffer memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method and a device for presenting data. Data saved in a key value pair manner can be presented in a preset manner, so that the data can have better readability, and a person can check the data conveniently. The method for presenting the data comprises steps as follows: for the data saved in the key value pair manner, key names and key values are extracted from key value pairs and then filled to a preset data template; the data are presented according to the filled data template.
Description
Technical field
The present invention relates to technical field of the computer network, relate to especially a kind of method and apparatus that presents data.
Background technology
In order to improve the access performance of application system, increasing application server adopts caching technology, by data buffer storage in calculator memory, to help the fast access of data.Conventional caching system has Redis, Memcache etc., generally adopts the mode save data of key-value pair.
In many cases, personnel need to check data cached, and the data of preserving in the mode of key-value pair are readable poor for manual read, and the personnel of being not easy to check data, have affected personnel's upgrading in time to the processing of data exception and data.
Summary of the invention
In view of this, the invention provides a kind of method and apparatus that presents data, for the data of preserving in key-value pair mode, can be presented to preset form, make data there is good readability, be convenient to personnel and check data.
For achieving the above object, according to an aspect of the present invention, provide a kind of method that presents data.
The method that presents data of the present invention comprises: for the data of storing in the mode of key-value pair, extract key name and key assignments and be then filled in default data template from key-value pair; According to the data template after filling, present described data.
Alternatively, described data template is HTML (Hypertext Markup Language) html template.
Alternatively, described data are data cached in distributed memory target cache system.
Alternatively, described distributed memory target cache system comprises a plurality of caching systems; Described extraction from key-value pair before then key name and key assignments be filled into the step in default data template, also comprises: preserve accordingly buffer memory type, apply names and buffer address; Receive data and check request; According to described data, check that buffer memory type, apply names and buffer address in request obtain the data of storing in the mode of key-value pair successively.
Alternatively, described buffer memory type comprises Redis buffer memory and Memcache buffer memory.
According to a further aspect in the invention, provide a kind of device that presents data.
The device that presents data of the present invention comprises: extraction module for the data for storing in the mode of key-value pair, extracts key name and key assignments from key-value pair; Packing module, for being filled into default data template by described key name and key assignments; Present module, for presenting described data according to the data template after filling.
Alternatively, described data template is HTML (Hypertext Markup Language) html template.
Alternatively, also comprise: preserve module, for preserving accordingly buffer memory type, apply names and buffer address; Receiver module, checks request for receiving data; Acquisition module, for checking that according to described data buffer memory type, apply names and the buffer address of request obtain the data of storing in the mode of key-value pair successively.
According to technical scheme of the present invention, for the data of storing in the mode of key-value pair, from key-value pair, extract key name and key assignments and be then filled in default data template; According to the data template after filling, present this data again, readable poor data can be presented by default form, facilitate manual read, thereby contribute to personnel that data exception is processed in time and data content is upgraded.
Accompanying drawing explanation
Accompanying drawing, for understanding the present invention better, does not form inappropriate limitation of the present invention.Wherein:
Fig. 1 is according to the schematic diagram of the key step of the method that presents data of the embodiment of the present invention;
Fig. 2 is according to the schematic diagram of the basic structure of the device that presents data of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, one exemplary embodiment of the present invention is explained, comprising the various details of the embodiment of the present invention, to help understanding, they should be thought to be only exemplary.Therefore, those of ordinary skills will be appreciated that, can make various changes and modification to the embodiments described herein, and can not deviate from scope and spirit of the present invention.Equally, for clarity and conciseness, in following description, omitted the description to known function and structure.
In the embodiment of the present invention, for the data of storing in the mode of key-value pair, elder generation from key-value pair, extracts key name and then key assignments is filled in default data template, then presents this data according to the data template after filling.The data of storing for the mode with key-value pair in the distributed memory target cache system that comprises a plurality of caching systems, can be by the flow processing shown in Fig. 1.Fig. 1 is according to the schematic diagram of the key step of the method that presents data of the embodiment of the present invention.
Step S11: preserve accordingly buffer memory type, apply names and buffer address.For example: apply names: basic data buffer memory; Buffer memory type: Redis; Caching server IP:192.168.10.137; Port: 3312.
Step S12: receive data and check request.Data are checked and in request, are comprised following information: buffer memory type, apply names and buffer address.
Step S13: check the data that the acquisition of information that comprises in request is stored in the mode of key-value pair according to data.Take Redis caching system as example, and BASE_SITE is key name, in the square bracket after "=" number, is key assignments, concrete data for example:
The BASE_SITE=[{'name':' North Star is from carrying point ', ' sitecode':'1001'},
' name':' Zhong Guan-cun from carry point ', ' sitecode':'1002'},
' name':' Back Long View website ', ' sitecode':'1003'},
' name':' Xizhimen website ', ' sitecode':'1004'}]
Step S14: extract key name and key assignments and be then filled in default data template from key-value pair.In the present embodiment, adopt HTML (Hypertext Markup Language) html template, content for example:
Template name: jdsite
Apply Names: basic data buffer memory
Key name: BASE_SITE
Template content:
' tag':'li', ' html':' site name=$ { name}, site number=$ { sitecode}'}
When filling, from key assignments, find name field, be thereafter site name; Find sitecode field, be thereafter site number.
Step S15: present data according to the data template after filling.Because determined each site name and site number, therefore can be in man-machine interface rendering content as follows:
Site name=North Star is carried a little certainly, site number=1001
Site name=Zhong Guan-cun is carried a little certainly, site number=1002
Site name=Back Long View website, site number=1003
Site name=Xizhimen website, site number=1004
Fig. 2 is according to the schematic diagram of the basic structure of the device that presents data of the embodiment of the present invention, and this device can be arranged in the computing machine being connected with distributed memory target cache system.As shown in Figure 2, the device 20 that presents data mainly comprises extraction module 21, packing module 22 and presents module 23.Extraction module 21, for the data for storing in the mode of key-value pair, extracts key name and key assignments from key-value pair; Packing module 22 is for being filled into default data template by key name and key assignments; Present module 23 for presenting data according to the data template after filling.
The device 20 that presents data can also comprise preserves module, receiver module and acquisition module (not shown).Preserve module for preserving accordingly buffer memory type, apply names and buffer address; Receiver module is used for receiving data and checks request; Acquisition module is for checking that according to described data buffer memory type, apply names and the buffer address of request obtain the data of storing in the mode of key-value pair successively.
According to the technical scheme of the embodiment of the present invention, for the data of storing in the mode of key-value pair, from key-value pair, extract key name and key assignments and be then filled in default data template; According to the data template after filling, present this data again, readable poor data can be presented by default form, facilitate manual read, thereby contribute to personnel that data exception is processed in time and data content is upgraded.
Ultimate principle of the present invention has below been described in conjunction with specific embodiments, but, it is to be noted, for those of ordinary skill in the art, can understand whole or any steps or the parts of method and apparatus of the present invention, can be in the network of any calculation element (comprising processor, storage medium etc.) or calculation element, with hardware, firmware, software or their combination, realized, this is that those of ordinary skills use their basic programming skill just can realize in the situation that having read explanation of the present invention.
Therefore, object of the present invention can also realize by move a program or batch processing on any calculation element.Described calculation element can be known fexible unit.Therefore, object of the present invention also can be only by providing the program product that comprises the program code of realizing described method or device to realize.That is to say, such program product also forms the present invention, and the storage medium that stores such program product also forms the present invention.Obviously, described storage medium can be any storage medium of developing in any known storage medium or future.
Also it is pointed out that in apparatus and method of the present invention, obviously, each parts or each step can decompose and/or reconfigure.These decomposition and/or reconfigure and should be considered as equivalents of the present invention.And, carry out the step of above-mentioned series of processes and can order naturally following the instructions carry out in chronological order, but do not need necessarily according to time sequencing, to carry out.Some step can walk abreast or carry out independently of one another.
Above-mentioned embodiment, does not form limiting the scope of the invention.Those skilled in the art should be understood that, depend on designing requirement and other factors, various modifications, combination, sub-portfolio can occur and substitute.Any modification of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection domain of the present invention.
Claims (8)
1. a method that presents data, is characterized in that, comprising:
For the data of storing in the mode of key-value pair, from key-value pair, extract key name and key assignments and be then filled in default data template;
According to the data template after filling, present described data.
2. method according to claim 1, is characterized in that, described data template is HTML (Hypertext Markup Language) html template.
3. method according to claim 1 and 2, is characterized in that, described data are data cached in distributed memory target cache system.
4. method according to claim 3, is characterized in that,
Described distributed memory target cache system comprises a plurality of caching systems;
Described extraction from key-value pair before then key name and key assignments be filled into the step in default data template, also comprises:
Preserve accordingly buffer memory type, apply names and buffer address;
Receive data and check request;
According to described data, check that buffer memory type, apply names and buffer address in request obtain the data of storing in the mode of key-value pair successively.
5. method according to claim 4, is characterized in that, described buffer memory type comprises Redis buffer memory and Memcache buffer memory.
6. a device that presents data, is characterized in that, comprising:
Extraction module for the data for storing in the mode of key-value pair, extracts key name and key assignments from key-value pair;
Packing module, for being filled into default data template by described key name and key assignments;
Present module, for presenting described data according to the data template after filling.
7. device according to claim 6, is characterized in that, described data template is HTML (Hypertext Markup Language) html template.
8. according to the device described in claim 6 or 7, it is characterized in that, also comprise:
Preserve module, for preserving accordingly buffer memory type, apply names and buffer address;
Receiver module, checks request for receiving data;
Acquisition module, for checking that according to described data buffer memory type, apply names and the buffer address of request obtain the data of storing in the mode of key-value pair successively.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410346363.0A CN104123101A (en) | 2014-07-18 | 2014-07-18 | Method and device for presenting data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410346363.0A CN104123101A (en) | 2014-07-18 | 2014-07-18 | Method and device for presenting data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104123101A true CN104123101A (en) | 2014-10-29 |
Family
ID=51768527
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410346363.0A Pending CN104123101A (en) | 2014-07-18 | 2014-07-18 | Method and device for presenting data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104123101A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105096033A (en) * | 2015-07-01 | 2015-11-25 | 北京京东尚科信息技术有限公司 | Method and device for providing decision information |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1997000A (en) * | 2005-12-31 | 2007-07-11 | 腾讯科技(深圳)有限公司 | Virtual-host-based web server and method for user obtaining access data |
US7818325B1 (en) * | 2001-10-10 | 2010-10-19 | Google Inc. | Serving geospatially organized flat file data |
CN102929877A (en) * | 2011-08-08 | 2013-02-13 | 阿里巴巴集团控股有限公司 | Method and device for causing form data on webpage to be generated into form document |
CN103123631A (en) * | 2011-11-21 | 2013-05-29 | 阿里巴巴集团控股有限公司 | Generation of copywriting, displaying method of webpage copywriting, device and website server |
-
2014
- 2014-07-18 CN CN201410346363.0A patent/CN104123101A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7818325B1 (en) * | 2001-10-10 | 2010-10-19 | Google Inc. | Serving geospatially organized flat file data |
CN1997000A (en) * | 2005-12-31 | 2007-07-11 | 腾讯科技(深圳)有限公司 | Virtual-host-based web server and method for user obtaining access data |
CN102929877A (en) * | 2011-08-08 | 2013-02-13 | 阿里巴巴集团控股有限公司 | Method and device for causing form data on webpage to be generated into form document |
CN103123631A (en) * | 2011-11-21 | 2013-05-29 | 阿里巴巴集团控股有限公司 | Generation of copywriting, displaying method of webpage copywriting, device and website server |
Non-Patent Citations (1)
Title |
---|
郭方方: "《PHP开发一站式学习 难点案例练习》", 31 March 2013, 清华大学出版社 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105096033A (en) * | 2015-07-01 | 2015-11-25 | 北京京东尚科信息技术有限公司 | Method and device for providing decision information |
CN105096033B (en) * | 2015-07-01 | 2019-07-30 | 北京京东尚科信息技术有限公司 | It is a kind of that the method and apparatus of decision information are provided |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9426200B2 (en) | Updating dynamic content in cached resources | |
US8615709B2 (en) | Initiating font subsets | |
EP3273362A1 (en) | Webpage access method, apparatus, device and non-volatile computer storage medium | |
CN107463511B (en) | Data internationalization realization method and device based on multi-level cache | |
CN103488732A (en) | Generation method and device of static pages | |
KR102194675B1 (en) | Techniques for context-based grouping of messages for translation | |
CN103019879A (en) | Method and system for processing crash information of browser | |
CN103401950A (en) | Cache asynchronism refreshment method, as well as method and system for processing requests by cache server | |
TW201800962A (en) | Webpage file sending method, webpage rendering method and device and webpage rendering system | |
US20170102919A1 (en) | Systems and methods for low interference logging and diagnostics | |
CN110019873B (en) | Face data processing method, device and equipment | |
TW201437826A (en) | Method and device for combining webpage style address | |
CN110851756A (en) | Page loading method and device, computer readable storage medium and terminal equipment | |
US9760557B2 (en) | Tagging autofill field entries | |
CN103078945A (en) | Method and system for processing browser crash data | |
CN111046311A (en) | Method and device for realizing traceless iteration version of PC (personal computer) end, computer equipment and storage medium | |
CN110727892A (en) | Cache data updating method and device and electronic equipment | |
US9648078B2 (en) | Identifying a browser for rendering an electronic document | |
CN105404672B (en) | The system and method for web data storage and operation | |
CN103377194A (en) | Method, device and browser for accelerating access to web pages | |
CN106156291A (en) | The caching method of static resource and system thereof based on Localstroage | |
CN104123101A (en) | Method and device for presenting data | |
CN103678295A (en) | Method and device for providing files for user | |
US20150261880A1 (en) | Techniques for translating user interfaces of web-based applications | |
CN111177600A (en) | Built-in webpage loading method and device based on mobile application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20141029 |
|
RJ01 | Rejection of invention patent application after publication |