Webpage content generation method and device based on personalized format package
By compressing the data and format information in the webpage content generation method, a personalized format package is generated, which solves the problem of low efficiency in personalized content display in existing technologies and achieves fast and efficient personalized content display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN KUAIYINKE E-COMMERCE CO LTD
- Filing Date
- 2022-06-20
- Publication Date
- 2026-04-21
AI Technical Summary
Existing methods and devices for generating web page content have low efficiency in displaying personalized content, requiring the download of multiple font packages and a complex update process, which leads to increased data consumption and waiting time.
By compressing data and formatting information, a personalized format package is generated, which can be used to quickly generate content display web pages, reduce the storage of duplicate data and formatting information, and improve display efficiency.
The personalized format package is small in size and easy to install, which improves the display efficiency of personalized content and solves the problem of low display efficiency of personalized content in existing technologies.
Smart Images

Figure CN115795142B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent with application number "202201696738.0", application date "2022.06.20", and title "Web page content generation method, apparatus and computer-readable storage medium". Technical Field
[0002] This invention relates to the Internet field, and in particular to a method, apparatus and computer-readable storage medium for generating web page content. Background Technology
[0003] With the rapid development of internet technology, online content is becoming increasingly rich and diverse, and users' demands for online content are becoming more and more personalized and diversified.
[0004] Fonts are the basic carriers of various information in internet content. When editing various internet information, users will choose some highly personalized fonts in order to highlight a certain subject. This not only makes the internet content eye-catching, but also highlights the key points of the content, making it easy for people to understand at a glance.
[0005] However, under the current content display technology environment, to achieve personalized font display of Internet content, it is necessary to download and install the corresponding font package into the system. Since there are many types of fonts, many font packages need to be downloaded, and the update process is complicated. When users browse the above-mentioned personalized content, they need to consume a lot of data and wait for the font package to be installed.
[0006] Therefore, there is a need to propose a web page content generation method, a web page content generation device, and a computer-readable storage medium that can improve the display efficiency of personalized content. Summary of the Invention
[0007] This invention provides a web page content generation method and apparatus that can improve the display efficiency of personalized content, thereby solving the technical problem of low display efficiency of personalized content in existing web page content generation methods and apparatuses.
[0008] This invention provides a method for generating web page content, comprising:
[0009] Determine the content to be displayed, and obtain the data information of the content to be displayed and the format information corresponding to the data information;
[0010] The data and format information are compressed.
[0011] The compressed data and format information are compiled into a personalized format package; and
[0012] Based on the displayed content and the personalized format package, a content display webpage is generated.
[0013] In the webpage content generation method described in this embodiment of the invention, the step of compressing the data information and format information includes:
[0014] Set n to 1;
[0015] Obtain the nth data information of the displayed content;
[0016] Compare whether the nth data information is the same as the stored data information.
[0017] If they are different, the nth data information and its corresponding format information are stored, and the stored data information is updated.
[0018] If they are the same, then obtain the format information corresponding to the nth data information, and compare whether the format information corresponding to the nth data information is the same as the format information corresponding to the same stored data information;
[0019] If they are different, the nth data information and its corresponding format information are stored, and the format information corresponding to the stored data information is updated.
[0020] If they are the same, then the nth data information and its corresponding format information will be deleted.
[0021] If n = n + 1, return to the step of obtaining the nth data information of the displayed content until all data information of the displayed content is obtained.
[0022] In the webpage content generation method described in this embodiment of the invention, the step of updating the stored data information includes:
[0023] Obtain the format information corresponding to the adjacent data information of the stored data information. If the format information corresponding to the adjacent data information of the stored data information is the same as the format information corresponding to the stored data information, then update the stored data information.
[0024] If the format information corresponding to adjacent data information of the stored data information is different from the format information corresponding to the stored data information, then both the stored data information and the format information corresponding to the stored data information are updated simultaneously.
[0025] In the webpage content generation method described in this embodiment of the invention, the step of simultaneously updating the stored data information and the format information corresponding to the stored data information includes:
[0026] An additional code is set for the stored data information to distinguish it from other stored data information;
[0027] Set the corresponding format information for stored data information that has been assigned an additional code.
[0028] In the webpage content generation method described in this embodiment of the invention, the step of updating the format information corresponding to the stored data information includes:
[0029] Update the stored data information according to the format information corresponding to the stored data information.
[0030] In the webpage content generation method described in this embodiment of the invention, the step of updating the stored data information according to the format information corresponding to the stored data information is as follows:
[0031] The stored data information is categorized according to format information, and an additional code is set for the first stored data information in each category;
[0032] Set the corresponding format information for stored data information that has been assigned an additional code.
[0033] The present invention also provides a web page content generation apparatus, comprising:
[0034] The information acquisition module is used to determine the content to be displayed and to acquire the data information of the content to be displayed and the format information corresponding to the data information;
[0035] An information compression module is used to compress the data information and format information.
[0036] The format package creation module is used to create personalized format packages from compressed data and formatting information; and
[0037] The webpage generation module is used to generate a content display webpage based on the displayed content and the personalized format package.
[0038] In the webpage content generation apparatus described in this embodiment of the invention, the information compression module includes:
[0039] A data information acquisition unit is used to acquire the nth data information of the displayed content;
[0040] A comparison unit is used to compare whether the nth data information is the same as the stored data information; if they are different, the nth data information and its corresponding format information are stored, and the stored data information is updated; if they are the same, the format information corresponding to the nth data information is obtained, and the format information corresponding to the nth data information is compared with the format information corresponding to the same stored data information; if they are different, the nth data information and its corresponding format information are stored, and the stored format information is updated; if they are the same, the nth data information and its corresponding format information are deleted.
[0041] The loop unit is used to return to the data information acquisition unit until all data information of the displayed content is acquired.
[0042] In the webpage content generation apparatus described in this embodiment of the invention, the comparison unit includes:
[0043] The first update subunit is used to obtain the format information corresponding to the adjacent data information of the stored data information. If the format information corresponding to the adjacent data information of the stored data information is the same as the format information corresponding to the stored data information, then the stored data information is updated.
[0044] The second update subunit is used to obtain the format information corresponding to the adjacent data information of the stored data information. If the format information corresponding to the adjacent data information of the stored data information is different from the format information corresponding to the stored data information, then the stored data information and the format information corresponding to the stored data information are updated simultaneously.
[0045] The present invention also provides a computer-readable medium storing processor-executable instructions, which are loaded by one or more processors to perform the web page content generation method of the preceding claims.
[0046] Compared with the prior art, the web page content generation method, apparatus and computer-readable storage medium of the present invention generate corresponding content display web pages through personalized format packages. Since the personalized format packages are small in size, easy to install and highly targeted to personalized content, they can effectively improve the display efficiency of personalized content on web pages and effectively solve the technical problem of low display efficiency of personalized content in existing web page content generation methods and apparatuses. Attached Figure Description
[0047] Figure 1 A flowchart illustrating an embodiment of the webpage content generation method of the present invention;
[0048] Figure 2 A flowchart of step S102 of an embodiment of the web page content generation method of the present invention;
[0049] Figure 3 This is a schematic diagram of the structure of an embodiment of the web page content generation device of the present invention;
[0050] Figure 4 This is a flowchart illustrating the webpage content generation process of the webpage content generation method and apparatus of the present invention.
[0051] Figure 5 This is a schematic diagram illustrating the webpage content generation method and webpage content generation device of the present invention.
[0052] Figure 6 This is a schematic diagram of the working environment structure of the device in which the web page content generation apparatus of the present invention is located. Detailed Implementation
[0053] Please refer to the diagrams, where the same component symbols represent the same components. The principles of the invention are illustrated by way of example implementation in a suitable computing environment. The following description is based on the illustrative specific embodiments of the invention and should not be construed as limiting the invention to other specific embodiments not detailed herein.
[0054] In the following description, specific embodiments of the invention will be illustrated with reference to the steps and symbols of operations performed by one or more computers, unless otherwise stated. Thus, it will be understood that these steps and operations, which are repeatedly mentioned as being performed by a computer, include manipulation by a computer processing unit representing electronic signals of data in a structured format. This manipulation transforms the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise alter the operation of the computer in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the invention are described above and are not intended to be limiting; those skilled in the art will understand that many of the steps and operations described below can also be implemented in hardware.
[0055] The webpage content generation method and apparatus of the present invention can be installed in any electronic device for rapid and efficient personalized display of remotely displayed content. Such electronic devices include, but are not limited to, wearable devices, head-mounted devices, healthcare platforms, personal computers, server computers, handheld or laptop devices, mobile devices (such as mobile phones, personal digital assistants (PDAs), media players, etc.), multiprocessor systems, consumer electronics devices, minicomputers, mainframe computers, distributed computing environments including any of the aforementioned systems or devices, etc.
[0056] The electronic device is preferably a server terminal that provides personalized content web pages to users. This invention generates corresponding content display web pages by setting personalized format packages, which can effectively improve the display efficiency of personalized content on web pages and effectively solve the technical problem of low display efficiency of personalized content in existing web page content generation methods and devices.
[0057] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the webpage content generation method of the present invention. The webpage content generation method of this embodiment can utilize the aforementioned electronic device. The webpage content generation method of this embodiment includes:
[0058] Step S101: Determine the content to be displayed, and obtain the data information of the content to be displayed and the format information corresponding to the data information;
[0059] Step S102: Compress the data and format information;
[0060] Step S103: Compress the data and format information into a personalized format package;
[0061] Step S104: Generate a content display webpage based on the display content and the personalized format package.
[0062] The following details the specific process of each step in the webpage content generation method of this embodiment.
[0063] In step S101, the electronic device (such as a server terminal) acquires the content to be displayed and sends it to a remote personal terminal for display. This content can be web page content with text in different formats or rendering effects.
[0064] After the electronic device determines the corresponding display content, in order to ensure that the display content can be effectively displayed on a remote personal terminal, it needs to continue to acquire the data information of the display content and the corresponding format information of the data information.
[0065] The data information displayed refers to the text information of the displayed content. For example, if the displayed content is "**Limited Liability Company", then the data information is "**Limited Liability Company".
[0066] The format information of the displayed content refers to the format information corresponding to the text information of the displayed content. For example, in "**Limited Liability Company", the word "Company" is in red KaiTi font size 2, and the other words are in black KaiTi font size 4.
[0067] In step S102, the electronic device compresses the data and format information obtained in step S101.
[0068] Please refer to the detailed compression process. Figure 2 , Figure 2 This is a flowchart of step S102 of an embodiment of the webpage content generation method of the present invention. Step S102 includes:
[0069] Step S201: Set the loop counter n and set n to 1;
[0070] Step S202: Obtain the nth data information of the displayed content; the displayed content may include multiple data information, such as the product display webpage content including product function introduction information, product manufacturer information, and customer feedback information.
[0071] In order to effectively display the above data information and its corresponding format information, it is necessary to store the data information and format information of the content to be displayed separately.
[0072] In step S203, since the newly acquired data information may be the same as the previously stored data information, it is only necessary to store the data information once. Subsequently, the stored data information can be retrieved directly using a preset identifier.
[0073] Therefore, in this step, the electronic device compares the nth data information obtained in step S202 with the data information already stored in the electronic device. If they are different, proceed to step S204; if they are the same, proceed to step S205.
[0074] In step S204, if the nth data information is different from the stored data information, the electronic device performs a storage operation on the nth data information and its corresponding format information, and updates the stored data information.
[0075] Specifically, when an electronic device updates stored data, since the format information corresponding to adjacent data information is likely to be the same, the format information corresponding to the adjacent data information of the stored data information can be directly used to store the format information corresponding to the stored data information.
[0076] Therefore, electronic devices will obtain the format information corresponding to the adjacent data information of the stored data information. If the format information corresponding to the adjacent data information of the stored data information is the same as the format information corresponding to the stored data information, the electronic device will only update the stored data information.
[0077] If the format information corresponding to the adjacent data information of the stored data information is different from the format information corresponding to the stored data information, then the format information of the stored data information cannot be updated using the format information corresponding to the adjacent data information of the stored data information. Therefore, the electronic device updates the stored data information and the format information corresponding to the stored data information simultaneously.
[0078] Furthermore, when the electronic device updates both the stored data and its corresponding format information simultaneously, it can assign an additional code to the stored data to distinguish it from other stored data, such as adjacent data. The electronic device then applies the corresponding format information to the stored data with the additional code to ensure proper reading of both the data and its format.
[0079] In step S205, if the nth data information is the same as the stored data information, the electronic device compares the format information corresponding to the nth data information with the format information corresponding to the same stored data information. If they are different, proceed to step S206; if they are the same, proceed to step S207.
[0080] Step S206: If the format information corresponding to the nth data information is different from the format information corresponding to the same stored data information, the electronic device performs a storage operation on the nth data information and its corresponding format information, and updates the format information corresponding to the stored data information.
[0081] Specifically, when updating format information, the electronic device will update the stored data information according to the format information corresponding to the stored data information, so that data information with the same format information can be stored continuously.
[0082] Specifically, electronic devices can categorize stored data based on format information and assign an additional code to the first stored data in each category; subsequently, the electronic device sets the corresponding format information for the stored data with the additional code. This allows all data to be represented with minimal format information.
[0083] Step S207: If the format information corresponding to the nth data information is the same as the format information corresponding to the same stored data information, since the data information and format information of the nth data information are already included in the stored data information, it is not necessary to save the nth data information and its corresponding format information to ensure that the display content corresponding to the nth data information can be displayed normally. Therefore, the electronic device deletes the nth data information and its corresponding format information.
[0084] In step S208, increment the loop count n by 1, i.e., n = n + 1. The electronic device returns to step S202 to obtain other data information and corresponding format information of the display content, until all data information and format information of the display content are obtained.
[0085] In step S103, the electronic device compresses the data and format information processed in step S102 into a personalized format package, and can send the personalized format package and the corresponding display content to the remote personal terminal.
[0086] In step S104, the remote personal terminal first installs a personalized format package, and then displays the content based on the content of the personalized format package, generating a corresponding content display webpage.
[0087] This completes the webpage content generation process of the webpage content generation method in this embodiment.
[0088] The webpage content generation method in this embodiment generates corresponding content display webpages through personalized format packages. Since the personalized format packages are small in size, easy to install, and highly targeted to personalized content, they can effectively improve the display efficiency of personalized webpage content on remote personal terminals.
[0089] The present invention also provides a web page content generation device, please refer to... Figure 3 , Figure 3 This is a schematic diagram of the structure of an embodiment of the web page content generation device of the present invention. The web page content generation device of this embodiment can be implemented using the web page content generation method described above. The web page content generation device 30 of this embodiment includes an information acquisition module 31, an information compression module 32, a format package creation module 33, and a web page generation module 34.
[0090] The information acquisition module 31 is used to determine the content to be displayed and to acquire the data information of the content to be displayed and the corresponding format information; the information compression module 32 is used to compress the data information and the format information; the format package creation module 33 is used to create a personalized format package from the compressed data information and the format information; and the webpage generation module 34 is used to generate a content display webpage based on the content to be displayed and the personalized format package.
[0091] The information compression module 32 includes a data information acquisition unit, a comparison unit, and a loop unit.
[0092] The data acquisition unit is used to acquire the nth data information of the displayed content; the comparison unit is used to compare whether the nth data information is the same as the stored data information; if they are different, the nth data information and its corresponding format information are stored, and the stored data information is updated; if they are the same, the format information corresponding to the nth data information is acquired, and the format information corresponding to the nth data information is compared with the format information corresponding to the same stored data information; if they are different, the nth data information and its corresponding format information are stored, and the stored format information is updated; if they are the same, the nth data information and its corresponding format information are deleted; the loop unit is used to return to the data acquisition unit until all data information of the displayed content is acquired.
[0093] When the web page content generation device 30 of this embodiment is used, the information acquisition module 31 first acquires the display content so as to send it to a remote personal terminal for content display. The display content can be web page content with text in different formats or rendering effects.
[0094] Subsequently, the information compression module 32 compresses the acquired data and format information.
[0095] Specifically, the data acquisition unit acquires the nth data information of the displayed content, where n is the loop counter; the comparison unit compares whether the nth data information is the same as the stored data information; if they are different, the nth data information and its corresponding format information are stored, and the stored data information is updated using the first update subunit and the second update subunit; if they are the same, the format information corresponding to the nth data information is acquired, and the format information corresponding to the nth data information is compared whether it is the same as the format information corresponding to the same stored data information; if they are different, the nth data information and its corresponding format information are stored, and the format information corresponding to the stored data information is updated; if they are the same, the nth data information and its corresponding format information are deleted; finally, the loop unit increments the loop counter by 1 and returns to the data acquisition unit until all data information of the displayed content is acquired.
[0096] Then, the format package creation module 33 creates a personalized format package from the compressed data and format information, and can send the personalized format package and the corresponding display content to the remote personal terminal.
[0097] Finally, the webpage generation module 34 first installs the personalized format package, and then displays the content based on the content of the personalized format package, generating the corresponding content display webpage.
[0098] This completes the web page content generation process of the web page content generation device 30 in this embodiment.
[0099] The working principle of the web page content generation device in this embodiment is the same as or similar to that in the embodiments of the web page content generation method described above. For details, please refer to the relevant descriptions in the embodiments of the web page content generation method described above.
[0100] The web page content generation device in this embodiment generates corresponding content display web pages through personalized format packages. Since the personalized format packages are small in size, easy to install, and highly targeted to personalized content, they can effectively improve the display efficiency of personalized web page content on remote personal terminals.
[0101] The working principle of the webpage content generation method and webpage content generation device of the present invention is illustrated below through a specific embodiment. Please refer to [link / reference needed] for details. Figure 4 , Figure 4 This is a flowchart illustrating the webpage content generation process of the webpage content generation method and apparatus of the present invention.
[0102] The webpage content generation device of the present invention is installed in a server terminal that provides personalized content webpages. The process of the server terminal generating content display webpages includes:
[0103] Step S401: The server terminal determines the content to be displayed on the remote user terminal. This content includes data information and corresponding format information, such as... Figure 5 As shown, the format information of the text information (data information) in the enterprise name field 51, the format information of the text information in the enterprise guide field 52, and the format information of the text information in the enterprise content field 53 are all different.
[0104] In order for remote user terminals to effectively display the text information in the company name field 51, company guide field 52, and company content field 53, the server terminal needs to obtain all data information and corresponding format information for the company name field 51, company guide field 52, and company content field 53. For example, the data information for "Domestic Professional QR Code Application Solution Service Provider" and its corresponding 5-point Song typeface format, and the data information for "Marketing Cases" and its corresponding 5-point Hei typeface format, etc.
[0105] In step S402, the server terminal compresses the data and format information.
[0106] Specifically, a TrueType font library is used here to store the outline information of the text, and the outline information of the text corresponds one by one with the text in the data information. The outline of the text and the text format can be stored and identified in the JOSN (JavaScript Object Notation, JS object notation) format. Since JSON is a lightweight data interchange format and JSON itself does not carry any tag information, the format is compressed and has a small bandwidth occupancy.
[0107] Using the JSON format to store the text content and text format is more convenient for storage and fast retrieval.
[0108] For example, the specific content of the FZ Hei Jian font of the Chinese character "快" saved in the JSON format is: {"ha":1389,"x_min":54,"x_max":1351,"o":"m 651 586q 532 863 602 727q 494 846 526863q 434 814 450 819l 434 1020q 445 1085 434 1058q 445 1096 445 1090q 3631112 456 1118l 282 1112l 282 819l 125 846q 54 439 109 629l 217 407q 282 749260 597l 282-141l 434-141l 434-49 q 553-163 505-81q 879 201 770-22q 1215-136987-43q 1351 27 1275 -22q 987 347 1042 141l 1340 347l 1340 499l 1221 499l1221 906l 949 906l 949 1031q 955 1096 949 1069q 960 1112 960 1107q 895 1128960 1128l 770 1128l 770 906l 608 906l 608 754l 770 754l 770 575q 765 494 770537l 526 494l 526 342l 749 342q 434-5 678 114l 434 722q 510 532 467 646l 651586m 944 760l 1047 760l 1047 499l 949 499q 949 532 949 510q 944 575 944 559l944 760z"}
[0109] When the server terminal compresses the data information and format information, it will search for the current data information of the display content and determine whether the current data information is the same as the stored data information. For example, whether the seven characters "Kuaiyinke E-commerce" already exist in the previously stored data information.
[0110] If it already exists, then determine whether the format information corresponding to this data information is the same as the format information of the previously stored data information. If they are the same, there is no need to store this data information and the corresponding format information. If they are different, then this data information and the corresponding format information need to be stored separately, and all data information with the same format is classified and stored according to the format category. In this way, only one additional code for identifying the format information needs to be set for each category.
[0111] If it does not exist, the server terminal directly performs a storage operation on the data information. Specifically, when performing a storage operation on the data information, it will confirm the format information of the adjacent data information of the data information. If the format information of the adjacent data information is the same as the format information of the current data information, then directly perform a storage operation on this current data information. The format information of this data information meets the classification storage of the format category, so there is no need to perform an additional storage operation on the format information of this data information.
[0112] If the format information of the adjacent data information is different from the format information of the current data information, then it is necessary to update both the current data information and the format information corresponding to the data information, and set an additional code for the updated data information to distinguish it from other stored data information. This additional code stores the format information corresponding to the data information.
[0113] Step S403, the server terminal makes the compressed data information and format information into a personalized format package, that is, a font library compression package in JSON format. [[ID=1-4]]
[0114] Step S404, the server terminal sends this font library compression package to the remote user terminal, and also sends the display content to the remote user terminal.
[0115] The remote user terminal outputs the personalized format package to the browser side and loads it onto the corresponding text through CSS (Cascading Style Sheets) to effectively display the display content. Since the remote user terminal only needs to retrieve some characters in the personalized format package, and the capacity of this personalized format package is extremely small, generally a few k to dozens of k, it can achieve fast loading of the font library. And the capacity of this personalized format package is not stored in the server terminal, so the remote user terminal can be customized according to the display content and can be discarded after use without occupying the system resources of the remote user terminal.
[0116] This completes the process of displaying web page content using the web page content generation method and device of this embodiment.
[0117] The webpage content generation method, apparatus, and computer-readable storage medium of the present invention generate corresponding content display webpages through personalized format packages. Since the personalized format packages are small in size, easy to install, and highly targeted to personalized content, they can effectively improve the display efficiency of personalized content on webpages and effectively solve the technical problem of low display efficiency of personalized content in existing webpage content generation methods and apparatuses.
[0118] As used herein, the terms “component,” “module,” “system,” “interface,” “process,” etc., generally refer to computer-related entities: hardware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable application, an executing thread, a program, and / or a computer. As illustrated, both an application running on a controller and the controller itself can be components. One or more components may reside within an executing process and / or thread, and components may be located on a single computer and / or distributed across two or more computers.
[0119] Figure 6 The following discussion provides a brief, general description of the operating environment of the device in which the web page content generation apparatus described in this invention is implemented. Figure 6 The work environment described is merely one example of a suitable work environment and is not intended to suggest any limitations on the scope of the use or function of a work environment.
[0120] Although not required, embodiments are described within the general context of "computer-readable instructions" being executed by one or more electronic devices or Internet of Things (IoT) devices. Computer-readable instructions can be distributed via computer-readable media (discussed below). Computer-readable instructions can be implemented as program modules, such as functions, objects, application programming interfaces (APIs), data structures, etc., that perform specific tasks or implement specific abstract data types. Typically, the functionality of such computer-readable instructions can be freely combined or distributed across various environments.
[0121] Figure 6 An example of a device 612 comprising one or more embodiments of the web page content generation apparatus of the present invention is illustrated. In one configuration, the Internet of Things (IoT) device 612 includes at least one processing unit 616 and a memory 618. Depending on the exact configuration and type of the IoT device, the memory 618 may be volatile (e.g., RAM), non-volatile (e.g., ROM, flash memory, etc.), or some combination of both. This configuration in... Figure 6 The diagram is illustrated by the dotted line 614.
[0122] In other embodiments, the IoT device 612 may include additional features and / or functions. For example, the device 612 may also include additional storage devices (e.g., removable and / or non-removable), including but not limited to magnetic storage devices, optical storage devices, etc. Such additional storage devices... Figure 6 The diagram is illustrated by storage device 620. In one embodiment, computer-readable instructions for implementing one or more embodiments provided herein may be stored in storage device 620. Storage device 620 may also store other computer-readable instructions for implementing operating systems, applications, etc. The computer-readable instructions may be loaded into memory 618 and executed, for example, by processing unit 616.
[0123] As used herein, the term "computer-readable medium" includes computer storage media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions or other data. Memory 618 and storage device 620 are examples of computer storage media. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital universal disc (DVD) or other optical storage devices, magnetic tape, magnetic tape, disk storage devices or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by the Internet of Things device 612. Any such computer storage medium may be part of the Internet of Things device 612.
[0124] The IoT device 612 may also include a communication connection 626 that allows the IoT device 612 to communicate with other devices. The communication connection 626 may include, but is not limited to, a modem, a network interface card (NIC), an integrated network interface, a radio frequency transmitter / receiver, an infrared port, a USB connection, or other interfaces for connecting the IoT device 612 to other electronic devices. The communication connection 626 may include a wired connection or a wireless connection. The communication connection 626 may transmit and / or receive communication media.
[0125] The term "computer-readable medium" can include communication media. Communication media typically contain computer-readable instructions or other data in a "modulated data signal" such as a carrier wave or other transmission mechanism, and includes any information delivery medium. The term "modulated data signal" can include a signal whose characteristics, one or more, are set or altered in a manner that encodes information into the signal.
[0126] The Internet of Things (IoT) device 612 may include an input device 624, such as a keyboard, mouse, pen, voice input device, touch input device, infrared camera, video input device, and / or any other input device. The device 612 may also include an output device 622, such as one or more displays, speakers, printers, and / or any other output device. The input device 624 and output device 622 may be connected to the IoT device 612 via a wired connection, a wireless connection, or any combination thereof. In one embodiment, an input device or output device from another electronic device may be used as the input device 624 or output device 622 of the IoT device 612.
[0127] The components of the IoT device 612 can be connected via various interconnects (such as buses). Such interconnects may include Peripheral Component Interconnect (PCI) (e.g., Fast PCI), Universal Serial Bus (USB), FireWire (IEEE 1394), optical bus architectures, and so on. In another embodiment, the components of the IoT device 612 can be interconnected via a network. For example, the memory 618 may consist of multiple physical memory cells located in different physical locations and interconnected via a network.
[0128] Those skilled in the art will recognize that storage devices for storing computer-readable instructions can be distributed across a network. For example, an electronic device 630 accessible via network 628 may store computer-readable instructions for implementing one or more embodiments of the present invention. An Internet of Things (IoT) device 612 may access electronic device 630 and download some or all of the computer-readable instructions for execution. Alternatively, IoT device 612 may download multiple computer-readable instructions as needed, or some instructions may be executed at IoT device 612 and some instructions may be executed at electronic device 630.
[0129] This document provides various operations according to embodiments. In one embodiment, one or more operations may constitute computer-readable instructions stored on one or more computer-readable media, which, when executed by an Internet of Things (IoT) device, will cause a computing device to perform the operations. The order in which some or all operations are described should not be construed as implying that these operations must be sequentially related. Those skilled in the art will understand alternative orderings that are beneficial to this specification. Moreover, it should be understood that not all operations are required to be present in every embodiment provided herein.
[0130] Furthermore, although this disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art based on a reading and understanding of this specification and drawings. This disclosure includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the aforementioned components (e.g., elements, resources, etc.), the terminology used to describe such components is intended to correspond to any component (unless otherwise indicated) that performs the specified function of said component (e.g., is functionally equivalent to it), even if structurally not equivalent to the disclosed structure performing the functions in the exemplary implementations of this disclosure shown herein. Moreover, although specific features of this disclosure have been disclosed with respect to only one of several implementations, such features may be combined with one or more other features of other implementations that may be desirable and advantageous for a given or particular application. Furthermore, with regard to the use of the terms “comprising,” “having,” “containing,” or variations thereof in the Detailed Description or claims, such terms are intended to be included in a manner similar to the term “including.”
[0131] The functional units in this invention embodiment can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. The various devices or systems described above can execute the methods in the corresponding method embodiments.
[0132] In summary, although the present invention has been disclosed above with reference to embodiments, the serial numbers preceding the embodiments are for descriptive convenience only and do not limit the order of the embodiments. Furthermore, the above embodiments are not intended to limit the present invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention is determined by the scope defined in the claims.
Claims
1. A method for generating contents of a web page based on a personalized format package, characterized by, include: Determine the content to be displayed, and obtain the data information of the content to be displayed and the format information corresponding to the data information; The data and format information are compressed. The compressed data and format information are compiled into a personalized format package, namely a JSON format font library compressed package; as well as Based on the displayed content and the personalized format package, a content display webpage is generated; The step of compressing the data information and format information includes: Set n to 1; Obtain the nth data information of the displayed content; Compare whether the nth data information is the same as the stored data information. If they are different, the nth data information and its corresponding format information are stored, and the stored data information is updated. If they are the same, then obtain the format information corresponding to the nth data information, and compare whether the format information corresponding to the nth data information is the same as the format information corresponding to the same stored data information; If they are different, the nth data information and its corresponding format information are stored, and the format information corresponding to the stored data information is updated. If they are the same, then the nth data information and its corresponding format information will be deleted. n=n+1, return to the step of obtaining the nth data information of the displayed content until all data information of the displayed content is obtained; The step of updating the stored data information includes: Obtain the format information corresponding to the adjacent data information of the stored data information. If the format information corresponding to the adjacent data information of the stored data information is the same as the format information corresponding to the stored data information, then update the stored data information. If the format information corresponding to adjacent data information of the stored data information is different from the format information corresponding to the stored data information, then both the stored data information and the format information corresponding to the stored data information are updated simultaneously.
2. The method of claim 1, wherein the personalized format package-based web page content generation method is characterized by, The step of simultaneously updating the stored data information and the format information corresponding to the stored data information includes: An additional code is set for the stored data information to distinguish it from other stored data information; Set the corresponding format information for stored data information that has been assigned an additional code.
3. The method of claim 1, wherein the personalized format package-based web page content generation method is characterized by, The step of updating the format information corresponding to the stored data information includes: Update the stored data information according to the format information corresponding to the stored data information.
4. The method of claim 3, wherein the personalized format package-based web page content generation method is characterized by, The step of updating the stored data information according to the format information corresponding to the stored data information is as follows: The stored data information is categorized according to format information, and an additional code is set for the first stored data information in each category; Set the corresponding format information for stored data information that has been assigned an additional code.
5. A webpage content generation device based on a personalized format package, characterized in that, include: The information acquisition module is used to determine the content to be displayed and to acquire the data information of the content to be displayed and the format information corresponding to the data information; An information compression module is used to compress the data information and format information. The format package creation module is used to create personalized format packages, i.e., JSON format font library compressed packages, from compressed data and format information. as well as The webpage generation module is used to generate a content display webpage based on the displayed content and the personalized format package; The information compression module includes: A data information acquisition unit is used to acquire the nth data information of the displayed content; A comparison unit is used to compare whether the nth data information is the same as the stored data information; if they are different, the nth data information and its corresponding format information are stored, and the stored data information is updated; if they are the same, the format information corresponding to the nth data information is obtained, and the format information corresponding to the nth data information is compared with the format information corresponding to the same stored data information; if they are different, the nth data information and its corresponding format information are stored, and the stored format information is updated; if they are the same, the nth data information and its corresponding format information are deleted. The loop unit is used to return to the data information acquisition unit until all data information of the displayed content is acquired; The comparison unit includes: The first update subunit is used to obtain the format information corresponding to the adjacent data information of the stored data information. If the format information corresponding to the adjacent data information of the stored data information is the same as the format information corresponding to the stored data information, then the stored data information is updated. The second update subunit is used to obtain the format information corresponding to the adjacent data information of the stored data information. If the format information corresponding to the adjacent data information of the stored data information is different from the format information corresponding to the stored data information, then the stored data information and the format information corresponding to the stored data information are updated simultaneously.
Citation Information
Patent Citations
Method and device for generating webpage
CN108205532A
Webpage content processing method and device
CN112257061A