Web page processing method and base station
Patent Information
- Application Number
- TW113139227
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2024-09-09
- Filing Date
- 2024-10-15
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2044-10-14
AI Technical Summary
Existing embedded systems face web page access failures due to insufficient random access memory (RAM) capacity, which prevents the decompression of large web pages.
Concatenate multiple web pages, segment and compress them into multiple compressed data files, and store these in flash memory along with a mapping table, allowing decompression of compressed files one by one to reduce RAM requirements.
This approach avoids RAM insufficiency by distributing and compressing web pages, enabling efficient decompression and access even with limited RAM capacity.
Smart Images

Figure TWG2TB001910220_001 
Figure TWG2TB001910220_002 
Figure TWG2TB001910220_003
Abstract
Description
[Technical Field]
[0001] This case concerns web page processing methods and base stations, and in particular, web page processing methods and base stations that avoid the inability to decompress by splitting web pages to distribute compressed files for storage. [Previous Technology]
[0002] For an embedded system to provide web page services, the web pages need to be compressed and stored in flash memory. Specifically, each web page needs to be compressed and stored separately in flash memory, and the storage location of each web page needs to be recorded. When a user requests access to a web page, the embedded system needs to decompress the web page to be accessed. However, if the amount of data in the web page to be accessed is large, decompression requires a large amount of random access memory (RAM). If the embedded system's RAM is insufficient, the web page to be accessed will not be able to be decompressed, resulting in web page access failure. [Summary of the Invention]
[0003] In view of the shortcomings of the prior art, one of the objectives of this case is (but not limited to) to provide a web page processing method and a base station to improve the shortcomings of the prior art.
[0004] In some embodiments, the web page processing method is applied to a base station. The web page processing method includes: concatenating a plurality of web pages to generate a concatenated web page; dividing and compressing the concatenated web page into a plurality of compressed data, and generating a correspondence table between the plurality of web pages and the plurality of compressed data; and storing the plurality of compressed data in flash memory, and generating a table of corresponding locations of the plurality of compressed data in flash memory.
[0005] In some embodiments, the base station includes memory and a processor. The memory is used to store a plurality of instructions. The processor is used to read the plurality of instructions from the memory to perform the following steps: concatenating a plurality of web pages to generate a concatenated web page; segmenting and compressing the concatenated web page into a plurality of compressed data, and generating a mapping table between the plurality of web pages and the plurality of compressed data; and storing the plurality of compressed data in flash memory, and generating a mapping table of the locations of the plurality of compressed data in the flash memory.
[0006] The technical means embodied in the embodiments of this case can improve at least one of the disadvantages of the prior art. The base station and web page processing method of this case disperses and compresses the web page into multiple compressed files and stores them in flash memory by splicing and splitting the web page. In this way, even if the amount of data of the web page that the user wants to access is large, since the web page has been dispersed and compressed into multiple compressed files, the base station and web page processing method of this case can reduce the amount of data that needs to be temporarily stored in the random access memory each time by decompressing multiple compressed files one by one (for example, decompressing only one compressed file at a time). In this way, the problem of insufficient capacity of random access memory to decompress can be avoided.
[0007] Regarding the features, implementation and effects of this case, the preferred embodiments are described in detail below with reference to the drawings.
Implementation Method
[0009] All terms used herein have their common meanings. The definitions of the terms mentioned above in commonly used dictionaries, and any examples of the use of any term discussed herein, are merely illustrative and should not limit the scope or meaning of this application. Similarly, this application is not limited to the various embodiments shown in this specification.
[0010] The terms "coupled" or "connected" as used herein can refer to two or more components making direct physical or electrical contact with each other, or making indirect physical or electrical contact with each other, or two or more components operating or moving with each other. As used herein, the term "circuit" can be a device that connects at least one transistor and / or at least one active or passive component in a certain manner to process signals.
[0011] As used herein, the term "and / or" includes any combination of one or more of the listed related items. In this document, the terms first, second, third, etc., are used to describe and identify individual elements. Therefore, a first element in this document may also be referred to as a second element without departing from the intent of this document. For ease of understanding, similar elements in the various figures will be designated with the same reference numerals.
[0012] In order to improve the problem in the prior art that the webpage cannot be decompressed due to insufficient random access memory of the system, resulting in the failure of webpage access, this case proposes a webpage processing method and a base station, which are described in detail below.
[0013] Figure 1 is a schematic diagram of a base station 100 and an electronic device 900 according to some embodiments of the present invention. As shown, the base station 100 includes flash memory 110, random access memory (RAM) 120, and a processor 130. Flash memory 110 is used to store a plurality of instructions. Processor 130 is used to read the plurality of instructions from flash memory 110 to execute corresponding operations. To make the operation of base station 100 easier to understand, please also refer to Figure 2, which is a flowchart of a web page processing method 200 according to some embodiments of the present invention.
[0014] In step 210, multiple web pages are concatenated to generate a concatenated web page. For example, referring to Figure 3, multiple web pages A to D are concatenated to generate a concatenated web page 300. However, this invention is not limited to the above embodiment, which is only used to illustrate one implementation method of this invention. In other embodiments, the number and size of the web pages in this invention can adopt other suitable numbers and sizes, depending on actual needs.
[0015] In step 220, the spliced webpage is divided and compressed into a plurality of compressed data, and a correspondence table between the plurality of webpages and the plurality of compressed data is generated. For example, referring to Figure 3, after the spliced webpage 300 is divided and compressed, a plurality of compressed data 510-550 is generated, and a correspondence table between the plurality of webpages A-D and the plurality of compressed data 510-550 is generated. In some embodiments, the above correspondence table may be stored in flash memory 110 for use in subsequent processes. However, this invention is not limited to the above embodiments, which are only used to illustrate one implementation method of this invention. In other embodiments, the number of compressed data in this invention may be other suitable numbers, depending on actual needs.
[0016] In some embodiments, step 220 shown in FIG2 includes the following steps: segmenting the spliced webpage into a plurality of segmented data; compressing the plurality of segmented data into a plurality of compressed data; and generating a correspondence table based on a plurality of correspondences between the plurality of webpages and the plurality of compressed data. For example, referring to FIG3, the spliced webpage 300 is segmented into a plurality of segmented data 400. Then, the plurality of segmented data 400 is compressed into a plurality of compressed data 510~550. Subsequently, a correspondence table is generated based on a plurality of correspondences between the plurality of webpages A~D and the plurality of compressed data 510~550, for example, webpage A corresponds to compressed data 510, webpage B corresponds to compressed data 520, webpage C corresponds to compressed data 530, and webpage D corresponds to compressed data 540 and 550. However, this case is not limited to the above embodiments, which are only used to illustrate one of the implementation methods of this case. In other embodiments, the correspondence between the web pages and compressed data in this case can adopt other suitable correspondence methods, depending on the actual needs.
[0017] In some embodiments, the webpage is divided into multiple segments. For example, referring to FIG3, the processor 130 can be used to divide the webpage 300 into multiple segments 400. Then, the multiple segments 400 are compressed into multiple compressed data 510-550. In some embodiments, the size of each of the multiple compressed data 510-550 is approximately 32KB (kilobytes), for example, the size of compressed data 510 is approximately 32KB, the size of compressed data 520 is approximately 32KB, and so on. However, this invention is not limited to the above embodiments, which are only used to illustrate one implementation of this invention. In other embodiments, the compressed data in this invention may adopt other suitable sizes, depending on actual needs.
[0018] Referring to Figure 2, in step 230, a plurality of compressed data are stored in flash memory, and a table showing the corresponding locations of the plurality of compressed data in flash memory is generated. For example, referring to Figure 3, a plurality of compressed data 510-550 are stored in flash memory 110, and processor 130 generates a table showing the corresponding locations of the plurality of compressed data 510-550 in flash memory 110 based on their positions in flash memory 110.
[0019] In some embodiments, step 230 shown in FIG2 includes the following steps: generating a corresponding location table and a corresponding size table based on a plurality of corresponding locations and a plurality of corresponding sizes of a plurality of compressed data in flash memory. For example, referring to FIG3, processor 130 can be used to obtain a plurality of corresponding locations and a plurality of corresponding sizes of a plurality of compressed data 510~550 in flash memory 110. Subsequently, processor 130 can be used to generate a corresponding location table based on the plurality of corresponding locations of the plurality of compressed data 510~550 in flash memory 110, and generate a corresponding size table based on the plurality of corresponding sizes of the plurality of compressed data 510~550 in flash memory 110. In some embodiments, the above-mentioned corresponding location table can be stored in flash memory 110, and the above-mentioned corresponding size table can also be stored in flash memory 110 for use in subsequent processes.
[0020] In some embodiments, the webpage processing method 200 further includes the following steps: parsing a webpage among a plurality of webpages to be accessed in a webpage access request; querying at least one compressed data among a plurality of compressed data corresponding to the webpage according to a mapping table; querying at least one position of the at least one compressed data according to a mapping position table; and decompressing the at least one compressed data at at least one position in flash memory to generate at least one webpage data, and outputting the at least one webpage data. For example, referring to FIG1, when a user accesses a webpage through an electronic device 900, the electronic device 900 outputs a webpage access request to a base station 100. The processor 130 of the base station 100 parses the webpage access request and finds that the webpage the user wants to access is webpage A as shown in FIG3. Then, the processor 130 queries the mapping table to find that webpage A corresponds to compressed data 510. Subsequently, the processor 130 queries the mapping position table to find the position of compressed data 510 in flash memory 110. Furthermore, the processor 130 decompresses the compressed data 510 at the aforementioned location in the flash memory 110 to generate web page data corresponding to web page A, and outputs the web page data to the electronic device 900 that issued the web page access request. Next, after receiving the web page data corresponding to web page A, the electronic device 900 processes the web page data to display web page A on the electronic device 900.
[0021] In some embodiments, referring to FIG3, the spliced webpage 300 includes a plurality of headers and a plurality of footers for a plurality of webpages A to D. The webpage processing method 200 of FIG2 includes: reading at least two compressed data from at least two locations in flash memory; decompressing the at least two compressed data according to the plurality of headers and the plurality of footers to generate at least two webpage data; and outputting the at least two webpage data. For example, referring to FIG4, the processor 130 reads compressed data 540, 550 from at least two locations in flash memory 110. Then, the processor 130 decompresses the compressed data 540, 550 according to the header and footer of webpage D to generate at least two webpage data 610, 620 corresponding to webpage D. Subsequently, the processor 130 outputs at least two webpage data 610, 620. Next, after receiving at least two webpage data 610 and 620 corresponding to webpage D, the electronic device 900 processes the at least two webpage data 610 and 620 to display webpage D on the electronic device 900. However, this invention is not limited to the above embodiment, which is only used to illustrate one implementation method of this invention. In other embodiments, the number of webpage data in this invention may be other suitable numbers, depending on actual needs.
[0022] In some embodiments, the webpage processing method 200 of FIG2 further includes the following steps: parsing the webpage among the plurality of webpages to be accessed in the webpage access request; querying at least two compressed data among the plurality of compressed data corresponding to the webpage according to the correspondence table; querying at least two positions of the at least two compressed data according to the correspondence position table; and decompressing the at least two compressed data from the at least two positions in flash memory to generate at least two webpage data, storing the at least two webpage data in the random access memory of the base station, and outputting the at least two webpage data from the random access memory. For example, referring to FIG1, when a user accesses a webpage through electronic device 900, electronic device 900 outputs a webpage access request to base station 100. The processor 130 of base station 100 parses the webpage access request and finds that the webpage to be accessed by the user is webpage D. Then, the processor 130 queries according to the correspondence table that webpage D in FIG3 corresponds to compressed data 540 and 550. Subsequently, the processor 130 queries according to the correspondence position table the positions of compressed data 540 and 550 in flash memory 110. Furthermore, the processor 130 decompresses the compressed data 540 and 550 from the aforementioned location in the flash memory 110 to generate at least two webpage data corresponding to webpage D, stores the at least two webpage data in the random access memory 120, and outputs the at least two webpage data from the random access memory 120 to the electronic device 900 that issued the webpage access request. Then, after receiving the at least two webpage data corresponding to webpage D, the electronic device 900 processes the at least two webpage data to display webpage D on the electronic device 900.
[0023] In some embodiments, the size of flash memory 110 may be 2MB (megabytes), and the size of random access memory 120 may be 8MB. However, this invention is not limited to the above embodiments, which are merely illustrative of one implementation method of this invention. In other embodiments, the flash memory 110 and random access memory 120 of this invention may adopt other suitable sizes, depending on actual needs. It should be noted that even though the size of the random access memory 120 is only 8MB, the base station 100 and the web page processing method 200 in this case disperse and compress web pages A to D into multiple compressed files 510 to 550 by splicing and splitting web pages and storing them in the flash memory 110. In this way, even if the amount of data of the web page (such as web page D) that the user wants to access is large, since the web page (such as web page D) has been dispersed and compressed into multiple compressed files 540 and 550, the base station 100 and the web page processing method 200 in this case can decompress the multiple compressed files 540 and 550 one by one (for example, decompressing only one of the multiple compressed files 540 and 550 at a time) to reduce the amount of data that needs to be temporarily stored in the random access memory 120 each time. In this way, the problem of insufficient capacity of the random access memory 120 to decompress can be avoided.
[0024] In some embodiments, the web page processing method 200 further includes the following steps: decompressing a first compressed data in at least two compressed data from a first location of at least two locations in flash memory to generate first web page data; storing the first web page data in random access memory; outputting the first web page data from the random access memory to an electronic device that issues a web page access request; decompressing a second compressed data in at least two compressed data from a second location of at least two locations in flash memory to generate second web page data; storing the second web page data in random access memory; and outputting the second web page data from the random access memory to an electronic device that issues a web page access request.
[0025] For example, processor 130 decompresses at least two compressed data sets 510 and 520 from at least two locations in flash memory 110 to generate first webpage data and second webpage data. Then, processor 130 stores the first webpage data and second webpage data into random access memory 120. Subsequently, processor 130 outputs the first webpage data and second webpage data from random access memory 120 to electronic device 900 that issued the webpage access request. Then, after receiving the first webpage data and second webpage data, electronic device 900 processes the webpage data to display the webpage on electronic device 900.
[0026] In some embodiments, the base station 100 may be an access point (AP). The electronic device 900 may be a mobile phone, laptop, tablet, or other electronic product. However, this invention is not limited to the above embodiments, which are merely illustrative of one implementation method of this invention. In other embodiments, the base station 100 and the electronic device 900 of this invention may be other suitable electronic products, depending on actual needs.
[0027] It should be noted that this case is not limited to the embodiments shown in Figures 1 to 4, which are merely illustrative of one implementation method of this case to facilitate understanding of the technology. The scope of this patent application shall be determined by the scope of the invention application. Modifications and refinements made by those skilled in the art to the embodiments of this case without departing from the spirit of this case still fall within the scope of the invention application.
[0028] In summary, the base station 100 and web page processing method 200 of this case disperse and compress web pages A to D into multiple compressed files 510 to 550 by splicing and splitting web pages and storing them in flash memory 110. In this way, even if the amount of data of the web page (such as web page D) that the user wants to access is large, since the web page (such as web page D) has been dispersed and compressed into multiple compressed files 540 and 550, the base station 100 and web page processing method 200 of this case can decompress the multiple compressed files 540 and 550 one by one (for example, decompressing only one of the multiple compressed files 540 and 550 at a time) to reduce the amount of data that needs to be temporarily stored in random access memory 120 each time. In this way, the problem of insufficient capacity of random access memory 120 to decompress can be avoided.
[0029] Although the embodiments of this case are described above, these embodiments are not intended to limit this case. Those skilled in the art can make changes to the technical features of this case based on the explicit or implicit content of this case. All such changes may fall within the scope of patent protection sought in this case. In other words, the scope of patent protection of this case shall be determined by the scope of the patent application in this specification. [Simplified Explanation of the Diagram]
[0008] Figure 1 is a schematic diagram of a base station and an electronic device according to some embodiments of the present invention; Figure 2 is a flowchart of a web page processing method according to some embodiments of the present invention; Figure 3 is an operation diagram of a web page processing method according to some embodiments of the present invention; and Figure 4 is an operation diagram of a web page processing method according to some embodiments of the present invention.
Claims
1. A webpage processing method applied to a base station, comprising: concatenating a plurality of webpages to generate a concatenated webpage; dividing and compressing the concatenated webpage into a plurality of compressed data, and generating a correspondence table between the plurality of webpages and the plurality of compressed data; and storing the plurality of compressed data in a flash memory of the base station, and generating a correspondence table of the plurality of compressed data in the flash memory.
2. The webpage processing method as described in claim 1, wherein the steps of segmenting and compressing the concatenated webpage into the plurality of compressed data, and generating the correspondence between the plurality of webpages and the plurality of compressed data, include: segmenting the concatenated webpage into the plurality of segmented data; compressing the plurality of segmented data into the plurality of compressed data; and generating the correspondence table based on the plurality of correspondences between the plurality of webpages and the plurality of compressed data.
3. The webpage processing method as described in claim 2, wherein the step of dividing the concatenated webpage into the plurality of segmented data includes: equally dividing the concatenated webpage into the plurality of segmented data.
4. The web page processing method as described in claim 1, wherein the step of storing the plurality of compressed data in the flash memory of the base station and generating the corresponding location table of the plurality of compressed data in the flash memory comprises: generating the corresponding location table and a corresponding size table based on the plurality of corresponding locations and the plurality of corresponding sizes of the plurality of compressed data in the flash memory.
5. The webpage processing method as described in claim 1 further includes: storing the mapping table in the flash memory; and storing the mapping location table in the flash memory.
6. The webpage processing method as described in claim 1 further comprises: parsing a webpage among the plurality of webpages to be accessed in a webpage access request; querying at least one compressed data among the plurality of compressed data corresponding to the webpage according to the mapping table; querying at least one position of the at least one compressed data according to the mapping position table; and decompressing the at least one compressed data at the at least one position in the flash memory to generate at least one webpage data, and outputting the at least one webpage data.
7. The webpage processing method as described in claim 6, wherein the concatenated webpage includes a plurality of page headers and a plurality of page footers of the plurality of webpages, wherein the step of decompressing at least one compressed data from at least one location of the flash memory to generate at least one webpage data and outputting the at least one webpage data includes: reading at least two compressed data from at least two locations of the flash memory; decompressing the at least two compressed data according to the plurality of page headers and the plurality of page footers to generate at least two webpage data; and outputting the at least two webpage data.
8. The webpage processing method as described in claim 1 further comprises: parsing a webpage among the plurality of webpages to be accessed in a webpage access request; querying at least two compressed data files among the plurality of compressed data files corresponding to the webpage according to the mapping table; querying at least two positions of the at least two compressed data files according to the mapping position table; and decompressing the at least two compressed data files at the at least two positions of the flash memory to generate at least two webpage data files, storing the at least two webpage data files in a random access memory of the base station, and outputting the at least two webpage data files from the random access memory.
9. The webpage processing method as described in claim 8, wherein the steps of decompressing at least two compressed data files by at least two locations of the flash memory to generate at least two webpage data files, storing the at least two webpage data files in the random access memory of the base station, and outputting the at least two webpage data files from the random access memory include: decompressing a first compressed data file of the at least two compressed data files by a first location of the at least two locations of the flash memory to generate a first webpage data file; storing the first webpage data file in the random access memory; outputting the first webpage data file from the random access memory to an electronic device that issued the webpage access request; decompressing a second compressed data file of the at least two compressed data files by a second location of the at least two locations of the flash memory to generate a second webpage data file; storing the second webpage data file in the random access memory; and outputting the second webpage data file from the random access memory to the electronic device that issued the webpage access request.
10. A base station, comprising: a memory for storing a plurality of instructions; and a processor for reading the plurality of instructions from the memory to perform the following steps: concatenating a plurality of web pages to generate a concatenated web page; segmenting and compressing the concatenated web page into a plurality of compressed data, and generating a correspondence table between the plurality of web pages and the plurality of compressed data; and storing the plurality of compressed data in a flash memory of the base station, and generating a correspondence table of the plurality of compressed data in the flash memory.
Citation Information
Patent Citations
360-degree panoramic video live broadcast system and realization method thereof
CN106550239A
Large-range one-network webpage splicing display equipment method based on map API
CN112685679A
Remote driving monitoring video picture adjusting method
CN115065807A
Method and system for realizing VR video transmission and display
CN115766673A
