CN103823872A - Information pushing method and device - Google Patents
Information pushing method and device Download PDFInfo
- Publication number
- CN103823872A CN103823872A CN201410068980.9A CN201410068980A CN103823872A CN 103823872 A CN103823872 A CN 103823872A CN 201410068980 A CN201410068980 A CN 201410068980A CN 103823872 A CN103823872 A CN 103823872A
- Authority
- CN
- China
- Prior art keywords
- page
- data
- json file
- mark
- active user
- 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
- 238000000034 method Methods 0.000 title claims abstract description 18
- 239000002699 waste material Substances 0.000 abstract description 5
- 230000005856 abnormality Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 3
- 101100217298 Mus musculus Aspm gene Proteins 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000013497 data interchange Methods 0.000 description 1
- 230000001066 destructive effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
- H04L63/123—Applying verification of the received information received data contents, e.g. message integrity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F16/986—Document structures and storage, e.g. HTML extensions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9577—Optimising the visualization of content, e.g. distillation of HTML documents
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides an information pushing method which comprises the steps of acquiring a JSON file; generating the identifier of the JSON file; writing the JSON file and the identifier into a template file to generate data of an updated page; matching the identifier of data of a current user page with the identifier of the JSON file and pushing page data to a user when the identifier of the data of the current user page is different from the identifier of the JSON file, wherein the uniform resource locator of the updated page is the same as that of the current user page. The invention further provides an information pushing device. By the adoption of the technical scheme, page abnormality caused by data source writing errors or page scaling can be avoided, and network performance waste caused by continuous data acquiring and updating is avoided.
Description
Technical field
The present invention relates to field of computer technology, relate in particular to a kind of information-pushing method and device.
Background technology
Although internet, from universal only short time more than ten years of emerging trend till now, for the development of browser, has but experienced many variations.It is unprecedented that present browser and webpage have a lot of new functions and new technology, and different browsers has different functions.Information pushing has a large amount of application directions in industry, is the technique direction that current internet is very burning hot.
At present, server push technology (Server Push) can directly be delivered to client from server push by data, provides up-to-date various information thereby realize according to user preferences to user.In a kind of prior art, server can the mode based on embedded framework iframe be realized propelling movement.
Based on the mode of iframe (html tag), be to create by iframe the nested page display content that comprises another one document, namely in webpage, embed again a webpage.Propelling movement based on iframe mode is generally to have a hiding iframe in the page of request pushed information, the source src of iframe is the long server-side application servlet connecting of maintenance that points to server, and this servlet can pass to homepage as parameter using the content that will push.There is following shortcoming in this mode:
1) in the time of needs Push Service, all need to go for to ask the propelling movement page at every turn, comprise that owing to pushing the page picture etc. causes each request to push the page and wastes more bandwidth;
2) in the time need to again making the complete page, development difficulty is large, the cycle is long;
3) higher to being responsible for side's technical requirement of pushed information, because iframe mode is that a webpage embeds another webpage, be responsible for a side of pushed information except developing the page, dailyly also need to safeguard a complete page;
4) easily cause User Page mistake, or even safety problem, if there is error code or filled in destructive code causing user side to show abnormal or even safety problem in the page embedding.
Summary of the invention
The present invention is directed to the problems referred to above, proposed a kind of information-pushing method and device, generate page data by template is set, and only in the time of renewal of the page, just push page data.
In one aspect, the invention provides a kind of information-pushing method, comprising:
Obtain JSON file from the information providing of active user's page;
According to the mark of JSON file described in described JSON file generated;
The mark of described JSON file and described JSON file is write to template file, generate the data of upgrading the page; Wherein, the unified position identifiers URL of the described renewal page is identical with the URL of active user's page;
The mark of the JSON file in the data of the mark in the data of active user's page and the described renewal page is mated, if the mark of the JSON file in the data of the mark in the data of active user's page and the described renewal page is not identical, push the data of the described renewal page to described user.
In yet another aspect, the invention provides a kind of information push-delivery apparatus, comprising:
Acquisition module, for obtaining JSON file from the information providing of active user's page;
Mark generation module, for according to the mark of JSON file described in described JSON file generated;
Page generation module, for the mark of described JSON file and described JSON file is write to template file, generates the data of upgrading the page; Wherein, the unified position identifiers URL of the described renewal page is identical with the URL of active user's page;
Pushing module, for the mark of the JSON file in the data of the mark of active user's page data and the described renewal page is mated, if the mark of the JSON file in the data of the mark in the data of active user's page and the described renewal page is not identical, push the data of the described renewal page to described user.
Adopt technical scheme of the present invention, can avoid, because data source is filled in the page exception situation appearance that mistake or page zoom-in and zoom-out etc. cause, having avoided the network performance waste of constantly obtaining, more new data causes simultaneously.
Accompanying drawing explanation
Specific embodiments of the invention are described below with reference to accompanying drawings, wherein:
Fig. 1 shows the process flow diagram of embodiment of the present invention information-pushing method;
Fig. 2 shows the embodiment of the present invention one effect schematic diagram;
Fig. 3 shows the structural representation of embodiment of the present invention information push-delivery apparatus.
Embodiment
In order to make technical scheme of the present invention and advantage clearer, below in conjunction with accompanying drawing, exemplary embodiment of the present invention is described in more detail, obviously, described embodiment is only a part of embodiment of the present invention, rather than all embodiment's is exhaustive.
The embodiment of the present invention provides a kind of information-pushing method, and Fig. 1 shows the method flow diagram of this information-pushing method, comprising:
S101, obtain JSON file from the information providing of active user's page.
In an embodiment of the present invention, this JSON file is generated, is had the JSON file of standard format in advance by information providing, this JSON file including word, picture link and the link of details page etc.
Wherein, JSON is the abbreviation of JavaScript Object Notation, is a kind of data interchange format of light weight, is easy to reading and portable, is also easy to machine simultaneously and resolves and generate.
S102, according to the mark of this JSON file generated JSON file.
Optionally, embodiment of the present invention hash algorithm used can be SHA-1 (Secure Hash Algorithm, Secure Hash Algorithm) or MD5 (message digest algorithm, Message-Digest Algorithm5), the present invention is not restricted this.Accordingly, if utilize MD5 message digest algorithm, generating identification is the MD5 informative abstract of this JSON file, if utilize SHA-1 Secure Hash Algorithm, what generate is designated SHA1 value.
S103, the mark of JSON file and this JSON file is write in template file, generate the data of upgrading the page; Wherein, the URL of this renewal page is identical with the URL of active user's page.
For example, above-mentioned template file can be the HTML (Hypertext Markup Language) html element element setting in advance, and includes Cascading Style Sheet (CSS, Cascading Style Sheet), JavaScript (being called for short JS) etc.; After JSON file and mark thereof being filled in the html element element of vacancy, just can form the data of the renewal page.Such as:
In template, the color of certain font is: font color: " a "; Being designated of JSON file: jsonid: " b ".
In JSON file, to there being a field to be shown as: a=blue.
The mark of the JSON file of hypotheses creation is json1, that is: b=json1.
S104, mate upgrading the mark of JSON file in the data of the page and the mark in the data of active user's page, if the mark of the JSON file in the data of the mark in the data of active user's page and the described renewal page is not identical, push the data of upgrading the page to user.
For example, utilize the data of the data replacement active user page that upgrades the page, and trigger update notifying.
In an embodiment of the present invention, the mark in the data of active user's page can be the mark in the User Page data of obtaining in advance, for example, can be the mark once recording in the time that user is pushed to page data upper.
Wherein, the small icon that update notifying can be added round dot type in User Page mark, as shown in Figure 2, or otherwise reminds, and the present invention is not restricted this.
Optionally, if the mark of the JSON file in the data of the mark in the data of active user's page and the described renewal page is identical, abandon the data of upgrading the page.
Adopt technical scheme of the present invention, can avoid, because data source is filled in the page exception situation appearance that mistake or page zoom-in and zoom-out etc. cause, having avoided the network performance waste of constantly obtaining, more new data causes simultaneously.
Alternatively, in an embodiment of the present invention, after above-mentioned (S101) obtains JSON file, can also comprise:
S105, this JSON file is carried out to format check.If format check is made mistakes, abandon this file; Otherwise carry out S102.
Wherein, format check can be realized by regular expression, also can realize by other mode, and the present invention is not restricted this.
The embodiment of the present invention is by adopting format check mode, avoided information providing to fill in the user side that JSON document lending may cause and shown abnormal.
The embodiment of the present invention also provides a kind of information push-delivery apparatus, and Fig. 3 shows the structural representation of this information push-delivery apparatus, specifically comprises:
Wherein, can utilize MD5 message digest algorithm or SHA-1 cryptographic Hash algorithm to generate the mark of JSON file.Accordingly, if utilize MD5 message digest algorithm, generating identification is the MD5 informative abstract of this JSON file, if utilize SHA-1 Secure Hash Algorithm, what generate is designated SHA1 value.
Adopt technical scheme of the present invention, can avoid, because data source is filled in the page exception situation appearance that mistake or page zoom-in and zoom-out etc. cause, having avoided the network performance waste of constantly obtaining, more new data causes simultaneously.
Alternatively, the information push-delivery apparatus that the embodiment of the present invention provides, can also comprise:
Format check module 205, carries out format check for the JSON file that acquisition module 201 is got; If verification is passed through, trigger mark generation module 202;
Alternatively, format check can be realized by regular expression, also can realize by other mode, and the present invention is not restricted this.
Above embodiment is only in order to technical scheme of the present invention to be described, but not is limited.Therefore,, in the situation that not deviating from spirit of the present invention and essence thereof, those skilled in the art can make various changes, replacement and modification.Obviously, but within these changes, replacement and modification all should be covered by the protection domain of the claims in the present invention.
Claims (9)
1. an information-pushing method, is characterized in that, comprising:
Obtain JSON file from the information providing of active user's page;
According to the mark of JSON file described in described JSON file generated;
The mark of described JSON file and described JSON file is write to template file, generate the data of upgrading the page; Wherein, the unified position identifiers URL of the described renewal page is identical with the URL of active user's page;
The mark of the JSON file in the data of the mark in the data of active user's page and the described renewal page is mated, if the mark of the JSON file in the data of the mark in the data of active user's page and the described renewal page is not identical, push the data of the described renewal page to described user.
2. information-pushing method as claimed in claim 1, is characterized in that, described template file is the default HTML (Hypertext Markup Language) html element element arranging.
3. information-pushing method as claimed in claim 1 or 2, is characterized in that, described method also comprises: after getting described JSON file, described JSON file is carried out to format check.
4. information-pushing method as claimed in claim 1, is characterized in that, the described data that push the described renewal page to described user, comprising:
Utilize the data of the data replacement active user page of the described renewal page, trigger update notifying.
5. the information-pushing method as described in claim 1 or 4, is characterized in that, if the mark of the JSON file in the data of the mark in the data of active user's page and the described renewal page is identical, abandons the data of the described renewal page.
6. an information push-delivery apparatus, is characterized in that, comprising:
Acquisition module, for obtaining JSON file from the information providing of active user's page;
Mark generation module, for according to the mark of JSON file described in described JSON file generated;
Page generation module, for the mark of described JSON file and described JSON file is write to template file, generates the data of upgrading the page; Wherein, the unified position identifiers URL of the described renewal page is identical with the URL of active user's page;
Pushing module, for the mark of the JSON file in the data of the mark of active user's page data and the described renewal page is mated, if the mark of the JSON file in the data of the mark in the data of active user's page and the described renewal page is not identical, push the data of the described renewal page to described user.
7. information push-delivery apparatus as claimed in claim 6, is characterized in that, described device also comprises: format check module, and for described JSON file is carried out to format check.
8. information push-delivery apparatus as claimed in claim 7, is characterized in that, described format check module is for carrying out format check by regular expression to described JSON file.
9. the information push-delivery apparatus as described in any one in claim 6-8, is characterized in that, described mark generation module is for utilizing MD5 message digest algorithm or SHA-1 Secure Hash Algorithm to generate the mark of described JSON file.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410068980.9A CN103823872A (en) | 2014-02-27 | 2014-02-27 | Information pushing method and device |
PCT/CN2014/084388 WO2015127764A1 (en) | 2014-02-27 | 2014-08-14 | Information push method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410068980.9A CN103823872A (en) | 2014-02-27 | 2014-02-27 | Information pushing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103823872A true CN103823872A (en) | 2014-05-28 |
Family
ID=50758936
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410068980.9A Pending CN103823872A (en) | 2014-02-27 | 2014-02-27 | Information pushing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103823872A (en) |
WO (1) | WO2015127764A1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015127764A1 (en) * | 2014-02-27 | 2015-09-03 | 北京金山网络科技有限公司 | Information push method and device |
CN105404514A (en) * | 2015-12-01 | 2016-03-16 | 广州华多网络科技有限公司 | JavaScript rendering method and apparatus |
CN106991036A (en) * | 2016-01-20 | 2017-07-28 | 阿里巴巴集团控股有限公司 | A kind of abnormal reminding method of information input and system |
CN107347048A (en) * | 2016-05-04 | 2017-11-14 | 北京京东尚科信息技术有限公司 | The method, apparatus and system of data check |
CN108415976A (en) * | 2018-02-09 | 2018-08-17 | 西安博达软件股份有限公司 | The method of release quickly site file based on CMS system |
CN112035104A (en) * | 2020-08-28 | 2020-12-04 | 重庆长安汽车股份有限公司 | Modeling method for dynamically changing function configuration of mobile application |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101217507A (en) * | 2007-12-29 | 2008-07-09 | 深圳市迅雷网络技术有限公司 | Method, device and system for providing and altering data on network page |
US7779047B2 (en) * | 2007-06-22 | 2010-08-17 | International Business Machines Corporation | Pluggable merge patterns for data access services |
CN102355500A (en) * | 2011-10-08 | 2012-02-15 | 中兴通讯股份有限公司 | Business pushing method and device |
CN102833350A (en) * | 2012-09-11 | 2012-12-19 | 优视科技有限公司 | Processing method and processing device of WebApp updating |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103823872A (en) * | 2014-02-27 | 2014-05-28 | 北京金山网络科技有限公司 | Information pushing method and device |
-
2014
- 2014-02-27 CN CN201410068980.9A patent/CN103823872A/en active Pending
- 2014-08-14 WO PCT/CN2014/084388 patent/WO2015127764A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7779047B2 (en) * | 2007-06-22 | 2010-08-17 | International Business Machines Corporation | Pluggable merge patterns for data access services |
CN101217507A (en) * | 2007-12-29 | 2008-07-09 | 深圳市迅雷网络技术有限公司 | Method, device and system for providing and altering data on network page |
CN102355500A (en) * | 2011-10-08 | 2012-02-15 | 中兴通讯股份有限公司 | Business pushing method and device |
CN102833350A (en) * | 2012-09-11 | 2012-12-19 | 优视科技有限公司 | Processing method and processing device of WebApp updating |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015127764A1 (en) * | 2014-02-27 | 2015-09-03 | 北京金山网络科技有限公司 | Information push method and device |
CN105404514A (en) * | 2015-12-01 | 2016-03-16 | 广州华多网络科技有限公司 | JavaScript rendering method and apparatus |
CN105404514B (en) * | 2015-12-01 | 2019-02-15 | 广州华多网络科技有限公司 | JavaScript rendering method and device |
CN106991036A (en) * | 2016-01-20 | 2017-07-28 | 阿里巴巴集团控股有限公司 | A kind of abnormal reminding method of information input and system |
CN106991036B (en) * | 2016-01-20 | 2020-04-24 | 阿里巴巴集团控股有限公司 | Prompting method and system for information input abnormity |
CN107347048A (en) * | 2016-05-04 | 2017-11-14 | 北京京东尚科信息技术有限公司 | The method, apparatus and system of data check |
CN108415976A (en) * | 2018-02-09 | 2018-08-17 | 西安博达软件股份有限公司 | The method of release quickly site file based on CMS system |
CN108415976B (en) * | 2018-02-09 | 2021-11-09 | 西安博达软件股份有限公司 | Method for rapidly publishing website file based on CMS system |
CN112035104A (en) * | 2020-08-28 | 2020-12-04 | 重庆长安汽车股份有限公司 | Modeling method for dynamically changing function configuration of mobile application |
CN112035104B (en) * | 2020-08-28 | 2024-03-22 | 重庆长安汽车股份有限公司 | Modeling method for dynamically changing functional configuration of mobile application |
Also Published As
Publication number | Publication date |
---|---|
WO2015127764A1 (en) | 2015-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103823872A (en) | Information pushing method and device | |
US7742617B2 (en) | Document genealogy | |
CN104461484B (en) | The implementation method and device of front-end template | |
JP4533780B2 (en) | Image forming system, image forming apparatus, terminal device, and driver updating method for terminal device | |
US20160189016A1 (en) | Techniques for generating customized two-dimensional barcodes | |
CN106055337B (en) | Interface generation method and device | |
CN102124481A (en) | Embedding macros in web pages with advertisements | |
CA2755427A1 (en) | Web translation with display replacement | |
TW200917057A (en) | Automatically instrumenting a set of web documents | |
CN104185845A (en) | System and method for providing a binary representation of a web page | |
US9275018B2 (en) | Techniques for analyzing web pages to determine font subsets | |
JP6527227B2 (en) | Modify native document comments in preview | |
US9703762B1 (en) | Method and system for processing a style sheet defining a reusable theme for a web page and specifying a relative location of content | |
US20140201823A1 (en) | Article of manufacture for securing data in 2D bar codes using SSL | |
US20150067037A1 (en) | Communication apparatus and communication method | |
CN103970750A (en) | Method and device for generating HTML (Hypertext Markup Language) web pages | |
CN113419728B (en) | Marketing page building method, device, equipment and storage medium | |
CN103870583A (en) | Relational-database-based online and controllable browsing method for PDF document | |
CA2846581A1 (en) | Data infrastructure for providing interconnectivity between platforms, devices and operating systems | |
JP2009187126A (en) | Information processing apparatus and method | |
CN105049483A (en) | Browser based data uploading method and device | |
US8407583B2 (en) | Information processing apparatus, information processing method, computer-readable medium and computer data signal | |
CN104965720B (en) | Using installation method and device | |
JP5885702B2 (en) | Image forming apparatus and web page language adding method | |
US20190073205A1 (en) | Software management device, software management system, and non-transitory computer readable medium storing program |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140528 |