Webpage generation method and device, equipment, storage medium and program product
By acquiring and parsing webpage structure information and tag index tables, identifying and updating element tags and generating accessibility information, the problem of untimely webpage updates is solved, and real-time generation and updating of accessible webpages are achieved.
Patent Information
- Application Number
- CN202511769775.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-03
AI Technical Summary
Existing technologies cannot update webpage structures or content changes in a timely manner, resulting in untimely generation of accessible webpages that cannot meet the access needs of people with disabilities.
By obtaining the webpage structure information and tag index table of the target webpage, we can identify and update element tags, parse multimedia elements to generate accessibility information, and update the webpage in real time.
It enables the timely generation of accessible web pages when the web page structure or content is updated, improving the update efficiency and real-time performance of accessible web pages and meeting the access needs of different user groups.
Smart Images

Figure CN121597176A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and in particular relates to a webpage generation method, apparatus, device, storage medium and program product. Background Technology
[0002] With the rapid development of Internet technology, web pages have become an important carrier of information dissemination. In order to promote equal access to information, accessibility adaptation of web pages ensures that web page content can be accessed by all users (including people with disabilities).
[0003] Currently, accessible web pages are generated by developers manually inspecting and modifying the web page code according to accessibility standards. However, when the web page structure or content is updated, the web page code cannot be updated in a timely manner, thus preventing the timely generation of accessible web pages. Summary of the Invention
[0004] This application provides a webpage generation method, apparatus, device, storage medium, and program product that can promptly generate accessible webpages when the webpage structure or page content is updated.
[0005] In a first aspect, embodiments of this application provide a webpage generation method, including: Obtain the webpage structure information and tag index table of the target webpage. The tag index table includes the historical element tags of the target webpage and the historical position information of each historical element tag. The webpage structure information includes the element tags of the target webpage and the position information of each element tag. Based on the historical position information of the historical element tags and the position information of the element tags, determine the updated element tags in the target webpage; Based on the webpage structure information, determine the multimedia element corresponding to the updated element tag; The multimedia elements are parsed to generate accessibility information; A webpage is generated based on the accessibility attribute information.
[0006] In one possible implementation, before obtaining the webpage structure information and tag index table of the target webpage, the method further includes: Listen to preset key elements of the target webpage; If the preset key elements change, obtain the webpage structure information of the target webpage and the tag index table.
[0007] In one possible implementation, obtaining the webpage structure information and tag index table of the target webpage includes: Obtain the source code of the target webpage; Regular expressions are used to locate element tags in the source code to obtain the position information of each element tag. Each element label is input into the label recognition model to obtain the label type of each element label; The tag type and position information of each element tag are used as the webpage structure information.
[0008] In one possible implementation, parsing the multimedia elements to generate accessibility information includes: Obtain the target tag type corresponding to the multimedia element; Based on the correspondence between label types and recognition models, determine the target recognition model corresponding to the target label type; The target recognition model is used to parse the multimedia elements to generate the accessibility information.
[0009] In one possible implementation, the step of parsing the multimedia elements using the target recognition model to generate the accessibility information includes: Obtain user preference information, which is used to characterize the user's usage habits; The multimedia elements are analyzed using the target recognition model to obtain the analysis results; Determine the template library according to the target tag type; The target template is determined from the template library based on the user preference information; The accessibility information is generated based on the parsing results and the target template.
[0010] In one possible implementation, generating a webpage based on the accessibility attribute information includes: Obtain the target tag type corresponding to the multimedia element; Based on the correspondence between tag types and attribute fields, determine the target attribute fields corresponding to the target tag type; The accessibility information is written into the target attribute field to generate the webpage.
[0011] Secondly, embodiments of this application provide a webpage generation apparatus, comprising: The acquisition module is used to acquire the webpage structure information and tag index table of the target webpage. The tag index table includes the historical element tags of the target webpage and the historical position information of each historical element tag. The webpage structure information includes the element tags of the target webpage and the position information of each element tag. The determination module is used to determine the updated element tags in the target webpage according to the historical position information of the historical element tags and the position information of the element tags; The determining module is further configured to determine the multimedia element corresponding to the updated element tag based on the webpage structure information; The parsing module is used to parse the multimedia elements and generate accessibility information; The generation module is used to generate web pages based on the accessibility attribute information.
[0012] Thirdly, embodiments of this application provide an electronic device, the device including: a processor and a memory storing computer program instructions; When the processor executes computer program instructions, it implements a web page generation method as described in the first aspect.
[0013] Fourthly, embodiments of this application provide a computer storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the web page generation method as described in the first aspect is implemented.
[0014] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform the webpage generation method as described in the first aspect.
[0015] This application discloses a webpage generation method, apparatus, device, storage medium, and program product that acquires the webpage structure information and corresponding tag index table of a target webpage. The webpage structure information includes the element tags of the target webpage and the position information of each element tag. The tag index table includes the historical element tags of the target webpage and the historical position information of each historical element tag. Therefore, by comparing the webpage structure information and the tag index table, the changed element tags in the target webpage can be identified, the updated element tags can be obtained, and the multimedia elements corresponding to the updated element tags can be acquired. The multimedia elements are then parsed to generate accessibility attribute information. In this way, by monitoring changes in the webpage structure in real time and generating accessibility attribute information corresponding to multimedia elements based on the changed updated element tags, an accessible page can be re-rendered based on the accessibility attribute information. This improves the efficiency of updating accessible webpages and ensures real-time performance. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the structure of a webpage generation system provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a webpage generation method provided in an embodiment of this application; Figure 3 This is a flowchart illustrating a method for determining webpage structure information provided in an embodiment of this application; Figure 4 This is a flowchart illustrating a method for determining accessibility information provided in an embodiment of this application; Figure 5 This is a flowchart illustrating an accessibility information injection method provided in an embodiment of this application; Figure 6 This is an exemplary schematic diagram of an accessibility information updating method provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a webpage generation device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0018] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0019] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0020] To address the problems existing in the prior art, embodiments of this application provide a webpage generation method, apparatus, device, storage medium, and program product. The following first describes the system architecture of the webpage generation method provided in this application embodiment, such as... Figure 1 As shown: The system architecture includes a web page data acquisition module, a multimedia tag recognition module, a multimedia content parsing module, a context-aware text generation module, a dynamic attribute injection module, and a real-time update control module.
[0021] The web page data acquisition module is used to obtain the source code of the web page, which includes Hypertext Markup Language (HTML) source code, Cascading Style Sheets (CSS) style sheets, and JavaScript script files.
[0022] The multimedia tag recognition module is used to identify element tags in the source code and the tag types of these element tags. Element tags include... , <audio> 、 <video>Common element tags such as ... Represents image elements. <audio>This represents a video element. <audio>This represents an audio element.
[0023] The multimedia content parsing module is used to parse different multimedia elements and obtain the parsing results of the multimedia elements.
[0024] The context-aware text generation module generates descriptive information based on the parsing results from the multimedia content parsing module, and uses this descriptive information as accessibility information for subsequent generation of accessible web pages.
[0025] The dynamic attribute injection module is used to write the generated accessibility information into the attribute fields corresponding to the multimedia elements, so that when the page is rendered later, the page rendering component can display the description information of the multimedia elements in the accessibility webpage based on the attribute values in the attribute fields.
[0026] The real-time update control module is used to update the description information of different multimedia elements in real time. It also intelligently detects lazy-loaded elements, generates accessibility information for these elements, and writes this information into the corresponding attribute fields.
[0027] It should be noted that the above modules can be deployed in various ways.
[0028] As a preferred embodiment, all of the above modules can be deployed on a cloud server and interact with the user's browser through lightweight scripts embedded in the webpage.
[0029] As another embodiment, all of the above modules can also be integrated into the browser plugin of the user terminal.
[0030] As another embodiment, the web page data acquisition module, dynamic attribute injection module, and real-time update control module can be deployed on the user terminal, while the multimedia tag recognition module, multimedia content parsing module, and context-aware text generation module can be deployed on the cloud server.
[0031] The webpage generation method provided in this application is described below. This method is applied to electronic devices, such as... Figure 2 As shown, the method includes: S201. Obtain the webpage structure information and tag index table of the target webpage.
[0032] The tag index table includes the historical element tags of the target webpage and the historical position information of each historical element tag, while the webpage structure information includes the element tags of the target webpage and the position information of each element tag.
[0033] The webpage structure information is obtained through the webpage data acquisition module. The tag index table is stored locally on the electronic device. The electronic device maintains the tag index table and updates the element tags and their position information in the tag index table in real time.
[0034] S202. Based on the historical position information of historical element tags and the position information of element tags, determine the updated element tags in the target webpage.
[0035] The real-time update control module is used to determine the element labels to be updated.
[0036] Understandably, by comparing the historical position information of historical element tags with the current position information of element tags, we can determine the first and second element tags corresponding to the same position information. The first element tag is the element tag in the historical element tags that corresponds to the same position information, and the second element tag is the element tag in the element tags that corresponds to the same position information. Furthermore, by comparing whether the first and second element tags are the same, we can determine which element tag to update.
[0037] S203. Based on the webpage structure information, determine the multimedia element corresponding to the update element tag.
[0038] The multimedia elements can be images, audio, or video, etc. The real-time update control module is used to determine the multimedia element corresponding to the updated element tag.
[0039] Specifically, after determining the update element tag, the link of the multimedia element carried by the update element tag is found in the source code of the target webpage, such as the Uniform Resource Locator (URL) of the image.
[0040] S204. Parse multimedia elements to generate accessibility information.
[0041] The multimedia content parsing module is used to parse multimedia elements. The context-aware text generation module is used to generate accessibility information.
[0042] Accessibility information refers to descriptive information about multimedia elements. For example, when the multimedia element is an image, accessibility information is used to represent the image content, and the generated accessibility information could be "a person is feeding a cat."
[0043] S205. Generate web pages based on accessibility attribute information.
[0044] Using the above method, the webpage structure information and corresponding tag index table of the target webpage are obtained. The webpage structure information includes the element tags of the target webpage and the position information of each element tag. The tag index table includes the historical element tags of the target webpage and the historical position information of each historical element tag. Therefore, by comparing the webpage structure information and the tag index table, the changed element tags in the target webpage can be identified, the updated element tags can be obtained, and the multimedia elements corresponding to the updated element tags can be acquired. The multimedia elements are then parsed to generate accessibility attribute information. In this way, by monitoring changes in the webpage structure in real time and generating accessibility information corresponding to multimedia elements based on the changed updated element tags, an accessibility page can be re-rendered based on the accessibility information. This improves the efficiency of accessibility page updates and ensures real-time performance.
[0045] In some embodiments of this application, preset key elements of the target webpage can be monitored; if the preset key elements change, the webpage structure information and tag index table of the target webpage can be obtained.
[0046] Among them, the preset key elements can be set in advance based on experience, or all the elements corresponding to the element tags in the tag index table can be used as preset key elements. This application does not restrict this.
[0047] Specifically, electronic devices can use the real-time update control module to call the DOM MutationObserver to monitor changes in the DOM structure of the target webpage in real time.
[0048] Thus, by monitoring the state changes of elements on the target webpage in real time, the above-mentioned event is triggered when a preset key element changes. Figure 2 The webpage generation process shown in the example ensures efficient updating of accessible webpages.
[0049] In addition, the webpage structure information of the target webpage can be obtained according to a preset period, thereby realizing the periodic updating of the webpage and ensuring the efficiency of the accessibility webpage update.
[0050] The following combination Figure 3 This section introduces specific methods for obtaining webpage structure information, such as... Figure 3 As shown, the above S201, obtaining the webpage structure information and tag index table of the target webpage, can be specifically implemented as follows: S2011. Obtain the source code of the target webpage.
[0051] The source code is obtained through the web page data acquisition module.
[0052] Specifically, data collection is achieved through asynchronous loading technology without blocking webpage rendering. This is done by listening for Document Object Model (DOM) change events, such as DOM Content Loaded and DOMContentLoaded events, to ensure the integrity of the acquired source code. Dynamic content from Single-Page Applications (SPAs) is captured. Furthermore, the Intersection Observer API is integrated into electronic devices to pre-capture lazy-loaded elements.
[0053] S2012. Use regular expressions to locate element tags in the source code and obtain the position information of each element tag.
[0054] S2013. Input each element label into the label recognition model to obtain the label type of each element label.
[0055] The electronic device obtains webpage structure information through a multimedia tag recognition module. The tag recognition model can be trained from a Convolutional Neural Network (CNN) model.
[0056] In this way, neural network models can accurately identify nested tags and custom tags in the source code, thereby improving the accuracy of identification.
[0057] S2014. Use the tag type and position information of each element tag as the webpage structure information.
[0058] Furthermore, after determining the webpage structure information, if the target webpage is the initial webpage, a tag index table can be constructed based on the webpage structure information, and this tag index table can be maintained subsequently. When the webpage structure or page content of the target webpage is updated, the element tags in the tag index table and the position information of each element tag are updated.
[0059] The method provided in this application involves obtaining the source code of a target webpage and using regular expressions to validate the source code to obtain element tags, thereby determining the location information of each element tag. The element tags are then input into a tag recognition model to accurately identify the tag type of each element tag. Thus, by combining regular expressions and a neural network model, accurate location and recognition of element tags are achieved, improving recognition accuracy.
[0060] Regarding S204 above, the multimedia elements are parsed to generate accessibility information, which can be specifically implemented through the multimedia content parsing module: Step 1: Obtain the target tag type corresponding to the multimedia element.
[0061] The tag types corresponding to multimedia elements include image type, audio type, and video type.
[0062] Step 2: Determine the target recognition model corresponding to the target label type according to the correspondence between label type and recognition model.
[0063] Step 3: Use the target recognition model to parse the multimedia elements and generate accessibility information.
[0064] In one example, different models are used for parsing different types of multimedia elements: For multimedia elements of the image type, a pre-trained image recognition model is used to... The image recognition model analyzes the elements corresponding to the tags to identify objects, scenes, colors, actions, and other information within the image. The model can be a Residual Network (ResNet) or a YOLO model. For example, for a landscape photograph, the image recognition model can identify elements such as mountains, rivers, and trees, as well as their relative positions.
[0065] For multimedia elements of the audio type, the audio is converted into text, and semantic analysis algorithms are used to extract semantic information, such as the audio theme, events, and emotions. If the audio is music, music information retrieval technology is used to identify information such as song title, artist, and genre.
[0066] For multimedia elements in video format, combining computer vision and speech recognition technologies, <video>The video content is comprehensively analyzed. On one hand, computer vision technology is used to analyze each frame of the video to identify visual information such as scene changes, human actions, and object movement; on the other hand, speech recognition technology is used to identify and semantically analyze the audio content in the video, obtaining visual analysis results and speech analysis results respectively.
[0067] Using the method provided in this application, the target tag type corresponding to each multimedia element can be determined based on the tag type corresponding to each element tag identified above. Since different multimedia element types require different recognition models for processing, this method determines the target recognition model corresponding to the target tag type based on the correspondence between tag type and recognition model. By using the target recognition model to parse the multimedia elements, accessibility information corresponding to different multimedia elements can be obtained, improving the accuracy of the parsing results.
[0068] Regarding step 3 above, the multimedia elements are parsed using a target recognition model to generate accessibility information, such as... Figure 4 As shown, this can be achieved through a context-aware text generation module: S401. Obtain user preference information.
[0069] User preference information is used to characterize a user's usage habits. This user preference information is obtained using historical data specific to each user.
[0070] Specifically, electronic devices can collect information on the disability type and style preferences selected by users over a period of time to determine user preference information.
[0071] S402. Use the target recognition model to parse the multimedia elements and obtain the parsing results.
[0072] Specifically, the parsing process is described in the relevant descriptions in the above embodiments, and will not be repeated here.
[0073] In addition, electronic devices can provide a user feedback interface to collect user evaluations of the descriptive information. These user evaluations are then used to adjust the recognition model, thereby improving the accuracy of the parsing results.
[0074] S403. Determine the template library according to the target tag type.
[0075] It is understandable that multimedia elements with different tag types have different descriptive information. Electronic devices store the correspondence between tag types and template libraries. After determining the target tag type, the template library corresponding to the target tag type is searched.
[0076] The template library includes structured templates, which are pre-set based on the Web Content Accessibility Guidelines (WCAG).
[0077] In one example, the structured template for an image element can be "object-action-scene", and the structured template for a video element can be "theme-plot-scene".
[0078] S404. Determine the target template from the template library based on user preference information.
[0079] Each structured template includes multiple versions, with different versions corresponding to different user preference information.
[0080] In one example, if the user's style preference information is "simple style", the electronic device can determine the target template for the simple style version from the template library based on the style preference information.
[0081] S405. Generate accessibility information based on the parsing results and the target template.
[0082] The method provided in this application, after obtaining the parsing result by using the target recognition model to analyze multimedia elements, uses the target tag type and user preference information to comprehensively select the target template, which improves the accuracy of template selection and thus ensures the accuracy of accessibility information.
[0083] In some embodiments of this application, S205, generating a webpage based on accessibility attribute information, can specifically be implemented as S2051 to S2053, such as... Figure 5 As shown: S2051. Obtain the target tag type corresponding to the multimedia element.
[0084] S2052. Based on the correspondence between tag type and attribute field, determine the target attribute field corresponding to the target tag type.
[0085] Specifically, for multimedia elements with the tag type of image, the corresponding attribute field is the alternate text field; for multimedia elements with the tag type of audio, the corresponding attribute field is the aria-label field; and for multimedia elements with the tag type of video, the corresponding attribute field is the description field.
[0086] S2053. Write accessibility information into the target attribute field and generate a webpage.
[0087] Before writing the accessibility information, semantic compliance verification is performed on the accessibility information. The specific verification method is as follows: Semantic compliance verification includes basic compliance verification and semantic and contextual verification.
[0088] Among them, basic compliance verification refers to non-empty verification, redundancy verification, and keyword stuffing verification of accessibility information.
[0089] Among these, non-empty validation ensures that attribute values are not empty. Redundancy validation identifies and eliminates descriptive information that is highly repetitive with existing attribute values or text content of elements through text similarity comparison. Keyword stuffing validation uses natural language processing techniques to identify and merge meaningless repeated words, ensuring that accessibility information is presented in natural language.
[0090] Semantic and contextual verification refers to using artificial intelligence technology to verify content consistency and operability.
[0091] Content consistency verification refers to using an auxiliary image recognition model to generate baseline description information for image elements, and then comparing its semantic similarity with the description information generated by the main image recognition model to ensure that the description accurately reflects the visual content. The auxiliary image recognition model and the main image recognition model are two different image recognition models.
[0092] Operability verification refers to verifying whether the description of interactive elements clearly indicates the intention of the operation (e.g., containing action words such as "submit" or "search") when the accessibility information includes interactive elements. Interactive elements are HTML elements that users can operate using a mouse, keyboard, touchscreen, or other assistive technologies to trigger corresponding actions; for example, HTML elements can be buttons, form controls, etc. The operation intention refers to the function that can be achieved based on the aforementioned interactive elements.
[0093] Specifically, artificial intelligence technology can be used to infer the operational intent of an interactive element by analyzing its internal attribute values and context. The internal attribute values can be the text of the interactive element or the Accessible Rich Internet Applications (ARIA) standard, while the context refers to the adjacent text of the interactive element and its role on the page.
[0094] After the above verification passes, accessibility information is dynamically injected by writing it into the attribute fields. Specifically, the writing of accessibility information is achieved using component state management. After obtaining the accessibility information, the `useState` component maintains the attribute values of each element. The accessibility information is used to update the state values of each element recorded in the `useState` component, and then the updated accessibility information is synchronized to the attribute fields of each element on the target webpage according to `useState`.
[0095] Using the method provided in this application, attribute fields corresponding to different multimedia elements can be determined based on the target tag type corresponding to the multimedia element. Therefore, based on the correspondence between tag type and attribute field, the target attribute field corresponding to the target tag type is determined. The target attribute field is used to carry accessibility information. After the accessibility information is written into the target attribute field, it is convenient for subsequent electronic devices to re-render and generate accessible web pages.
[0096] The following uses images as an example of multimedia elements to illustrate the webpage generation process. Figure 6 As shown, the method includes: S601, Image Component Rendering.
[0097] In this process, the user terminal uses a page rendering component to render and generate the initial webpage.
[0098] S602. Determine if the URL has changed.
[0099] If yes, then execute S603; otherwise, execute S607.
[0100] In this process, listeners are used to monitor whether each element has changed.
[0101] S603, Call the AI description interface.
[0102] The AI description interface is used to call the multimedia content parsing module to parse the image.
[0103] Specifically, the AI description interface is called through the getImageDescriptionByUrlFromAI function.
[0104] S604. Determine whether the request was successful.
[0105] If yes, then execute S605; otherwise, execute S606.
[0106] S605, Update alt status.
[0107] S606, Keep the default alt.
[0108] S607. Maintain the current state.
[0109] S608, Re-render the component.
[0110] S609. Display img tags with alt text.
[0111] Specifically, using React's `useState` and `useEffect`, accessibility information is dynamically bound to the image's `alt` attribute. The `useState` component stores the state values of different elements. The `useEffect` component listens for changes in a preset key element (image URL) and initiates the process of retrieving accessibility information when a change occurs. Then, the accessibility information is written to the state value recorded in the `useState` component using the `setAltText` directive.
[0112] In addition, Vue can use corresponding reactive and lifecycle mechanisms to dynamically inject accessibility information.
[0113] The method provided in this application uses artificial intelligence technology to automatically identify various elements of a webpage, accurately parse semantics and structure, and generate accessibility information based on the user preferences of different users, thereby meeting the differentiated needs of different user groups such as the visually impaired, the hearing impaired, and the physically disabled.
[0114] Based on the same concept, embodiments of this application provide a webpage generation apparatus, such as... Figure 7 As shown, the device includes: The acquisition module 701 is used to acquire the webpage structure information and tag index table of the target webpage. The tag index table includes the historical element tags of the target webpage and the historical position information of each historical element tag. The webpage structure information includes the element tags of the target webpage and the position information of each element tag. The determining module 702 is used to determine the updated element tags in the target webpage according to the historical position information of the historical element tags and the position information of the element tags; The determining module 702 is further configured to determine the multimedia element corresponding to the updated element tag based on the webpage structure information; The parsing module 703 is used to parse the multimedia elements and generate accessibility information; The generation module 704 is used to generate a webpage based on the accessibility information.
[0115] In one possible implementation, the device further includes: A monitoring module is used to monitor preset key elements of the target webpage; The acquisition module 701 is used to acquire the webpage structure information of the target webpage and the tag index table when the preset key elements change.
[0116] In one possible implementation, module 701 is specifically used for: Obtain the source code of the target webpage; Regular expressions are used to locate element tags in the source code to obtain the position information of each element tag. Each element label is input into the label recognition model to obtain the label type of each element label; The tag type and position information of each element tag are used as the webpage structure information.
[0117] In one possible implementation, parsing module 703 is specifically used for: Obtain the target tag type corresponding to the multimedia element; Based on the correspondence between label types and recognition models, determine the target recognition model corresponding to the target label type; The target recognition model is used to parse the multimedia elements to generate the accessibility information.
[0118] In one possible implementation, parsing module 703 is specifically used for: Obtain user preference information, which is used to characterize the user's usage habits; The multimedia elements are analyzed using the target recognition model to obtain the analysis results; Determine the template library according to the target tag type; The target template is determined from the template library based on the user preference information; The accessibility information is generated based on the parsing results and the target template.
[0119] In one possible implementation, the generation module 704 is specifically used for: Obtain the target tag type corresponding to the multimedia element; Based on the correspondence between tag types and attribute fields, determine the target attribute fields corresponding to the target tag type; The accessibility information is written into the target attribute field to generate the webpage.
[0120] It should be noted that the webpage generation device is the same as the webpage generation method described above. All implementation methods in the above method embodiments are applicable to the embodiments of this device and can achieve the same technical effect.
[0121] Figure 8 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.
[0122] Electronic devices may include a processor 801 and a memory 802 storing computer program instructions.
[0123] Specifically, the processor 801 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0124] Memory 802 may include mass storage for data or instructions. For example, and not limitingly, memory 802 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 802 may include removable or non-removable (or fixed) media. Where appropriate, memory 802 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 802 is non-volatile solid-state memory.
[0125] In a particular embodiment, memory 802 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0126] The processor 801 implements any of the webpage generation methods described in the above embodiments by reading and executing computer program instructions stored in the memory 802.
[0127] In one example, the electronic device may also include a communication interface 803 and a bus 804. For example, Figure 8 As shown, the processor 801, memory 802, and communication interface 803 are connected through bus 804 and complete communication with each other.
[0128] The communication interface 803 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0129] Bus 804 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Super Transmission (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 804 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0130] Furthermore, in conjunction with the webpage generation methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the webpage generation methods in the above embodiments.
[0131] This application also provides a computer program product, including a computer program, which, when executed, implements any of the webpage generation methods described in the above embodiments.
[0132] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0133] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on machine-readable media or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable read-only memory (EROM), floppy disks, compact disc read-only memory (CD-ROM), optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0134] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0135] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0136] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.< / video> < / audio> < / audio> < / video> < / audio>
Claims
1. A method for generating web pages, characterized in that, include: Obtain the webpage structure information and tag index table of the target webpage. The tag index table includes the historical element tags of the target webpage and the historical position information of each historical element tag. The webpage structure information includes the element tags of the target webpage and the position information of each element tag. Based on the historical position information of the historical element tags and the position information of the element tags, determine the updated element tags in the target webpage; Based on the webpage structure information, determine the multimedia element corresponding to the updated element tag; The multimedia elements are parsed to generate accessibility information; Web pages are generated based on the accessibility information.
2. The method according to claim 1, characterized in that, Before obtaining the webpage structure information and tag index table of the target webpage, the method further includes: Listen to preset key elements of the target webpage; If the preset key elements change, obtain the webpage structure information of the target webpage and the tag index table.
3. The method according to claim 1, characterized in that, The process of obtaining the webpage structure information and tag index table of the target webpage includes: Obtain the source code of the target webpage; Regular expressions are used to locate element tags in the source code to obtain the position information of each element tag. Each element label is input into the label recognition model to obtain the label type of each element label; The tag type and position information of each element tag are used as the webpage structure information.
4. The method according to claim 1, characterized in that, The step of parsing the multimedia elements to generate accessibility information includes: Obtain the target tag type corresponding to the multimedia element; Based on the correspondence between label type and recognition model, determine the target recognition model corresponding to the target label type; The target recognition model is used to parse the multimedia elements to generate the accessibility information.
5. The method according to claim 4, characterized in that, The step of parsing the multimedia elements using the target recognition model to generate the accessibility information includes: Obtain user preference information, which is used to characterize the user's usage habits; The multimedia elements are analyzed using the target recognition model to obtain the analysis results; Determine the template library according to the target tag type; The target template is determined from the template library based on the user preference information; The accessibility information is generated based on the parsing results and the target template.
6. The method according to claim 1, characterized in that, The process of generating a webpage based on the accessibility information includes: Obtain the target tag type corresponding to the multimedia element; Based on the correspondence between tag types and attribute fields, determine the target attribute fields corresponding to the target tag type; The accessibility information is written into the target attribute field to generate the webpage.
7. A webpage generation device, characterized in that, include: The acquisition module is used to acquire the webpage structure information and tag index table of the target webpage. The tag index table includes the historical element tags of the target webpage and the historical position information of each historical element tag. The webpage structure information includes the element tags of the target webpage and the position information of each element tag. The determination module is used to determine the updated element tags in the target webpage according to the historical position information of the historical element tags and the position information of the element tags; The determining module is further configured to determine the multimedia element corresponding to the updated element tag based on the webpage structure information; The parsing module is used to parse the multimedia elements and generate accessibility information; The generation module is used to generate web pages based on the accessibility information.
8. An electronic device, characterized in that, The electronic device includes: a processor and a memory storing computer program instructions; The processor executes computer program instructions to implement the web page generation method as described in any one of claims 1-6.
9. A computer storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the webpage generation method as described in any one of claims 1-6.
10. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the web page generation method as described in any one of claims 1-6.