This application claims priority to Taiwanese Patent Application No. 104116872 filed on May 26, 2015, the contents of which are incorporated by reference herein.
The subject matter herein generally relates to internet field, especially relates to a method and a system for classifying comment record and a webpage management device.
Nowadays, with the development of the Internet, an increasing number of people communicate with each other on the Internet. For example, for some popular videos on a video website, many people from different countries can discuss and express their opinions about the videos via a comment area of the video website. However, as people from different countries have different languages, it is difficult for people to achieve effective communication and get value advice from videos.
Many aspects of the disclosure can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the disclosure.
Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. Also, the description is not to be considered as limiting the scope of the embodiments described herein. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features of the present disclosure.
The present disclosure, including the accompanying drawings, is illustrated by way of example and not by way of limitation. Several definitions that apply throughout this disclosure will now be presented. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
The term “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules can be embedded in firmware, such as in an EPROM. The modules described herein can be implemented as either software and/or hardware modules and can be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives. The term “comprising” means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series and the like.
The system 1 is used to detect the language of the browser 50 and acquire the comment records 23 related to the webpage content 22 of the webpage file 2, when the webpage file 2 is accessed by the browser 50. The system 1 is further used to select the comment records 23 whose languages match with the language of the browser 50 and display the selected comment records 23 in the comment display area 21 of the webpage file 2.
In at least one embodiment, the storage device 30 can include various types of non-transitory computer-readable storage mediums. For example, the storage device 30 can be an internal storage system, such as a flash memory, a random access memory (RAM) for temporary storage of information, and/or a read-only memory (ROM) for permanent storage of information. The storage device 30 can also be an external storage system, such as a hard disk, a storage card, or a data storage medium. The at least one processor 40 can be a central processing unit (CPU), a microprocessor, or other data processor chip that performs functions of the system 1 for classifying the comment record 23 in the webpage management device 100.
The detecting module 101 is used to detect the language of the browser 50 used to access to the webpage file 2 when the webpage file 2 is accessed by the browser 50. In at least one embodiment, the detecting module 101 detects language coding of the browser 50 used to access the webpage file 2 via the “navigator.userlanguage” instruction in the JavaScript of the browser 50. The detecting module 101 then determines the language of the browser 50 according to the detected language coding of the browser 50. Therein, the language coding of the browser 50 includes language information and regional mark information of the browser 50. For example, when the detecting module 101 detects that the language coding of the browser 50 is “zh-TW” according to the “navigator.userlanguage” instruction in the JavaScript of the browser 50, therein, “zh” is the language information of the browser 50, “TW” is the regional mark information of the browser 50; the detecting module 101 determines the language information of the browser 50 is “zh” and the regional mark information is “TW”.
The selecting module 102 is used to acquire the comment records 23 related to the webpage content 22 of the webpage file 2 and the language identifier of each one comment record 23. The selecting module 102 further determines the language of each comment record 23 according to the acquired language identifier of each comment record 23 and the relationships between the number of the languages and the number of language identifiers defined in the relationship table 70. Then the selecting module 102 selects the comment records 23, whose language match with the language of the browser 50, from all of the acquired comment records 23.
In at least one embodiment, when the browser 50 is used to access the webpage file 2 and issue a comment record 23 in the comment display area 21 of the webpage file 2, a language identifier corresponding to the language of the browser 50 will be added to the issued comment record 23. When the detecting module 101 detects the language of the browser 50 used to access the webpage file 2 is Chinese, the selecting module 102 acquires the comment records 23 related to the webpage content 22 of the webpage file 2 and the language identifier of each comment record 23, determines the language of each comment record 23 according to the acquired language identifier of each one comment record 23 and the stored relationship table 70, and selects the comment records 23 whose language is Chinese from all of the acquired comment records 23.
The display module 103 is used to display the comment records 23 selected by the selecting module 102 in the comment display area 21 of the webpage file 2. In the at least one embodiment, the display module 103 is also used to sort the comment records 23 selected by the selecting module 102 in a predetermined sorting principle and display the comment records 23 in the comment display area 21 of the webpage file 2 according to the predetermined sorting principle. In at least one embodiment, the predetermined sorting principle is to sort the comment records 23 based on a hot degree of the comment records 23. Therein, the higher hot degree the comment record 23 has, the higher the comment record 23 is displayed in the comment display area 21 of the webpage file 2. The hot degree of the comment record 23 can be determined by a reply number or a vote number of the comment record 23. Therein, the more replies or votes the comment record has, the higher hot degree the comment record 23 has. In other embodiments, the predetermined sorting principle is to sort the comment records 23 based on issued time of the comment records 23. Therein, the earlier the issued time of the comment record 23 is, the higher the comment record 23 is displayed in the comment display area 21 of the webpage file 2.
In at least one embodiment, when the selecting module 102 acquires the comment records 23 related to the webpage content 22 of the webpage file 2 and determines the language of each comment record 23, the selecting module 102 further classifies the acquired comment records 23 according to the languages of the comment records 23. The display module 103 further displays the comment records 23 whose language is the same as a language selected by the user in the comment display area 21 of the webpage file 2 in response to an operation to select the language of the comment records 23. Therefore, the user can choose to display the comment records 23 with a certain language in the comment display area 21 of the webpage file 2 according to requirement and preference.
Please refer back to
In at least one embodiment, when the display module 103 displays all of the comment records 23 related to the webpage content 22 of the webpage file 2 in the comment display area 21 in response to the operation of selecting the All language option 213, the display module 103 further displays all of the comment records 23 related to the webpage B of the webpage file 2 on different display blocks 210 in the comment display area 21 according to the language of the comment records 23.
The addition module 104 is used to acquire the comment record 23 issued by the user in the comment display area 21 of webpage file 2 when the browser 50 is used to access the webpage file 2, and determine a language identifier corresponding to the language of the browser 50 according to the language detected by the detecting module 101 and the stored relationship table 70. The addition module 104 further adds the determined language identifier to the acquired comment records 23.
In at least one embodiment, when the browser 50 is used to access the webpage file 2, the addition module 104 is used to add a regional mark 230 to the comment record 23 issued by the user via the browser 50, the display module 103 further displays the comment record 23 selected by the selecting module 102 and the regional mark 230 corresponding to the comment record 23 in the comment display area 21 of the webpage file 2. In detail, as mentioned before, the detecting module 101 is able to determine the language information and regional mark information of the browser 50 via the “navigator.userlanguage” instruction in the JavaScript of the browser 50. The addition module 104 adds the regional mark 230 determined by the detecting module 101 to the comment record 23. The display module 102 displays the comment record 23 and the regional mark 230 corresponding to the comment record 23 in the comment display area 21 of the webpage file 2.
At block 301, a detecting module detects a language of a browser used to access to a webpage file when the webpage file is accessed by the browser. Therein, the webpage file includes a comment display area and webpage content, the comment display area is used to display a number of comment records related to the webpage content of the webpage file, each comment record corresponds to a language identifier. In at least one embodiment, the detecting module detects language coding of the browser used to access the webpage file via the “navigator.userlanguage” instruction in the JavaScript of the browser. The detecting module then determines the language of the browser according to the detected language coding of the browser. Therein, the language coding of the browser includes language information and regional mark information of the browser.
At block 302, a selecting module acquires the comment records related to the webpage content of the webpage file and the language identifier of each one comment record, determines the language of each comment record according to the acquired language identifier of each comment record and the relationships between a number of the languages and a number of language identifiers defined in a relationship table, and selects the comment records, whose language match with the language of the browser, from all of the acquired comment records. In at least one embodiment, when the browser is used to access the webpage file and issue a comment record in the comment display area of the webpage file, a language identifier corresponding to the language of the browser will be added to the issued comment record.
At block 303, a display module displays the comment records selected by the selecting module in the comment display area of the webpage file. In at least one present embodiment, the display module sorts the comment records selected by the selecting module in a predetermined sorting principle and displays the comment records in the comment display area of the webpage file according to the predetermined sorting principle. In at least one embodiment, the predetermined sorting principle is to sort the comment records based on a hot degree of the comment records. Therein, the higher hot degree the comment record has, the higher the comment record is displayed in the comment display area of the webpage file. The hot degree of the comment record can be determined by a reply number or a vote number of the comment record. Therein, the more replies or votes the comment record has, the higher hot degree the comment record has.
The method further includes: when the selecting module acquires the comment records related to the webpage content of the webpage file and determines the language of each comment record, the selecting module further classifies the acquired comment records according to the languages of the comment records; the display module further displays the comment records whose language is the same as a language selected by the user in the comment display area of the webpage file in response to an operation to select the language of the comment records.
In at least one embodiment, the display module displays a number of language options corresponding to the comment records related to the webpage content of the webpage file. The number of language options at least include a Chinese option, an English option and an All language option. The display module displays the comment records corresponding to the language selected by the user via operating one language option in the comment display area of the webpage file.
The method further includes: when the display module displays all of the comment records related to the webpage content of the webpage file in the comment display area in response to the operation of selecting the All language option, the display module further displays all of the comment records related to the webpage of the webpage file on different display blocks in the comment display area according to the languages of the comment records. Therein, each display block corresponds to one language, the display module displays the comment records with one language in the display block corresponding to the language.
The method further includes: when the browser is used to access the webpage file, an addition module acquires the comment record issued by the user in the comment display area of webpage file, determines a language identifier corresponding to the language of the browser according to the language of the browser detected by the detecting module and the stored relationship table, and adds the determined language identifier to the acquired comment records.
In at least one embodiment, the method further includes: the addition module further adds a regional mark to the comment record issued by the user via the browser, the display module further displays the comment record selected by the selecting module and the regional mark corresponding to the comment record in the comment display area of the webpage file.
It should be emphasized that the above-described embodiments of the present disclosure, including any particular embodiments, are merely possible examples of implementations, set forth for a clear understanding of the principles of the disclosure. Many variations and modifications can be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
104116872 | May 2015 | TW | national |