CN108460069A - For the method for web page article independence point of addition comment - Google Patents
For the method for web page article independence point of addition comment Download PDFInfo
- Publication number
- CN108460069A CN108460069A CN201711235088.5A CN201711235088A CN108460069A CN 108460069 A CN108460069 A CN 108460069A CN 201711235088 A CN201711235088 A CN 201711235088A CN 108460069 A CN108460069 A CN 108460069A
- Authority
- CN
- China
- Prior art keywords
- comment
- article
- content
- web page
- identifier
- 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
Classifications
-
- 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
-
- 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/972—Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of methods for the comment of web page article independence point of addition, it is characterized in that the position commented on for each in web page article, the identifier being made of one or several parts can directly or indirectly be provided and be known as location identifier, for identifying tissue to comment in this position can the comment that the location identifier is identified directly or indirectly be accessed according to location identifier in the location identifier.It comments on our the special positions that are known as of this comment being associated on a certain position.Pass through the above method, the comment of a certain content in web page article will be organized into where comment content or in neighbouring position, and it accesses from this position rather than enumerates comment content after web page article, the mode of this tissue comment, Content Organizing is set to obtain more orderly, comment is more targeted, significantly increases the exchange and interdynamic of Commentary Systems.
Description
Technical field
The present invention relates to a kind of methods of comment web page article, are commented especially for web page article independence point of addition
The method of opinion.
Background technology
Article is put into spread through the internet on web page be efficiently to share the mode of knowledge, such as news category website
With from media platform, and by Commentary Systems, reader can deliver the viewpoint of oneself for article content, preferably exchange and
It is interactive.But system as existing Commentary Systems or similar forum program, the comment delivered all are sequentially displayed at
After the article commented on, the specific aim of comment is not strong, interactive strong, also very chaotic on Content Organizing.For example, webpage
On have an article, reader has found wherein have one section of content wrong, and reader writes comment in order to point out its mistake, in comment area
And deliver, this comment is placed on behind article and is shown by existing system, for later reader, when he read it is wrong
That section of content when, he is not aware that for having the comment criticized in this core dumped, after he must run through entire article, reads
It just will appreciate that this is commented on when the subsequent comment of article, and he must also return in article, find this line by line
Comment on the wrong content to be criticized.In fact, this comments on the amendment proposed just for that core dumped content, one is considered
Under, if on the position of that core dumped content or nearby such as close to after wrong content position (this position according to
The difference that program is realized may specific present positions and statement it is upper and different, but being all can be from this position or its certain
The comment of tissue on this position is directly or indirectly accessed in a little aspect characteristics, this position is referred to as being commented on later
Position or Commentary Position) on do a similar " wrong contentLabel" as subscript label, just as the mark in papery books,
To indicate that there are a comments for the position at label place, when later reader reads this wrong content, it is seen that this marks him
It is known that this has a comment, is then operated by certain, for example click subscript label and open comment content, this tissue arrives phase
Although answering the comment on position and comment but our special referred to as position comments having corresponding close to express between comment and position
The meaning of system, the mode in comment tissue to article on corresponding position, the specific aim clear and definite of comment, because for identical
On the comment tissue to same position of content, so as to easily be compared, so its Content Organizing is more reasonable, exchange
Interactivity significantly enhances.It illustrates, passes through<sup>Although label and combining javascript codes we can make
Similar " wrong contentLabel" as subscript label, and by click label can open content, however, it is noted that this existing
Technical approach can not realize that the effect commented on, the text that this mode is realized independently are added in some position into web page article
Chapter webpage be by web page authors write once at, can not realize independently to be added on position thereto by later reader and comment
The effect of opinion.Our target seeks to be embodied as the comment of web page article independence point of addition.
Invention content
The invention mainly solves the technical problem of providing a kind of sides for the comment of web page article independence point of addition
Method, it can be accessed on the position commented in the comment tissue to webpage independently added by this position and be organized in
Comment on this position.
To solve the above problems, the technical solution that the present invention takes is, what each in web page article was commented on
Position, we directly or indirectly can construct the identifier being made of one or several parts for it and be known as station location marker
Symbol, the location identifier are used to identify tissue to comment in this position, and can be directly or indirectly according to location identifier
The comment that the location identifier is identified is accessed, for example one save location is set for the review record being saved in database
The field of identifier.
According to the above-mentioned method for the comment of web page article independence point of addition, it is characterized in that the position mark
Know symbol can by the globally unique identifier and dom tree of mark article on by Commentary Position path each node and character
The compound composition of index in the content of text character string of text node, wherein the index of element and text node be it
Index position in the childNodes attributes of father node.For example, article html codes are<article><p>This is the 1st
Paragraph</p><p>This is the 2nd paragraph</p></article>, digital " 2 " location identifier can be expressed as xxxxxx_1_3,
Wherein xxxxxx is the globally unique identifier of article.
The present invention significantly has the beneficial effect that:
(1) for by the comment tissue of comment content on by the position where comment content, in this way by comment content and
Being commented between comment is explicit with comment relationship, can finely be positioned in article by comment content, the needle of comment
To property enhancing;
(2) it is organized by several comments of comment content for same on position where the same content by comment,
Therefore the principle for meeting classification, classification comments on the sense of organization of content more orderly, rationally, have benefited from it is this orderly, it is rational in
Hold organizational form, the comment for the same content can put together and be compared, and be conducive to convey to reader so more complete
The information in face is conducive to reader and makes wiser, rational judgement, significantly enhances the exchange and interdynamic of Commentary Systems.
Description of the drawings
Fig. 1 is an a kind of preferred embodiment effect of method for the comment of web page article independence point of addition of the present invention
Figure;
1 in figure, the content commented on;2, comment label, it represents the position in comment tissue to article, indicates herein
There is position comment, comment can be accessed by clicking comment label (comment is shown in 6);3, certain position comment;4, certain
It comments on position;5, certain position comment;6, the container of receiving and display location comment
Specific implementation mode
Embodiment 1
Assuming that there is a web page article, HTML code be "<article><p>This is a web page article, this
It is first paragraph.</p><p>This is second paragraph of article.</p></article>", we are with close to after b characters
Position addition comment for, be described in detail realization method.
Position close to after " b ", we can also claim this position to be that can also claim this close to the position before " webpage "
A position is the positions b and other more address modes, no matter how we call or describe this position, in logic
On, this position and comment are associated, so we be uniformly called by Commentary Position or Commentary Position (be called by
Commentary Position is the position for describing to be commented in article, and it is to describe that position that comment is associated with to be called Commentary Position
Set), it wants that the comment for being added to this position can be accessed from the characteristic of this position or its some aspects, is commented to show
By the relevance between position, our special comments be referred to as that position is commented on, by analysis we it can be found that in itself, adding
Position comment seeks to realize the correspondence to comment by Commentary Position, as long as so we can be to being marked by Commentary Position
Know the characteristic for being formed and identifying the position, that is, location identifier is provided for each position, while from this characteristic
Position comment can be accessed in (location identifier), we, which are also achieved that, comments on for web page article independence point of addition
Method.
Present problem is how the position in mark articleHTML code be "<article><p>This is a web
Webpage article, this is first paragraph.</p><p>This is second paragraph of article.</p></article>" article, lift
For example, we identify this position " b " in " web ", our method be by dom tree to by each on the path of Commentary Position
The compound composition of index of a node, wherein the index of element and text node is its childNodes attribute in father node
In index position, be then index position of the character in content of text to some character index in text node, that
The identifier of this position is exactly 0_6, wherein 0 is the node of first p label in article label nodes
Index position in childNodes attributes, 6 be index positions of the character b in the context string of text node.In this way when
We say that being added on b characters when a comment refer to just adding comment on the position that identifier is 0_6, in order to indicate on b
Have comment we close to a subscript label is done after b characters, form is " bLabel", should we also say that, close to after b characters
The position addition in face is commented on and this location identifier can be using the location identifier of b characters, and corresponding html codes are then
For "<article><p>This is a web<sup>Label</sup>Webpage article, this is first paragraph.</p><p>This is
Second paragraph of article.</p></article>”.But identifier 0_6 can not identify the positions b of this article completely,
It only can be identified for that the positions b in this article, can also there is the location identifier of 0_6 in other articles.In order to solve this
A problem, we specify an article globally unique identifier to be set as xxxxxx for every article, for example use article html generations
The md5 values (it is approximate globally unique) of code, xxxxxx_0_6 is obtained with article globally unique identifier and 0_6 are compound, this
The positions identifier Ze Neng globally unique identifier b, it indicates the positions 0_6 in the article of xxxxxx marks.
After we have location identifier, how we are associated with this location identifier with the comment on this position
Get up.A kind of method being readily apparent that is that a save location is arranged for review record and identifies in comment storage to database
The field of symbol is set as location fields, when we need to check the comment of some position, it is only necessary to search in the database
Location field values are equal to the record of the location identifier.The mode of another special storage comment is comment
It stores in article web page code, it is characterized in being loaded with comment while loading webpage, for example 0_6 identifiers have one to comment
By, we can construct an object array, js codes it is similar " var comments=[..., { location:" 0_6 ",
content:Comment on content } ...] ", all comments are stored in an array, and the element of array is js objects, it includes one
A location fields are used to identify the position in article, and content fields are changed for storing comment content when storing comment
Corresponding article html codes, form are similar as follows
The object for looking for location fields to be equal to 0_6 in comments is only needed when searching position comment.This
Kind of mode seems when checking comment only needs 0_6 identifiers without with global uniqueness, but in fact, load article simultaneously
Comment data about this article is also loaded into webpage, is equivalent to the comment data to this article with article identifier
Primary globally unique mark has been done, has then been further searched for again by location fields specific to each position in article,
Its effect is also that globally unique mark is done to position.
It is further noted that can be to be made marks in client without changing article being made marks by Commentary Position
Content code needs, there are one all data by Commentary Position in record article, and according to this data to be existed in this case
Client render and is marked;Another situation is exactly synchronous vacations server end article content code, is inserted into the positions b
Comment, client do comment label, client article code become "<article><p>This is a web<sup>Label</
sup>Webpage article, this is first paragraph.</p><p>This is second paragraph of article.</p></article>", it is synchronous
Ground, server end also make modification.In addition, after being marked (abbreviation position mark) by Commentary Position, client article
DOM tree structure can change, and the location identifier directly obtained using the method above-mentioned for obtaining location identifier cannot be protected
It demonstrate,proves globally unique, it is necessary to first eliminate the influence of position mark.One simple method is first delete position label, obtains position
Position mark is added after identifier again.
Embodiment 2
It is similar following form that article HTML code, which does formatting and handles, and server end is arrived in storage.
The rule that we format is to distribute a unique number to img labels for it, and number is preserved by num attributes, and
Whether one c attribute of setting has the comment, content of text directly to include by span labels to identify the position, such as "<
p>One demonstration, content in addition</p>", in order to meet content of text by span labels directly include handle for "<p><
Span num=" 1 " c=" n ">One demonstration, content in addition</span></p>", why not replacing p labels directly is
Span is because p labels may carry special format such as 2 characters of first trip retraction, if directly replaced, article
Display effect of the html codes on the page is also just destroyed, then be each span labels distribute unique number, number by
Num attributes preserve and a c attribute are arranged to identify whether the position has comment;If contained in the content of text of span labels
Have ", ", ".”、“、”、“;" etc., then these symbols, which are used, as splitting symbol and done to content of text further splits and with span labels
Include by various pieces after fractionation, such as "<p><span>One demonstration, content in addition</span></p>" at fractionation
Be exactly after reason "<p><Span num=" 1 ">One demonstration,</span><Span num=" 2 ">Other content</span></
p>”。
As needed, formatting the principle of processing can modify, for example we use to each word of content of text
Span labels include and number.We why by content of text with ", ", ".”、“、”、“;" carried out as fractionation symbol
Split, be because article by it is several with ", ", ".”、“、”、“;" sentence that separates constitutes, this every words, which have, respective completely to be contained
Justice, we are also more likely in short make comments for certain, although may make comments once in a while for some word, this can be used
It is made comments for that sentence where this word to replace, the specific aim of comment can't be decreased obviously, for example, just
Web in " this is a web page article, " will be commented on by being us, and the mode of the strongest tissue comment of specific aim is that " this is one
Piece webMark 1Webpage article, ", it comments on tissue to the position of " mark 1 ", the mode of another kind tissue comment is that " this is one
Web page article,Mark 2", the comment for web is organized on the position of " mark 2 ", and the second way compares the first needle
Property is not decreased significantly, but the second way namely Commentary Position is arranged for every words in we rather than each word is set
The complexity of our process problems can be significantly reduced by setting Commentary Position but.
It, can be by mark article by the location identifier of Commentary Position after having done formatting processing to HTML code
The mode of globally unique identifier+num attribute values (number) is constituted, such as " this is a web page article, ", its position
Mark can be expressed as xxxxxx_1, and this mode is equivalent to the position to each character in " this is a web page article, "
It sets and is all identified with the same location identifier xxxxxx_1, also therefore wherein " b " character position or " net " position are delivered and commented
By being all on tissue to the positions xxxxxx_1, so there is respective different identifier in the relatively each position of specific aim of comment
It is achieved in that decline, but the decline of this specific aim does not significantly make the complexity of process problem be remarkably decreased.Client
End will obtain Commentary Position, the content in click location, then handle click event, pass through
Event.target.getAttribute (" num ") code a bit of in this way can get num attribute values, then with mark
The globally unique identifier of article is compound to obtain location identifier.
It makes comments, for example on the positions xxxxxx_1, we are stored to comment in database, and comments on some position
Location fields are set as with a field to preserve by the location identifier on Commentary Position, pass through inquiry in this way by record
Location fields we can also find the comment on specific position.Meanwhile according to article globally unique identifier, we
The data of article can be viewed in server end, if article is also stored in database and article record content field
For content, it preserves the html codes of article, we obtain html code character strings, further according to num attribute values to html generations
Code character string executes a content and replaces, and " num=" 1 " c=" n " " is replaced with " num=" 1 " c=" y " ", then be stored back to data
Library, after the completion of such client loads article, we can have comment according to the value js codes of each node c attributes
Position renders label.
Claims (2)
1. for the method for web page article independence point of addition comment, it is characterized in that being commented on for each in web page article
Position, can directly or indirectly provide the identifier being made of one or several parts and be known as location identifier, the position
For identifying tissue to comment in this position can the position directly or indirectly be accessed according to location identifier in identifier
Set the comment that identifier is identified.
2. the method according to claim 1 for the comment of web page article independence point of addition, it is characterized in that the position
Identifier can by the globally unique identifier and dom tree of mark article on by Commentary Position path each node and word
Accord with the compound composition of index in the content of text character string of text node, wherein the index of element and text node is it
Index position in the childNodes attributes of father node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711235088.5A CN108460069A (en) | 2017-11-22 | 2017-11-22 | For the method for web page article independence point of addition comment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711235088.5A CN108460069A (en) | 2017-11-22 | 2017-11-22 | For the method for web page article independence point of addition comment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108460069A true CN108460069A (en) | 2018-08-28 |
Family
ID=63221132
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711235088.5A Pending CN108460069A (en) | 2017-11-22 | 2017-11-22 | For the method for web page article independence point of addition comment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108460069A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111898336A (en) * | 2020-09-30 | 2020-11-06 | 拼说说(深圳)网络科技有限公司 | Bullet screen display method and device, computer equipment and storage medium |
CN112800078A (en) * | 2021-02-04 | 2021-05-14 | 北京明略软件系统有限公司 | Lightweight text labeling method, system, equipment and storage medium based on javascript |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101196918A (en) * | 2007-12-27 | 2008-06-11 | 腾讯科技(深圳)有限公司 | Paging method and paging device |
US20120158753A1 (en) * | 2010-12-15 | 2012-06-21 | He Ray C | Comment Ordering System |
CN104504131A (en) * | 2014-12-31 | 2015-04-08 | 广州爱书旗信息技术有限公司 | Method and device for realizing user comments based on lineation as well as terminal device and system |
CN104571818A (en) * | 2014-12-26 | 2015-04-29 | 网易(杭州)网络有限公司 | Method and device for displaying article comments |
CN104820704A (en) * | 2015-05-12 | 2015-08-05 | 东南大学 | Creating method and browsing method for inline marked comment of web text |
CN105404669A (en) * | 2015-11-12 | 2016-03-16 | 广州神马移动信息科技有限公司 | Method, apparatus, terminal and server for displaying webpage comment |
CN106407199A (en) * | 2015-07-27 | 2017-02-15 | 广州市动景计算机科技有限公司 | Network article comment processing method and apparatus |
CN107180041A (en) * | 2016-03-09 | 2017-09-19 | 广州市动景计算机科技有限公司 | Web page content review method and system |
-
2017
- 2017-11-22 CN CN201711235088.5A patent/CN108460069A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101196918A (en) * | 2007-12-27 | 2008-06-11 | 腾讯科技(深圳)有限公司 | Paging method and paging device |
US20120158753A1 (en) * | 2010-12-15 | 2012-06-21 | He Ray C | Comment Ordering System |
CN104571818A (en) * | 2014-12-26 | 2015-04-29 | 网易(杭州)网络有限公司 | Method and device for displaying article comments |
CN104504131A (en) * | 2014-12-31 | 2015-04-08 | 广州爱书旗信息技术有限公司 | Method and device for realizing user comments based on lineation as well as terminal device and system |
CN104820704A (en) * | 2015-05-12 | 2015-08-05 | 东南大学 | Creating method and browsing method for inline marked comment of web text |
CN106407199A (en) * | 2015-07-27 | 2017-02-15 | 广州市动景计算机科技有限公司 | Network article comment processing method and apparatus |
CN105404669A (en) * | 2015-11-12 | 2016-03-16 | 广州神马移动信息科技有限公司 | Method, apparatus, terminal and server for displaying webpage comment |
CN107180041A (en) * | 2016-03-09 | 2017-09-19 | 广州市动景计算机科技有限公司 | Web page content review method and system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111898336A (en) * | 2020-09-30 | 2020-11-06 | 拼说说(深圳)网络科技有限公司 | Bullet screen display method and device, computer equipment and storage medium |
CN112800078A (en) * | 2021-02-04 | 2021-05-14 | 北京明略软件系统有限公司 | Lightweight text labeling method, system, equipment and storage medium based on javascript |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2610208C (en) | Learning facts from semi-structured text | |
US7765236B2 (en) | Extracting data content items using template matching | |
US9740698B2 (en) | Document merge based on knowledge of document schema | |
US20080288640A1 (en) | Automated tagging of syndication data feeds | |
CN105630938A (en) | Intelligent question-answering system | |
CN100444591C (en) | Method for acquiring front-page keyword and its application system | |
WO2014169334A1 (en) | Methods and systems for improved document comparison | |
US20190179958A1 (en) | Split mapping for dynamic rendering and maintaining consistency of data processed by applications | |
CN101091181A (en) | Saving and restoring an interlocking trees datastore | |
US7720814B2 (en) | Repopulating a database with document content | |
US7370060B2 (en) | System and method for user edit merging with preservation of unrepresented data | |
CN104598625A (en) | Data table storage method based on automatic identification identifier | |
US20090024616A1 (en) | Content retrieving device and retrieving method | |
CN104169912A (en) | Information processing terminal and method, and information management apparatus and method | |
CN108460069A (en) | For the method for web page article independence point of addition comment | |
CN115168401A (en) | Data grading processing method and device, electronic equipment and computer readable medium | |
CN104699664B (en) | The composing system and method for a kind of template independence | |
Dashrath | Role of metadata in digital resource management | |
Sirsat et al. | Pattern matching for extraction of core contents from news web pages | |
Putra et al. | BudayaKB: Extraction of cultural heritage entities from heterogeneous formats | |
CN106611022A (en) | Method and device for increasing website search efficiency | |
US7991756B2 (en) | Adding low-latency updateable metadata to a text index | |
Arolas et al. | Uses of explicit and implicit tags in social bookmarking | |
US20100185652A1 (en) | Multi-Dimensional Resource Fallback | |
US20080033953A1 (en) | Method to search transactional web pages |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180828 |
|
WD01 | Invention patent application deemed withdrawn after publication |