CN112182334A - Vehicle-mounted hypertext markup language file processing method, electronic equipment, server processing method and server - Google Patents

Vehicle-mounted hypertext markup language file processing method, electronic equipment, server processing method and server Download PDF

Info

Publication number
CN112182334A
CN112182334A CN202011033055.4A CN202011033055A CN112182334A CN 112182334 A CN112182334 A CN 112182334A CN 202011033055 A CN202011033055 A CN 202011033055A CN 112182334 A CN112182334 A CN 112182334A
Authority
CN
China
Prior art keywords
file
markup language
hypertext markup
resource
downloaded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011033055.4A
Other languages
Chinese (zh)
Other versions
CN112182334B (en
Inventor
郭艳成
王建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongfeng Motor Co Ltd
Original Assignee
Dongfeng Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongfeng Motor Co Ltd filed Critical Dongfeng Motor Co Ltd
Priority to CN202011033055.4A priority Critical patent/CN112182334B/en
Priority claimed from CN202011033055.4A external-priority patent/CN112182334B/en
Publication of CN112182334A publication Critical patent/CN112182334A/en
Application granted granted Critical
Publication of CN112182334B publication Critical patent/CN112182334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a vehicle-mounted hypertext markup language file processing method, electronic equipment, a server processing method and a server, wherein the vehicle-mounted hypertext markup language file processing method comprises the following steps: acquiring a hypertext markup language file list from a server; and comparing the remote hypertext markup language file list with the local hypertext markup language file list according to the file identification and the corresponding file abstract identification, triggering a hypertext markup language file acquisition request according to a comparison result, acquiring the hypertext markup language file from a server as a downloaded hypertext markup language file, rendering and displaying the downloaded hypertext markup language file, or acquiring the local hypertext markup language file from a vehicle-mounted memory, rendering and displaying the local hypertext markup language file. The invention realizes the cache management of the html file, can greatly reduce the flow number consumed by html loading, and also improves the html loading speed.

Description

Vehicle-mounted hypertext markup language file processing method, electronic equipment, server processing method and server
Technical Field
The invention relates to the technical field of automobiles, in particular to a vehicle-mounted hypertext markup language file processing method, electronic equipment, a server processing method and a server.
Background
The vehicle-mounted terminal is used for displaying various instructions and realizing interaction with passengers.
In the conventional vehicle-mounted terminal, a hypertext Markup Language (html) file is acquired from a server and rendered and displayed on the terminal, so that the content of the terminal is updated.
The conventional method for obtaining html files from a server and rendering and displaying by a vehicle-mounted terminal mainly adopts the method for obtaining html files from the internet and rendering and displaying.
However, the on-board field is different from the home environment and there is no unlimited use of broadband. Meanwhile, in the aspect of vehicle-mounted, the loaded html content is relatively stable and unchanged. Therefore, the existing internet is not suitable for obtaining html files and rendering and displaying the html files.
The conventional vehicle-mounted terminal obtains the html file and renders the html file for display, and does not consider how to avoid repeated requests for how to save traffic, so that the technical problem that the network loading is slow when the vehicle-mounted terminal displays the html file is caused.
Disclosure of Invention
Therefore, it is necessary to provide a vehicle-mounted hypertext markup language file processing method, an electronic device, a server processing method and a server, aiming at the technical problem that the prior art has a slow network loading manner in a html file obtaining and rendering display manner.
The invention provides a vehicle-mounted hypertext markup language file processing method, which comprises the following steps:
responding to a hypertext markup language file list acquisition request, acquiring a hypertext markup language file list from a server, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files and corresponding file abstract identifications, and the file abstract identifications are generated according to the contents of the hypertext markup language files;
comparing a remote hypertext markup language file list acquired from a server with a local hypertext markup language file list stored in a vehicle-mounted memory according to a file identifier and a corresponding file abstract identifier, triggering a hypertext markup language file acquisition request according to a comparison result, acquiring the hypertext markup language file from the server as a downloaded hypertext markup language file, rendering and displaying the downloaded hypertext markup language file, or acquiring the local hypertext markup language file from the vehicle-mounted memory, rendering and displaying the local hypertext markup language file.
Further, the comparing, according to the file identifier and the corresponding file digest identifier, the far-end html file list acquired from the server with the local html file list stored in the vehicle-mounted memory, triggering a html file acquisition request according to the comparison result, acquiring the html file from the server as a downloaded html file, rendering and displaying the downloaded html file, or acquiring the local html file from the vehicle-mounted memory, rendering and displaying the local html file specifically includes:
comparing a remote hypertext markup language file list acquired from the server with a local hypertext markup language file list stored in a vehicle-mounted memory according to the file identification and the corresponding file abstract identification:
if the far-end file identification in the far-end hypertext markup language file list does not exist in the local hypertext markup language file list, taking the far-end file identification as a file identification to be downloaded, triggering a hypertext markup language file acquisition request comprising the file identification to be downloaded, acquiring the hypertext markup language file of the file identification to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the far-end file identification is consistent with the local file identification of the local hypertext markup language file list and the file abstract identification corresponding to the far-end file identification is inconsistent with the file abstract identification corresponding to the local file identification, taking the far-end file identification as the identification of the file to be downloaded, triggering a hypertext markup language file acquisition request comprising the identification of the file to be downloaded, acquiring the hypertext markup language file of the identification of the file to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the remote file identification is consistent with the local file identification and the file abstract identification corresponding to the remote file identification is consistent with the file abstract identification corresponding to the local file identification, acquiring a local hypertext markup language file corresponding to the local file identification from a vehicle-mounted memory, and rendering and displaying the local hypertext markup language file;
and if the local file identification does not exist in the remote hypertext markup language file list, deleting the local file identification from the local hypertext markup language file list, and deleting the hypertext markup language file corresponding to the local file identification.
Further, the obtaining, from the server, the html file identified by the file to be downloaded as a downloaded html file, and rendering and displaying the downloaded html file specifically includes:
acquiring the hypertext markup language file marked by the file to be downloaded from a server as a downloaded hypertext markup language file;
analyzing the downloaded hypertext markup language file, crawling a resource file link included in the downloaded hypertext markup language file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory;
and rendering and displaying the downloaded hypertext markup language file after all resource files included in the downloaded hypertext markup language file are downloaded.
Still further, the parsing the downloaded html file, crawling a resource file link included in the downloaded html file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory specifically includes:
analyzing the downloaded hypertext markup language file, and crawling a resource file link included in the downloaded hypertext markup language file as a resource file link to be downloaded;
if a local file identifier consistent with the identifier of the file to be downloaded exists, acquiring a hypertext markup language file corresponding to the local file identifier as a hypertext markup language file to be compared, analyzing the hypertext markup language file to be compared, crawling a resource file link included in the hypertext markup language file to be compared as a resource file link to be compared;
taking the resource identifier corresponding to the resource file link to be compared as a resource identifier to be compared, and taking the resource identifier corresponding to the resource file link to be downloaded as a resource identifier to be downloaded;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is inconsistent with the resource abstract identifier corresponding to the resource identifier to be compared, downloading the corresponding resource file according to the resource file link to be downloaded and storing the resource file in a vehicle-mounted memory;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is consistent with the resource abstract identifier corresponding to the resource identifier to be compared, acquiring a resource file corresponding to the resource file link to be compared from a vehicle-mounted memory;
if the resource identifier to be downloaded does not exist in the hypertext markup language file to be compared, downloading a corresponding resource file according to the resource file link to be downloaded, and storing the resource file in a vehicle-mounted memory;
and if the resource identifier to be compared does not exist in the hypertext markup language file to be downloaded, deleting the resource file corresponding to the resource identifier to be compared from the vehicle-mounted memory.
The invention provides a vehicle-mounted electronic device for processing hypertext markup language files, which comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,
the memory stores instructions executable by at least one of the processors to enable the at least one of the processors to:
responding to a hypertext markup language file list acquisition request, acquiring a hypertext markup language file list from a server, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files and corresponding file abstract identifications, and the file abstract identifications are generated according to the contents of the hypertext markup language files;
comparing a remote hypertext markup language file list acquired from a server with a local hypertext markup language file list stored in a vehicle-mounted memory according to a file identifier and a corresponding file abstract identifier, triggering a hypertext markup language file acquisition request according to a comparison result, acquiring the hypertext markup language file from the server as a downloaded hypertext markup language file, rendering and displaying the downloaded hypertext markup language file, or acquiring the local hypertext markup language file from the vehicle-mounted memory, rendering and displaying the local hypertext markup language file.
Further, the comparing, according to the file identifier and the corresponding file digest identifier, the far-end html file list acquired from the server with the local html file list stored in the vehicle-mounted memory, triggering a html file acquisition request according to the comparison result, acquiring the html file from the server as a downloaded html file, rendering and displaying the downloaded html file, or acquiring the local html file from the vehicle-mounted memory, rendering and displaying the local html file specifically includes:
comparing a remote hypertext markup language file list acquired from the server with a local hypertext markup language file list stored in a vehicle-mounted memory according to the file identification and the corresponding file abstract identification:
if the far-end file identification in the far-end hypertext markup language file list does not exist in the local hypertext markup language file list, taking the far-end file identification as a file identification to be downloaded, triggering a hypertext markup language file acquisition request comprising the file identification to be downloaded, acquiring the hypertext markup language file of the file identification to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the far-end file identification is consistent with the local file identification of the local hypertext markup language file list and the file abstract identification corresponding to the far-end file identification is inconsistent with the file abstract identification corresponding to the local file identification, taking the far-end file identification as the identification of the file to be downloaded, triggering a hypertext markup language file acquisition request comprising the identification of the file to be downloaded, acquiring the hypertext markup language file of the identification of the file to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the remote file identification is consistent with the local file identification and the file abstract identification corresponding to the remote file identification is consistent with the file abstract identification corresponding to the local file identification, acquiring a local hypertext markup language file corresponding to the local file identification from a vehicle-mounted memory, and rendering and displaying the local hypertext markup language file;
and if the local file identification does not exist in the remote hypertext markup language file list, deleting the local file identification from the local hypertext markup language file list, and deleting the hypertext markup language file corresponding to the local file identification.
Further, the obtaining, from the server, the html file identified by the file to be downloaded as a downloaded html file, and rendering and displaying the downloaded html file specifically includes:
acquiring the hypertext markup language file marked by the file to be downloaded from a server as a downloaded hypertext markup language file;
analyzing the downloaded hypertext markup language file, crawling a resource file link included in the downloaded hypertext markup language file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory;
and rendering and displaying the downloaded hypertext markup language file after all resource files included in the downloaded hypertext markup language file are downloaded.
Still further, the parsing the downloaded html file, crawling a resource file link included in the downloaded html file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory specifically includes:
analyzing the downloaded hypertext markup language file, and crawling a resource file link included in the downloaded hypertext markup language file as a resource file link to be downloaded;
if a local file identifier consistent with the identifier of the file to be downloaded exists, acquiring a hypertext markup language file corresponding to the local file identifier as a hypertext markup language file to be compared, analyzing the hypertext markup language file to be compared, crawling a resource file link included in the hypertext markup language file to be compared as a resource file link to be compared;
taking the resource identifier corresponding to the resource file link to be compared as a resource identifier to be compared, and taking the resource identifier corresponding to the resource file link to be downloaded as a resource identifier to be downloaded;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is inconsistent with the resource abstract identifier corresponding to the resource identifier to be compared, downloading the corresponding resource file according to the resource file link to be downloaded and storing the resource file in a vehicle-mounted memory;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is consistent with the resource abstract identifier corresponding to the resource identifier to be compared, acquiring a resource file corresponding to the resource file link to be compared from a vehicle-mounted memory;
if the resource identifier to be downloaded does not exist in the hypertext markup language file to be compared, downloading a corresponding resource file according to the resource file link to be downloaded, and storing the resource file in a vehicle-mounted memory;
and if the resource identifier to be compared does not exist in the hypertext markup language file to be downloaded, deleting the resource file corresponding to the resource identifier to be compared from the vehicle-mounted memory.
The invention provides a method for processing a hypertext markup language file of a server, which comprises the following steps:
establishing a hypertext markup language file list, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files, and generating a file abstract identification about the content of each hypertext markup language file according to the content of each hypertext markup language file, and associating the file abstract identification with the file identification of the corresponding hypertext markup language file;
responding to a hypertext markup language file list acquisition request, returning a hypertext markup language file list to the vehicle-mounted electronic equipment, wherein the hypertext markup language file list is used for comparing the vehicle-mounted electronic equipment with the hypertext markup language file list stored in a vehicle-mounted memory, and triggering the hypertext markup language file acquisition request according to a comparison result;
responding to a hypertext markup language file acquisition request, returning a hypertext markup language file indicated by the hypertext markup language file acquisition request to vehicle-mounted electronic equipment as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file by the vehicle-mounted electronic equipment;
and responding to the content change event of the hypertext markup language file, and updating the corresponding file abstract identification according to the changed content of the hypertext markup language file.
Further, the method further comprises:
responding to the resource file change event, and taking the resource file included in the resource file change event as a resource file to be updated;
generating a resource abstract identification of the resource file to be updated as a resource abstract identification to be updated;
searching a hypertext markup language file comprising a resource file link pointing to the resource file to be updated as a hypertext markup language file to be updated;
and updating the resource abstract identification corresponding to the resource file link pointing to the resource file to be updated into the corresponding resource abstract identification to be updated in the hypertext markup language file to be updated.
The invention provides a hypertext markup language file processing server, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,
the memory stores instructions executable by at least one of the processors to enable the at least one of the processors to:
establishing a hypertext markup language file list, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files, and generating a file abstract identification about the content of each hypertext markup language file according to the content of each hypertext markup language file, and associating the file abstract identification with the file identification of the corresponding hypertext markup language file;
responding to a hypertext markup language file list acquisition request, returning a hypertext markup language file list to the vehicle-mounted electronic equipment, wherein the hypertext markup language file list is used for comparing the vehicle-mounted electronic equipment with the hypertext markup language file list stored in a vehicle-mounted memory, and triggering the hypertext markup language file acquisition request according to a comparison result;
responding to a hypertext markup language file acquisition request, returning a hypertext markup language file indicated by the hypertext markup language file acquisition request to vehicle-mounted electronic equipment as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file by the vehicle-mounted electronic equipment;
and responding to the content change event of the hypertext markup language file, and updating the corresponding file abstract identification according to the changed content of the hypertext markup language file.
Further, the processor is further capable of:
responding to the resource file change event, and taking the resource file included in the resource file change event as a resource file to be updated;
generating a resource abstract identification of the resource file to be updated as a resource abstract identification to be updated;
searching a hypertext markup language file comprising a resource file link pointing to the resource file to be updated as a hypertext markup language file to be updated;
and updating the resource abstract identification corresponding to the resource file link pointing to the resource file to be updated into the corresponding resource abstract identification to be updated in the hypertext markup language file to be updated.
The method generates the abstract identification according to the content of the hypertext markup language file, and the abstract identification is generated based on the content of the html file, so that whether the html file needs to be updated or not can be judged through the abstract identification with small data volume, cache management of the html file is realized, the flow number consumed by html loading can be greatly reduced, and the html loading speed is also improved.
Drawings
FIG. 1 is a flowchart illustrating a method for processing a vehicle hypertext markup language document according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for processing a vehicle HTML document according to a second embodiment of the present invention;
FIG. 3 is a flow chart of the work flow of downloading html files in the preferred embodiment of the present invention;
FIG. 4 is a flowchart illustrating a local html file deletion method according to a preferred embodiment of the present invention;
FIG. 5 is a flowchart illustrating the operation of managing resource files after it is determined that the html is entirely changed in accordance with the preferred embodiment of the present invention;
FIG. 6 is a flowchart illustrating a method for processing a hypertext markup language document in a server according to the present invention;
FIG. 7 is a schematic diagram of a hardware configuration of an electronic device for processing HTML documents for vehicle use in accordance with the present invention;
FIG. 8 is a diagram of a hardware structure of a HTML document processing server according to the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples.
Example one
Fig. 1 is a flowchart illustrating a method for processing a vehicle hypertext markup language document according to an embodiment of the present invention, which includes:
step S101, responding to a hypertext markup language file list obtaining request, obtaining a hypertext markup language file list from a server, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files and corresponding file abstract identifications, and the file abstract identifications are generated according to the contents of the hypertext markup language files;
step S102, comparing a far-end hypertext markup language file list acquired from a server with a local hypertext markup language file list stored in a vehicle-mounted memory according to a file identifier and a corresponding file abstract identifier, triggering a hypertext markup language file acquisition request according to a comparison result, acquiring the hypertext markup language file from the server as a downloaded hypertext markup language file, rendering and displaying the downloaded hypertext markup language file, or acquiring the local hypertext markup language file from the vehicle-mounted memory, rendering and displaying the local hypertext markup language file.
Specifically, the present embodiment is mainly applied to an Electronic Control Unit (ECU) of an automobile. When the automobile is started, a hypertext markup language file list acquisition request is generated, and step S101 is triggered to acquire a hypertext markup language file list from the server. The hypertext markup language file list comprises file identifications of one or more hypertext markup language files and corresponding file abstract identifications, wherein the file identifications can be names of html files or unique identifications of the html files. The file digest identifier is generated according to the content of the html file, for example, the digest identifier is generated by using an MD5 algorithm.
And S102, comparing the remote hypertext markup language file list with the local hypertext markup language file list according to the file identification and the corresponding file abstract identification, and judging whether a new html file needs to be downloaded from the server or not according to a comparison result or directly adopting the local html file to render and display.
The method generates the abstract identification according to the content of the hypertext markup language file, and the abstract identification is generated based on the content of the html file, so that whether the html file needs to be updated or not can be judged through the abstract identification with small data volume, cache management of the html file is realized, the flow number consumed by html loading can be greatly reduced, and the html loading speed is also improved.
Example two
Fig. 2 is a flowchart illustrating a method for processing a vehicle hypertext markup language document according to a second embodiment of the present invention, which includes:
step S201, responding to a hypertext markup language file list obtaining request, obtaining a hypertext markup language file list from a server, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files and corresponding file abstract identifications, and the file abstract identifications are generated according to the contents of the hypertext markup language files;
step S202, comparing the remote hypertext markup language file list acquired from the server with the local hypertext markup language file list stored in the vehicle-mounted memory according to the file identification and the corresponding file abstract identification:
if the far-end file identification in the far-end hypertext markup language file list does not exist in the local hypertext markup language file list, taking the far-end file identification as a file identification to be downloaded, triggering a hypertext markup language file acquisition request comprising the file identification to be downloaded, acquiring the hypertext markup language file of the file identification to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the far-end file identification is consistent with the local file identification of the local hypertext markup language file list and the file abstract identification corresponding to the far-end file identification is inconsistent with the file abstract identification corresponding to the local file identification, taking the far-end file identification as the identification of the file to be downloaded, triggering a hypertext markup language file acquisition request comprising the identification of the file to be downloaded, acquiring the hypertext markup language file of the identification of the file to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the remote file identification is consistent with the local file identification and the file abstract identification corresponding to the remote file identification is consistent with the file abstract identification corresponding to the local file identification, acquiring a local hypertext markup language file corresponding to the local file identification from a vehicle-mounted memory, and rendering and displaying the local hypertext markup language file;
and if the local file identification does not exist in the remote hypertext markup language file list, deleting the local file identification from the local hypertext markup language file list, and deleting the hypertext markup language file corresponding to the local file identification.
The embodiment specifically performs the determination according to the file identifier and the digest identifier:
if the far-end file identification does not exist in the local hypertext markup language file list, the html file corresponding to the far-end file identification is a new html file and needs to be downloaded;
if the remote file identifier is consistent with the local file identifier and the file abstract identifier corresponding to the remote file identifier is not consistent with the file abstract identifier corresponding to the local file identifier, indicating that the html file corresponding to the remote file identifier is updated and needs to be downloaded;
if the remote file identification is consistent with the local file identification and the file abstract identification corresponding to the remote file identification is consistent with the file abstract identification corresponding to the local file identification, the html file corresponding to the remote file identification is not updated and does not need to be downloaded, and the html file corresponding to the remote file identification is directly rendered and displayed by the local html file;
if the local file identifier does not exist in the remote hypertext markup language file list, the html file corresponding to the local file identifier is deleted from the server, and the problem that the occupied storage is gradually increased due to the gradual increase of the cached files under the Android native caching mechanism can be solved.
Specifically, the hypertext markup language file list stored in the vehicle-mounted memory is used as a local hypertext markup language file list, and the hypertext markup language file list is acquired from the server and used as a remote hypertext markup language file list. A local hypertext markup language file list is stored in the vehicle memory. The local hypertext markup language file list also includes file identifications of one or more hypertext markup language files and corresponding file digest identifications.
According to the embodiment, specific judgment is carried out according to the file identification and the abstract identification, and cache html is subjected to adding, changing and deleting management under the condition that the html file is changed, so that the problem that occupied storage is gradually increased due to gradual increase of the cache file under an Android native cache mechanism can be solved.
In one embodiment, the obtaining, from the server, the html file identified by the file to be downloaded as a downloaded html file, and rendering and displaying the downloaded html file specifically includes:
acquiring the hypertext markup language file marked by the file to be downloaded from a server as a downloaded hypertext markup language file;
analyzing the downloaded hypertext markup language file, crawling a resource file link included in the downloaded hypertext markup language file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory;
and rendering and displaying the downloaded hypertext markup language file after all resource files included in the downloaded hypertext markup language file are downloaded.
Specifically, after the html file downloading is completed, resource file links attached inside the html are crawled, corresponding resource files are downloaded, and the resource files are placed in a local resource pool according to a strict html resource file format. And after all resource files included in the downloaded hypertext markup language file are downloaded, informing, for example, Webview to load html, and realizing the rendering display of the html file.
Because the html file is rendered and displayed after all resource files included in the downloaded hypertext markup language file are downloaded, the technical problem that passengers mistakenly think of equipment faults due to the fact that only the html file frame is displayed but the resource files in the html file frame cannot be displayed is solved.
According to the method for acquiring the html attached resource file based on the crawling method, cache management of the html file is achieved, the flow number consumed by html loading can be greatly reduced, and the html loading speed is also improved.
In one embodiment, the parsing the downloaded html file, crawling a resource file link included in the downloaded html file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory specifically includes:
analyzing the downloaded hypertext markup language file, and crawling a resource file link included in the downloaded hypertext markup language file as a resource file link to be downloaded;
if a local file identifier consistent with the identifier of the file to be downloaded exists, acquiring a hypertext markup language file corresponding to the local file identifier as a hypertext markup language file to be compared, analyzing the hypertext markup language file to be compared, crawling a resource file link included in the hypertext markup language file to be compared as a resource file link to be compared;
taking the resource identifier corresponding to the resource file link to be compared as a resource identifier to be compared, and taking the resource identifier corresponding to the resource file link to be downloaded as a resource identifier to be downloaded;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is inconsistent with the resource abstract identifier corresponding to the resource identifier to be compared, downloading the corresponding resource file according to the resource file link to be downloaded and storing the resource file in a vehicle-mounted memory;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is consistent with the resource abstract identifier corresponding to the resource identifier to be compared, acquiring a resource file corresponding to the resource file link to be compared from a vehicle-mounted memory;
if the resource identifier to be downloaded does not exist in the hypertext markup language file to be compared, downloading a corresponding resource file according to the resource file link to be downloaded, and storing the resource file in a vehicle-mounted memory;
and if the resource identifier to be compared does not exist in the hypertext markup language file to be downloaded, deleting the resource file corresponding to the resource identifier to be compared from the vehicle-mounted memory.
Specifically, in this embodiment, a resource abstract identifier is generated for a resource file, so that the determination is performed according to the resource identifier and the resource abstract identifier, where the resource identifier may be a name of the resource file or a unique identifier of the resource file. The resource digest identifier is generated according to the content of the resource file, for example, the digest identifier is generated by using the MD5 algorithm.
If the local file identifier consistent with the identifier of the file to be downloaded does not exist, the html file corresponding to the identifier of the file to be downloaded is represented as a new file, and the included resource file can be directly downloaded.
If the local file identification consistent with the identification of the file to be downloaded exists, the resource file is further judged:
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is inconsistent with the resource abstract identifier corresponding to the resource identifier to be compared, the resource file corresponding to the resource identifier to be downloaded is updated, so that the corresponding resource file is downloaded;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is consistent with the resource abstract identifier corresponding to the resource identifier to be compared, it indicates that the resource file corresponding to the resource identifier to be downloaded is not updated and does not need to be downloaded;
if the resource identifier to be downloaded does not exist in the hypertext markup language file to be compared, the resource file corresponding to the resource identifier to be downloaded is represented as a new resource file, and therefore the corresponding resource file is downloaded;
and if the resource identifier to be compared does not exist in the hypertext markup language file to be downloaded, the resource file corresponding to the resource identifier to be compared is deleted from the server, so that the resource file corresponding to the resource identifier to be compared is deleted from the vehicle-mounted memory.
In the embodiment, under the condition that the html file is changed, change deletion management is added to the auxiliary resource file caching the html, and the problem that occupied storage is gradually increased due to gradual increase of the cached file under an Android native caching mechanism can be solved.
Fig. 3 is a flowchart illustrating the operation of downloading html files according to the preferred embodiment of the present invention, which includes:
step S301, setting Webview, and transmitting html url;
step S302, intercepting the name of the html file;
step S303, is the html file confirmed in the cache directory? If the step S304 is executed, otherwise, after the html is downloaded, the step S304 is executed;
step S304, Jsoup interprets local html;
step S305, traversing and acquiring href labels of link elements;
step S306, judging whether an accessory resource folder exists or not, and if not, establishing the accessory resource folder;
step S307, judging whether the attached resource file exists or not, and downloading if the attached resource file does not exist;
and step S308, informing the Webview to load the local html.
Wherein, as shown by the dotted line in fig. 3, the target html is linked: http://. x. x./user _ manual/type _ place.
Html, the local path is set to path +/tyr _ place. The tag link, href attribute value, and tag img, src attribute value are then crawled. The method comprises the following steps of crawling html auxiliary files: list file: type _ place. files/filelist. xml, JavaScript file: files/video. ccs, picture file: files/image1. png.
A resource pool folder is then created, ensuring that it is at the same level as the html files. For example, a resource pool is established, the resource pool is path +/tyre _ replace. And when the downloading is finished, checking based on the size of the file.
The positions of the saved auxiliary files are as follows:
list file: xml, JavaScript file: ccs, resource pool path +/video. ccs, picture file: resource pool path +/image1. png.
After the cache is finished, WebView loads a local path tyre _ place. Html path +/tyre _ place.
Fig. 4 is a flowchart illustrating a local html file deleting method according to a preferred embodiment of the present invention, including:
step S401, identifying the old html file based on the MD5 identifier;
step S402, constructing a resource pool path, namely a path + [ html file name + ". files" ];
step S403, judging whether a resource pool exists or not, if so, executing step S404, otherwise, executing step S406;
step S404, recursively deleting files in the resource pool;
step S405, deleting the resource pool;
step S406, deleting the old html file.
Specifically, step S401 identifies an old html file, then step S402 constructs a resource pool path, step S403 determines whether the resource pool exists according to the resource pool path, if so, step S404 is executed to delete the file in the resource pool, and then step S405 is executed to delete the resource pool. Finally, step S406 is executed to delete the old html file.
If the auxiliary file is a large file such as a video, the change management of the auxiliary file needs to be realized by carrying out unique file naming on each file (picture, video and the like) in html 5;
and then adding a file id in an html (hypertext markup language) attached file label, wherein the filling content in the id is a 32-bit MD5 character string (other summarization algorithms can be adopted at present).
As shown in fig. 5, the work flow diagram for managing the resource file after the html is judged to have a change, according to the preferred embodiment of the present invention, includes:
step S501, the Jsoup interprets the local original html;
step S502, the original attached file name and the unique id are obtained in a traversing mode;
step S503, deleting the local original html;
step S504, the html after the change is downloaded;
step S505, the new attached file name and the unique id are obtained in a traversing manner;
step S506, identifying a file list to be deleted, and executing deletion;
step S507, identifying a file list to be updated and newly added, and executing downloading;
in step S508, the caching is ended.
Specifically, by comparing the id of the attached file with the same name, if the id is changed, the file is changed, the original attached file needs to be placed in a list to be deleted, and the new attached file is placed in the list to be downloaded; if the new html has the newly added file name, the file is placed in the list to be downloaded; if the original file name does not appear in the new html, the original auxiliary file needs to be placed in a list to be deleted.
EXAMPLE III
Fig. 6 is a flowchart illustrating a method for processing a hypertext markup language document in a server according to the present invention, which includes:
step S601, establishing a hypertext markup language file list, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files, generating a file abstract identification related to the content of each hypertext markup language file according to the content of each hypertext markup language file, and associating the file abstract identification with the file identification of the corresponding hypertext markup language file;
step S602, responding to a hypertext markup language file list acquisition request, returning a hypertext markup language file list to the vehicle-mounted electronic equipment, wherein the hypertext markup language file list is used for comparing the vehicle-mounted electronic equipment with a hypertext markup language file list stored in a vehicle-mounted memory, and triggering the hypertext markup language file acquisition request according to a comparison result;
step S603, responding to a hypertext markup language file acquisition request, returning a hypertext markup language file indicated by the hypertext markup language file acquisition request to the vehicle-mounted electronic equipment as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file by the vehicle-mounted electronic equipment;
step S604, responding to the change event of the content of the hypertext markup language file, and updating the corresponding file abstract identification according to the changed content of the hypertext markup language file.
Specifically, the present embodiment is mainly applied to a server. In the server, step S601 is executed to establish a hypertext markup language file list, where the hypertext markup language file list includes file identifiers of one or more hypertext markup language files and corresponding file digest identifiers, where the file identifiers may be names of html files or unique identifiers of the html files. The file digest identifier is generated according to the content of the html file, for example, the digest identifier is generated by using an MD5 algorithm.
Then, when receiving a hypertext markup language file list acquisition request sent by the vehicle-mounted electronic device, triggering step S602 to return a hypertext markup language file list to the vehicle-mounted electronic device.
Then, when a hypertext markup language file acquisition request sent by the vehicle-mounted electronic equipment is received, returning a hypertext markup language file indicated by the hypertext markup language file acquisition request to the vehicle-mounted electronic equipment as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file by the vehicle-mounted electronic equipment.
Finally, when the html file content is changed, the triggering step S604 updates the corresponding file abstract identifier according to the changed hypertext markup language file content.
The method generates the abstract identification according to the content of the hypertext markup language file, and the abstract identification is generated based on the content of the html file, so that whether the html file needs to be updated or not can be judged through the abstract identification with small data volume, cache management of the html file is realized, the flow number consumed by html loading can be greatly reduced, and the html loading speed is also improved.
In one embodiment, the method further comprises:
responding to the resource file change event, and taking the resource file included in the resource file change event as a resource file to be updated;
generating a resource abstract identification of the resource file to be updated as a resource abstract identification to be updated;
searching a hypertext markup language file comprising a resource file link pointing to the resource file to be updated as a hypertext markup language file to be updated;
in the hypertext markup language file to be updated, updating a resource abstract identifier corresponding to a resource file link pointing to the resource file to be updated into a corresponding resource abstract identifier to be updated;
triggering the update of the hypertext markup language file list.
And when the resource file is changed, generating a new resource abstract identification to be updated, and then updating the resource abstract identification in the corresponding html file into the corresponding resource abstract identification to be updated. And updating the resource abstract identification in the html file, so that a hypertext markup language file content change event is generated, and the corresponding file abstract identification is updated according to the changed hypertext markup language file content.
According to the method and the device, change management of the resource file is added, so that when the resource file is changed, html file updating can be triggered simultaneously, and the vehicle-mounted electronic equipment can update the resource file.
EXAMPLE five
Fig. 7 is a schematic diagram of a hardware structure of an electronic device for processing a vehicle html document according to the present invention, which includes:
at least one processor 701; and the number of the first and second groups,
a memory 702 communicatively coupled to at least one of the processors 701; wherein the content of the first and second substances,
the memory 702 stores instructions executable by at least one of the processors 701 to cause at least one of the processors 701 to:
responding to a hypertext markup language file list acquisition request, acquiring a hypertext markup language file list from a server, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files and corresponding file abstract identifications, and the file abstract identifications are generated according to the contents of the hypertext markup language files;
comparing a remote hypertext markup language file list acquired from a server with a local hypertext markup language file list stored in a vehicle-mounted memory according to a file identifier and a corresponding file abstract identifier, triggering a hypertext markup language file acquisition request according to a comparison result, acquiring the hypertext markup language file from the server as a downloaded hypertext markup language file, rendering and displaying the downloaded hypertext markup language file, or acquiring the local hypertext markup language file from the vehicle-mounted memory, rendering and displaying the local hypertext markup language file.
The Electronic device is preferably an automotive Electronic Control Unit (ECU). In fig. 7, one processor 701 is taken as an example.
The electronic device may further include: an input device 703 and a display device 704.
The processor 701, the memory 702, the input device 703 and the display device 704 may be connected by a bus or other means, and are illustrated as being connected by a bus.
The memory 702 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the vehicle html document processing method in the embodiment of the present application, for example, the method flow shown in fig. 1. The processor 701 executes various functional applications and data processing by running nonvolatile software programs, instructions, and modules stored in the memory 702, that is, implements the vehicle hypertext markup language file processing method in the above-described embodiment.
The memory 702 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the in-vehicle hypertext markup language file processing method, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 702 optionally includes memory located remotely from processor 701, which may be connected via a network to a device that performs onboard hypertext markup language document processing methods. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Input device 703 may receive input user clicks and generate signal inputs related to user settings and function controls for the onboard hypertext markup language document processing method. Display device 704 may include a display screen or the like.
When the one or more modules are stored in the memory 702 and executed by the one or more processors 701, the vehicle-mounted hypertext markup language file processing method in any of the above-described method embodiments is executed.
The method generates the abstract identification according to the content of the hypertext markup language file, and the abstract identification is generated based on the content of the html file, so that whether the html file needs to be updated or not can be judged through the abstract identification with small data volume, cache management of the html file is realized, the flow number consumed by html loading can be greatly reduced, and the html loading speed is also improved.
EXAMPLE six
A fifth embodiment of the present invention provides an electronic device for processing a vehicle-mounted hypertext markup language document, including:
at least one processor;
a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,
the memory stores instructions executable by at least one of the processors to enable the at least one of the processors to:
responding to a hypertext markup language file list acquisition request, acquiring a hypertext markup language file list from a server, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files and corresponding file abstract identifications, and the file abstract identifications are generated according to the contents of the hypertext markup language files;
comparing a remote hypertext markup language file list acquired from the server with a local hypertext markup language file list stored in a vehicle-mounted memory according to the file identification and the corresponding file abstract identification:
if the far-end file identification does not exist in the local hypertext markup language file list, taking the far-end file identification as a file identification to be downloaded, triggering a hypertext markup language file acquisition request comprising the file identification to be downloaded, acquiring a hypertext markup language file identified by the file to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the far-end file identification is consistent with the local file identification and the file abstract identification corresponding to the far-end file identification is inconsistent with the file abstract identification corresponding to the local file identification, taking the far-end file identification as a file identification to be downloaded, triggering a hypertext markup language file acquisition request comprising the file identification to be downloaded, acquiring the hypertext markup language file of the file identification to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the remote file identification is consistent with the local file identification and the file abstract identification corresponding to the remote file identification is consistent with the file abstract identification corresponding to the local file identification, acquiring a local hypertext markup language file corresponding to the local file identification from a vehicle-mounted memory, and rendering and displaying the local hypertext markup language file;
and if the local file identification does not exist in the remote hypertext markup language file list, deleting the local file identification from the local hypertext markup language file list, and deleting the hypertext markup language file corresponding to the local file identification.
According to the embodiment, specific judgment is carried out according to the file identification and the abstract identification, and cache html is subjected to adding, changing and deleting management under the condition that the html file is changed, so that the problem that occupied storage is gradually increased due to gradual increase of the cache file under an Android native cache mechanism can be solved.
In one embodiment, the obtaining, from the server, the html file identified by the file to be downloaded as a downloaded html file, and rendering and displaying the downloaded html file specifically includes:
acquiring the hypertext markup language file marked by the file to be downloaded from a server as a downloaded hypertext markup language file;
analyzing the downloaded hypertext markup language file, crawling a resource file link included in the downloaded hypertext markup language file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory;
and rendering and displaying the downloaded hypertext markup language file after all resource files included in the downloaded hypertext markup language file are downloaded.
According to the method for acquiring the html attached resource file based on the crawling method, cache management of the html file is achieved, the flow number consumed by html loading can be greatly reduced, and the html loading speed is also improved.
In one embodiment, the parsing the downloaded html file, crawling a resource file link included in the downloaded html file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory specifically includes:
analyzing the downloaded hypertext markup language file, and crawling a resource file link included in the downloaded hypertext markup language file as a resource file link to be downloaded;
if a local file identifier consistent with the identifier of the file to be downloaded exists, acquiring a hypertext markup language file corresponding to the local file identifier as a hypertext markup language file to be compared, analyzing the hypertext markup language file to be compared, crawling a resource file link included in the hypertext markup language file to be compared as a resource file link to be compared;
taking the resource identifier corresponding to the resource file link to be compared as a resource identifier to be compared, and taking the resource identifier corresponding to the resource file link to be downloaded as a resource identifier to be downloaded;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is inconsistent with the resource abstract identifier corresponding to the resource identifier to be compared, downloading the corresponding resource file according to the resource file link to be downloaded and storing the resource file in a vehicle-mounted memory;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is consistent with the resource abstract identifier corresponding to the resource identifier to be compared, acquiring a resource file corresponding to the resource file link to be compared from a vehicle-mounted memory;
if the resource identifier to be downloaded does not exist in the hypertext markup language file to be compared, downloading a corresponding resource file according to the resource file link to be downloaded, and storing the resource file in a vehicle-mounted memory;
and if the resource identifier to be compared does not exist in the hypertext markup language file to be downloaded, deleting the resource file corresponding to the resource identifier to be compared from the vehicle-mounted memory.
In the embodiment, under the condition that the html file is changed, change deletion management is added to the auxiliary resource file caching the html, and the problem that occupied storage is gradually increased due to gradual increase of the cached file under an Android native caching mechanism can be solved.
EXAMPLE seven
Fig. 8 is a schematic diagram of a hardware structure of a html document processing server according to the present invention, including:
at least one processor 801; and the number of the first and second groups,
a memory 802 communicatively coupled to at least one of the processors 801; wherein the content of the first and second substances,
the memory 802 stores instructions executable by at least one of the processors 801 to enable at least one of the processors 801 to:
establishing a hypertext markup language file list, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files, and generating a file abstract identification about the content of each hypertext markup language file according to the content of each hypertext markup language file, and associating the file abstract identification with the file identification of the corresponding hypertext markup language file;
responding to a hypertext markup language file list acquisition request, returning a hypertext markup language file list to the vehicle-mounted electronic equipment, wherein the hypertext markup language file list is used for comparing the vehicle-mounted electronic equipment with the hypertext markup language file list stored in a vehicle-mounted memory, and triggering the hypertext markup language file acquisition request according to a comparison result;
responding to a hypertext markup language file acquisition request, returning a hypertext markup language file indicated by the hypertext markup language file acquisition request to vehicle-mounted electronic equipment as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file by the vehicle-mounted electronic equipment;
and responding to the content change event of the hypertext markup language file, and updating the corresponding file abstract identification according to the changed content of the hypertext markup language file.
Fig. 8 illustrates an example of a processor 801.
The server may further include: an input device 803 and a display device 804.
The processor 801, the memory 802, the input device 803, and the display device 804 may be connected by a bus or other means, and are illustrated as being connected by a bus.
The memory 802 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the server html document processing method in the embodiment of the present application, for example, the method flow shown in fig. 1. The processor 801 executes various functional applications and data processing by running nonvolatile software programs, instructions, and modules stored in the memory 802, that is, implements the server html document processing method in the above-described embodiment.
The memory 802 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the server hypertext markup language file processing method, and the like. Further, the memory 802 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 802 optionally includes memory located remotely from the processor 801, which may be connected via a network to a device that performs server hypertext markup language document processing methods. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 803 may receive an input of a user click and generate signal inputs related to user settings and function control of the server html document processing method. The display device 804 may include a display screen or the like.
The one or more modules stored in the memory 802, when executed by the one or more processors 801, perform the server hypertext markup language document processing method of any of the method embodiments described above.
The method generates the abstract identification according to the content of the hypertext markup language file, and the abstract identification is generated based on the content of the html file, so that whether the html file needs to be updated or not can be judged through the abstract identification with small data volume, cache management of the html file is realized, the flow number consumed by html loading can be greatly reduced, and the html loading speed is also improved.
In one embodiment, the method further comprises:
responding to the resource file change event, and taking the resource file included in the resource file change event as a resource file to be updated;
generating a resource abstract identification of the resource file to be updated as a resource abstract identification to be updated;
searching a hypertext markup language file comprising a resource file link pointing to the resource file to be updated as a hypertext markup language file to be updated;
in the hypertext markup language file to be updated, updating a resource abstract identifier corresponding to a resource file link pointing to the resource file to be updated into a corresponding resource abstract identifier to be updated;
triggering the update of the hypertext markup language file list.
According to the method and the device, change management of the resource file is added, so that when the resource file is changed, html file updating can be triggered simultaneously, and the vehicle-mounted electronic equipment can update the resource file.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A vehicle-mounted hypertext markup language file processing method is characterized by comprising the following steps:
responding to a hypertext markup language file list acquisition request, acquiring a hypertext markup language file list from a server, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files and corresponding file abstract identifications, and the file abstract identifications are generated according to the contents of the hypertext markup language files;
comparing a remote hypertext markup language file list acquired from a server with a local hypertext markup language file list stored in a vehicle-mounted memory according to a file identifier and a corresponding file abstract identifier, triggering a hypertext markup language file acquisition request according to a comparison result, acquiring the hypertext markup language file from the server as a downloaded hypertext markup language file, rendering and displaying the downloaded hypertext markup language file, or acquiring the local hypertext markup language file from the vehicle-mounted memory, rendering and displaying the local hypertext markup language file.
2. The method for processing the html file according to claim 1, wherein the comparing, according to the file identifier and the corresponding file abstract identifier, the remote html file list obtained from the server with the local html file list stored in the onboard memory, triggering a html file obtaining request according to the comparison result, obtaining the html file from the server as a downloaded html file, rendering and displaying the downloaded html file, or obtaining the local html file from the onboard memory, rendering and displaying the local html file, specifically includes:
comparing a remote hypertext markup language file list acquired from the server with a local hypertext markup language file list stored in a vehicle-mounted memory according to the file identification and the corresponding file abstract identification:
if the far-end file identification in the far-end hypertext markup language file list does not exist in the local hypertext markup language file list, taking the far-end file identification as a file identification to be downloaded, triggering a hypertext markup language file acquisition request comprising the file identification to be downloaded, acquiring the hypertext markup language file of the file identification to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the far-end file identification is consistent with the local file identification of the local hypertext markup language file list and the file abstract identification corresponding to the far-end file identification is inconsistent with the file abstract identification corresponding to the local file identification, taking the far-end file identification as the identification of the file to be downloaded, triggering a hypertext markup language file acquisition request comprising the identification of the file to be downloaded, acquiring the hypertext markup language file of the identification of the file to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the remote file identification is consistent with the local file identification and the file abstract identification corresponding to the remote file identification is consistent with the file abstract identification corresponding to the local file identification, acquiring a local hypertext markup language file corresponding to the local file identification from a vehicle-mounted memory, and rendering and displaying the local hypertext markup language file;
and if the local file identification does not exist in the remote hypertext markup language file list, deleting the local file identification from the local hypertext markup language file list, and deleting the hypertext markup language file corresponding to the local file identification.
3. The method for processing the vehicle-mounted hypertext markup language file according to claim 2, wherein the step of obtaining the hypertext markup language file identified by the file to be downloaded from the server as a downloaded hypertext markup language file and displaying the downloaded hypertext markup language file in a rendering manner specifically comprises:
acquiring the hypertext markup language file marked by the file to be downloaded from a server as a downloaded hypertext markup language file;
analyzing the downloaded hypertext markup language file, crawling a resource file link included in the downloaded hypertext markup language file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory;
and rendering and displaying the downloaded hypertext markup language file after all resource files included in the downloaded hypertext markup language file are downloaded.
4. The method for processing the html file according to claim 3, wherein the parsing the downloaded html file, crawling the resource file link included in the downloaded html file, downloading the corresponding resource file according to the resource file link, and storing the corresponding resource file in the vehicle-mounted memory specifically includes:
analyzing the downloaded hypertext markup language file, and crawling a resource file link included in the downloaded hypertext markup language file as a resource file link to be downloaded;
if a local file identifier consistent with the identifier of the file to be downloaded exists, acquiring a hypertext markup language file corresponding to the local file identifier as a hypertext markup language file to be compared, analyzing the hypertext markup language file to be compared, crawling a resource file link included in the hypertext markup language file to be compared as a resource file link to be compared;
taking the resource identifier corresponding to the resource file link to be compared as a resource identifier to be compared, and taking the resource identifier corresponding to the resource file link to be downloaded as a resource identifier to be downloaded;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is inconsistent with the resource abstract identifier corresponding to the resource identifier to be compared, downloading the corresponding resource file according to the resource file link to be downloaded and storing the resource file in a vehicle-mounted memory;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is consistent with the resource abstract identifier corresponding to the resource identifier to be compared, acquiring a resource file corresponding to the resource file link to be compared from a vehicle-mounted memory;
if the resource identifier to be downloaded does not exist in the hypertext markup language file to be compared, downloading a corresponding resource file according to the resource file link to be downloaded, and storing the resource file in a vehicle-mounted memory;
and if the resource identifier to be compared does not exist in the hypertext markup language file to be downloaded, deleting the resource file corresponding to the resource identifier to be compared from the vehicle-mounted memory.
5. An in-vehicle hypertext markup language document processing electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,
the memory stores instructions executable by at least one of the processors to enable the at least one of the processors to:
responding to a hypertext markup language file list acquisition request, acquiring a hypertext markup language file list from a server, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files and corresponding file abstract identifications, and the file abstract identifications are generated according to the contents of the hypertext markup language files;
comparing a remote hypertext markup language file list acquired from a server with a local hypertext markup language file list stored in a vehicle-mounted memory according to a file identifier and a corresponding file abstract identifier, triggering a hypertext markup language file acquisition request according to a comparison result, acquiring the hypertext markup language file from the server as a downloaded hypertext markup language file, rendering and displaying the downloaded hypertext markup language file, or acquiring the local hypertext markup language file from the vehicle-mounted memory, rendering and displaying the local hypertext markup language file.
6. The vehicle-mounted electronic device for processing html documents according to claim 5, wherein the comparing the far-end html document list obtained from the server with the local html document list stored in the vehicle-mounted memory according to the document identifier and the corresponding document abstract identifier, triggering a html document obtaining request according to the comparison result, obtaining the html document from the server as a downloaded html document, rendering and displaying the downloaded html document, or obtaining the local html document from the vehicle-mounted memory, rendering and displaying the local html document specifically comprises:
comparing a remote hypertext markup language file list acquired from the server with a local hypertext markup language file list stored in a vehicle-mounted memory according to the file identification and the corresponding file abstract identification:
if the far-end file identification in the far-end hypertext markup language file list does not exist in the local hypertext markup language file list, taking the far-end file identification as a file identification to be downloaded, triggering a hypertext markup language file acquisition request comprising the file identification to be downloaded, acquiring the hypertext markup language file of the file identification to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the far-end file identification is consistent with the local file identification of the local hypertext markup language file list and the file abstract identification corresponding to the far-end file identification is inconsistent with the file abstract identification corresponding to the local file identification, taking the far-end file identification as the identification of the file to be downloaded, triggering a hypertext markup language file acquisition request comprising the identification of the file to be downloaded, acquiring the hypertext markup language file of the identification of the file to be downloaded from a server as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file;
if the remote file identification is consistent with the local file identification and the file abstract identification corresponding to the remote file identification is consistent with the file abstract identification corresponding to the local file identification, acquiring a local hypertext markup language file corresponding to the local file identification from a vehicle-mounted memory, and rendering and displaying the local hypertext markup language file;
and if the local file identification does not exist in the remote hypertext markup language file list, deleting the local file identification from the local hypertext markup language file list, and deleting the hypertext markup language file corresponding to the local file identification.
7. The vehicle-mounted electronic device for processing html files according to claim 6, wherein the obtaining the html file identified by the file to be downloaded from the server as the downloaded html file, and displaying the downloaded html file in a rendering manner specifically includes:
acquiring the hypertext markup language file marked by the file to be downloaded from a server as a downloaded hypertext markup language file;
analyzing the downloaded hypertext markup language file, crawling a resource file link included in the downloaded hypertext markup language file, downloading a corresponding resource file according to the resource file link, and storing the resource file in a vehicle-mounted memory;
and rendering and displaying the downloaded hypertext markup language file after all resource files included in the downloaded hypertext markup language file are downloaded.
8. The vehicle-mounted electronic device for processing html documents according to claim 7, wherein said parsing the downloaded html document, crawling resource file links included in the downloaded html document, downloading corresponding resource files according to the resource file links, and storing the corresponding resource files in a vehicle-mounted memory specifically comprises:
analyzing the downloaded hypertext markup language file, and crawling a resource file link included in the downloaded hypertext markup language file as a resource file link to be downloaded;
if a local file identifier consistent with the identifier of the file to be downloaded exists, acquiring a hypertext markup language file corresponding to the local file identifier as a hypertext markup language file to be compared, analyzing the hypertext markup language file to be compared, crawling a resource file link included in the hypertext markup language file to be compared as a resource file link to be compared;
taking the resource identifier corresponding to the resource file link to be compared as a resource identifier to be compared, and taking the resource identifier corresponding to the resource file link to be downloaded as a resource identifier to be downloaded;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is inconsistent with the resource abstract identifier corresponding to the resource identifier to be compared, downloading the corresponding resource file according to the resource file link to be downloaded and storing the resource file in a vehicle-mounted memory;
if the resource identifier to be downloaded is consistent with the resource identifier to be compared and the resource abstract identifier corresponding to the resource identifier to be downloaded is consistent with the resource abstract identifier corresponding to the resource identifier to be compared, acquiring a resource file corresponding to the resource file link to be compared from a vehicle-mounted memory;
if the resource identifier to be downloaded does not exist in the hypertext markup language file to be compared, downloading a corresponding resource file according to the resource file link to be downloaded, and storing the resource file in a vehicle-mounted memory;
and if the resource identifier to be compared does not exist in the hypertext markup language file to be downloaded, deleting the resource file corresponding to the resource identifier to be compared from the vehicle-mounted memory.
9. A method for processing a hypertext markup language file of a server, comprising:
establishing a hypertext markup language file list, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files, and generating a file abstract identification about the content of each hypertext markup language file according to the content of each hypertext markup language file, and associating the file abstract identification with the file identification of the corresponding hypertext markup language file;
responding to a hypertext markup language file list acquisition request, returning a hypertext markup language file list to the vehicle-mounted electronic equipment, wherein the hypertext markup language file list is used for comparing the vehicle-mounted electronic equipment with the hypertext markup language file list stored in a vehicle-mounted memory, and triggering the hypertext markup language file acquisition request according to a comparison result;
responding to a hypertext markup language file acquisition request, returning a hypertext markup language file indicated by the hypertext markup language file acquisition request to vehicle-mounted electronic equipment as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file by the vehicle-mounted electronic equipment;
and responding to the content change event of the hypertext markup language file, and updating the corresponding file abstract identification according to the changed content of the hypertext markup language file.
10. The server hypertext markup language document processing method as recited in claim 9, further comprising:
responding to the resource file change event, and taking the resource file included in the resource file change event as a resource file to be updated;
generating a resource abstract identification of the resource file to be updated as a resource abstract identification to be updated;
searching a hypertext markup language file comprising a resource file link pointing to the resource file to be updated as a hypertext markup language file to be updated;
and updating the resource abstract identification corresponding to the resource file link pointing to the resource file to be updated into the corresponding resource abstract identification to be updated in the hypertext markup language file to be updated.
11. A hypertext markup language document processing server, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,
the memory stores instructions executable by at least one of the processors to enable the at least one of the processors to:
establishing a hypertext markup language file list, wherein the hypertext markup language file list comprises file identifications of one or more hypertext markup language files, and generating a file abstract identification about the content of each hypertext markup language file according to the content of each hypertext markup language file, and associating the file abstract identification with the file identification of the corresponding hypertext markup language file;
responding to a hypertext markup language file list acquisition request, returning a hypertext markup language file list to the vehicle-mounted electronic equipment, wherein the hypertext markup language file list is used for comparing the vehicle-mounted electronic equipment with the hypertext markup language file list stored in a vehicle-mounted memory, and triggering the hypertext markup language file acquisition request according to a comparison result;
responding to a hypertext markup language file acquisition request, returning a hypertext markup language file indicated by the hypertext markup language file acquisition request to vehicle-mounted electronic equipment as a downloaded hypertext markup language file, and rendering and displaying the downloaded hypertext markup language file by the vehicle-mounted electronic equipment;
and responding to the content change event of the hypertext markup language file, and updating the corresponding file abstract identification according to the changed content of the hypertext markup language file.
12. The html document processing server of claim 11, wherein the processor is further capable of:
responding to the resource file change event, and taking the resource file included in the resource file change event as a resource file to be updated;
generating a resource abstract identification of the resource file to be updated as a resource abstract identification to be updated;
searching a hypertext markup language file comprising a resource file link pointing to the resource file to be updated as a hypertext markup language file to be updated;
and updating the resource abstract identification corresponding to the resource file link pointing to the resource file to be updated into the corresponding resource abstract identification to be updated in the hypertext markup language file to be updated.
CN202011033055.4A 2020-09-27 Vehicle-mounted hypertext markup language file processing method, electronic equipment, server processing method and server Active CN112182334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011033055.4A CN112182334B (en) 2020-09-27 Vehicle-mounted hypertext markup language file processing method, electronic equipment, server processing method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011033055.4A CN112182334B (en) 2020-09-27 Vehicle-mounted hypertext markup language file processing method, electronic equipment, server processing method and server

Publications (2)

Publication Number Publication Date
CN112182334A true CN112182334A (en) 2021-01-05
CN112182334B CN112182334B (en) 2024-07-05

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304400A (en) * 2017-01-11 2018-07-20 阿里巴巴集团控股有限公司 To the method and apparatus of the tracking of the document function containing hypertext markup language
CN110866198A (en) * 2019-09-27 2020-03-06 上海硬通网络科技有限公司 Static resource caching method, system, device, computer equipment and storage medium
CN111506387A (en) * 2020-03-02 2020-08-07 百度在线网络技术(北京)有限公司 Page pre-rendering method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304400A (en) * 2017-01-11 2018-07-20 阿里巴巴集团控股有限公司 To the method and apparatus of the tracking of the document function containing hypertext markup language
CN110866198A (en) * 2019-09-27 2020-03-06 上海硬通网络科技有限公司 Static resource caching method, system, device, computer equipment and storage medium
CN111506387A (en) * 2020-03-02 2020-08-07 百度在线网络技术(北京)有限公司 Page pre-rendering method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108228282B (en) Method and device for loading website page
US20070067415A1 (en) In-vehicle display apparatus and in-vehicle proxy server for use therewith
US10712915B2 (en) Information presentation using a client on a terminal
US8667480B1 (en) Automatically updating browser extensions, and applications thereof
CN102833350A (en) Processing method and processing device of WebApp updating
EP1548584A2 (en) Application data management method for mobile terminal and mobile terminal used therein
US20070011130A1 (en) Method for browsing contents using page storing file
CN106446174A (en) Method for page loading in application
US8949947B2 (en) Network system and non-transitory computer-readable storage medium
US10037215B2 (en) Method and apparatus for interworking application and web browser
US8046757B2 (en) Method for installing ActiveX control
CN112579928A (en) Page jump method, page jump device, computer equipment and computer readable storage medium
US7231549B1 (en) Method and apparatus for providing on-demand computer diagnostics
CN104834534A (en) Application program function extension method, device and system
CN113761412A (en) Application page display method and device, electronic equipment, medium and application system
CN103077186B (en) A kind of layer data treating apparatus and method
CN112182334B (en) Vehicle-mounted hypertext markup language file processing method, electronic equipment, server processing method and server
CN112182334A (en) Vehicle-mounted hypertext markup language file processing method, electronic equipment, server processing method and server
CN115842733A (en) Resource sharing method, micro front-end system, application and computer readable storage medium
US7580973B2 (en) Method for loading, storing and presenting web pages
CN112689170A (en) Content playing method of display terminal, display terminal and readable storage medium
CN107423367B (en) Web page loading method and device
CN104217021B (en) Reading server, terminal device and its method for showing reading content
CN103258055A (en) Device and method for file downloading
CN106470351A (en) Page display method and page display device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 430056 No. 10 Dongfeng Avenue, Wuhan economic and Technological Development Zone, Wuhan, Hubei

Applicant after: DONGFENG MOTER Co.,Ltd.

Address before: 510800, Fengshen Road, Huadu District, Guangdong, Guangzhou 12

Applicant before: DONGFENG MOTER Co.,Ltd.

GR01 Patent grant