Page adaptation method and device based on artificial intelligence model, and computer equipment
Through the page adaptation method based on the artificial intelligence model, the inefficiency and compatibility of front-end pages on different devices and browsers in the existing technology are solved, efficient page adaptation and compatibility improvement are achieved, and user experience and personalized customization capabilities are improved.
Patent Information
- Application Number
- CN202411817715.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-18
AI Technical Summary
When the prior art realizes the adaptation of front-end pages on different devices and browsers, it is inefficient, and display problems and compatibility problems are prone to, making it difficult to meet the use and display needs of equipment diversity under the rapid development.
The page adaptation method based on the artificial intelligence model is adopted, and by obtaining different types of pages and device information, using the artificial intelligence model for training, matching the semantic information, hierarchical relationships and adaptation rules of page elements, calculating the size, position and display attributes of page elements, and quickly generating the adapted page.
It reduces the code repetition rate, improves development efficiency, enhances page compatibility, reduces page deformation and display abnormalities caused by compatibility differences, can quickly respond to customers' compatibility needs, improve user experience, and realize personalized customization.
Smart Images

Figure CN119646339A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a page adaptation method, device, computer equipment and storage medium based on an artificial intelligence model. Background Art
[0002] With the rapid development of the Internet era, the diversification of electronic device types, and the display of front-end pages on devices of different sizes and resolutions, most developers need to manually write a lot of code to adapt to different devices. The defects of manual coding are: logical functions cannot be reused, code is repeatedly written, and development efficiency is low; the compilation and deployment process after code adjustment is long and time-consuming, resulting in a long development to online cycle; page adaptation is niche and difficult to learn; encapsulation is unfriendly and inconvenient to use; when the devices are diverse, compatibility is difficult. In other words, this approach is inefficient and prone to display and compatibility issues, and it is difficult to meet the use and display needs of diverse devices under rapid development. Summary of the invention
[0003] In order to solve the above technical problems, the present invention provides a page adaptation method based on an artificial intelligence model, which adopts the following technical solution, including:
[0004] Get different types of page and device information;
[0005] Using an artificial intelligence model for training based on the page and device information;
[0006] Through machine analysis, disassembly and adaptation, the semantic information, hierarchical relationships and adaptation rules of the AI model page elements on different devices are matched;
[0007] Record page elements, components, and adaptation rule information;
[0008] Calculate the size, position and display properties of page elements based on device information;
[0009] According to the calculated size, position, display properties and adaptation rules of the page elements, the adapted page is quickly generated.
[0010] Preferably, the step of obtaining different types of page and device information specifically includes:
[0011] Collect different types of page and device information;
[0012] Perform data preprocessing on the collected different types of page and device information.
[0013] Preferably, the step of training using an artificial intelligence model according to the page and device information specifically includes:
[0014] Select a neural network model and initialize the parameters of the neural network model;
[0015] Distributing the page and device information and the neural network model to multiple GPUs or multiple computing nodes, and using a parallel algorithm for training;
[0016] The gradient of the loss function with respect to each parameter is calculated through the back-propagation algorithm, and the optimizer is used to update the parameters to minimize the loss function.
[0017] Evaluate the performance of the model periodically during training.
[0018] Preferably, the steps of matching the semantic information, hierarchical relationships and adaptation rules of the artificial intelligence model page elements on different devices through machine analysis, disassembly and adaptation specifically include:
[0019] Perform semantic analysis on page elements;
[0020] Break down the page into independent elements and components, and determine the hierarchical relationship between elements and components;
[0021] Matching and adaptation are performed based on the semantic information and hierarchical relationships of page elements, as well as the adaptation rules on different devices.
[0022] Preferably, the step of recording page elements, components, and adaptation rule information specifically includes:
[0023] Record the name, type, attributes, and style information of each element;
[0024] Record the name, function, layout, and style information of each component;
[0025] Record the name, applicable conditions, and execution operation information of each adaptation rule;
[0026] Store the adaptation rules in a database or configuration file.
[0027] Preferably, the step of calculating the size, position and display attributes of the page element according to the device information specifically includes:
[0028] Get the device's screen size, resolution, and operating system information;
[0029] Calculate the size and proportion of page elements based on the device's screen size and resolution;
[0030] Calculate the position and layout of page elements based on the device's screen size and resolution;
[0031] Calculates the display properties of page elements based on the device's operating system and browser type.
[0032] Preferably, the step of quickly generating an adapted page according to the calculated size, position, display attribute and adaptation rule of the page element specifically comprises:
[0033] Generate a page based on the calculated size, position, display attributes and adaptation rules of the page elements;
[0034] Optimize the generated pages;
[0035] Test and validate the generated pages;
[0036] Deploy the generated page to the server, publish it and put it online.
[0037] In order to solve the above technical problems, the present invention also provides a page adaptation device based on an artificial intelligence model, which adopts the following technical solution, including:
[0038] The acquisition module is used to obtain different types of page and device information;
[0039] A training module, used for training using an artificial intelligence model according to the page and device information;
[0040] The matching module is used to match the semantic information, hierarchical relationships and adaptation rules of the AI model page elements on different devices through machine analysis, disassembly and adaptation;
[0041] Recording module, used to record page elements, components, and adaptation rule information;
[0042] A calculation module, used to calculate the size, position and display properties of page elements according to device information;
[0043] The generation module is used to quickly generate an adapted page based on the calculated size, position, display properties and adaptation rules of the page elements.
[0044] In order to solve the above technical problems, the present invention also provides a computer device, which adopts the technical solution described below, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the above-mentioned artificial intelligence model-based page adaptation method when executing the computer-readable instructions.
[0045] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, which adopts the technical solution described below, and stores computer-readable instructions on the computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-mentioned artificial intelligence model-based page adaptation method are implemented.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] First, it reduces the code duplication rate, avoids the tedious work of front-end developers developing multiple versions of pages or applications for different devices, improves development efficiency, greatly saves development time and costs, and speeds up project launch;
[0048] Second, it enhances the compatibility of pages, effectively solving the compatibility issues between different devices and browsers, so that pages can be displayed and run stably and consistently on multiple platforms and environments, reducing page deformation, display anomalies and other issues caused by compatibility differences;
[0049] Third, it can quickly respond to customers’ compatibility with different devices and improve user experience;
[0050] Fourth, it can achieve personalized customization: With the help of artificial intelligence and machine learning capabilities and technologies, it can provide personalized page layout and content display for different users based on user preferences, behavior and other data, thereby improving user satisfaction and loyalty;
[0051] Fifth, it can improve user experience: it can automatically generate the optimal page layout plan based on the screen size, resolution and other parameters of different devices, ensuring that the page presents good visual effects and operating experience on various devices, allowing users to browse and operate the page more conveniently. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the scheme in the present invention, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0053] Figure 1 is a flow chart of an embodiment of the method for page adaptation based on an artificial intelligence model of the present invention;
[0054] Figure 2 It is a structural schematic diagram of an embodiment of the artificial intelligence model-based page adaptation device of the present invention;
[0055] Figure 3 It is a schematic structural diagram of an embodiment of a computer device of the present invention. DETAILED DESCRIPTION
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present invention; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present invention or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0057] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0058] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.
[0059] It should be noted that the artificial intelligence model-based page adaptation method provided in the embodiment of the present invention is generally executed by a server / terminal device, and accordingly, the artificial intelligence model-based page adaptation device is generally arranged in the server / terminal device.
[0060] It should be understood that the number of terminal devices, networks and servers is only illustrative. Depending on the implementation requirements, there can be any number of terminal devices, networks and servers.
[0061] Embodiment 1
[0062] Please refer to Figure 1 , shows a flow chart of an embodiment of the method for page adaptation based on artificial intelligence model of the present invention. The method for page adaptation based on artificial intelligence model comprises the following steps:
[0063] Step S1, obtaining different types of page and device information.
[0064] In this embodiment, the electronic device (e.g., server / terminal device) on which the artificial intelligence model-based page adaptation method runs can receive the artificial intelligence model-based page adaptation request through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAXX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0065] In this embodiment, step S1, obtaining different types of page and device information may further include the following steps:
[0066] S11, collects different types of page and device information.
[0067] Data collection is the basis of artificial intelligence model training, and the goal is to obtain data sets of sufficient quantity and quality.
[0068] According to the application scenario and goal of the AI model, clarify the data type, format and scale that need to be collected. For example, for the page adaptation model, it is necessary to collect a large amount of page HTML code, CSS style, JavaScript scripts, as well as screen size, resolution, operating system and other information of different devices.
[0069] Select appropriate data sources, including public data sets, internal enterprise databases, and Internet crawlers. Public data sets such as Common Crawl and Wikipedia provide researchers with a wealth of web data resources; internal enterprise databases may contain proprietary data in specific fields or business scenarios; crawler technology is used to crawl and download data from selected data sources.
[0070] It should be noted that during the data collection process, attention should be paid to complying with relevant laws, regulations and privacy rules to ensure the legality and compliance of the data.
[0071] S12, performing data preprocessing on the collected different types of page and device information.
[0072] Data preprocessing is an important step to improve data quality and model performance. Its goal is to convert raw data into a form suitable for model training.
[0073] Data preprocessing of different types of collected page and device information includes but is not limited to:
[0074] Remove duplicate data: avoid bias in statistical results.
[0075] Handling missing values: Improve data integrity by filling, deleting, or interpolating. Filling methods include using the mean, median, mode, or specific value to fill missing values; deleting methods are suitable for situations with a large number of missing values; and interpolation methods are suitable for continuous data such as time series data.
[0076] Handling outliers: Identify and handle outliers in the data and eliminate interfering factors. Outliers may be caused by data entry errors, measurement errors, etc., and need to be identified and handled through statistical methods or domain knowledge.
[0077] Data format conversion: According to the needs of the artificial intelligence model, the data is converted into a suitable format, such as text, image, audio, etc. For page data, operations such as HTML parsing and CSS style extraction are required.
[0078] Data normalization and standardization: convert the data to the same scale for subsequent processing and analysis. Data normalization is to scale the data so that it falls into a small specific interval (such as between 0 and 1); data standardization is to scale the data so that it conforms to a normal distribution with a mean of 0 and a standard deviation of 1. Both methods can reduce the impact of dimensional differences between different features on model training.
[0079] The dataset is divided into training set, validation set and test set for model training, parameter adjustment and evaluation. The training set is used for model training and contains a large amount of page and device information. The validation set is used for model selection and parameter adjustment to help determine the best model configuration and parameter settings. The test set is used to evaluate the final performance of the model and ensure the generalization ability of the model on unknown data.
[0080] Step S2: training using an artificial intelligence model based on page and device information.
[0081] In this embodiment, step S2, training using an artificial intelligence model according to page and device information may further include the following steps:
[0082] S21, select a neural network model and initialize the parameters of the neural network model.
[0083] Select a neural network model, such as Transformer, CNN (convolutional neural network), RNN (recurrent neural network), etc., and train the model based on the collected data. Methods for initializing the parameters of the neural network model include random initialization, Xavier initialization, etc., to avoid the model falling into a local optimal solution in the early stage of training.
[0084] S22 distributes page and device information and neural network models to multiple GPUs or multiple computing nodes and uses parallel algorithms for training.
[0085] Since model training requires a lot of computing resources, distributed parallel training is used to speed up the training process.
[0086] You can set parallel algorithm rules. For example, when high-concurrency requests for business data are monitored through the network, configure the maximum concurrency number and cancel the control switch based on normal access, selectively configure load balancing, request in batches in sequence, define multiple request queues, and request in steps to reduce server concurrency consumption. At the same time, the server reasonably distributes requests through load balancing.
[0087] Take the case where a page displays multiple image recognition information for use by different clients (apps, web pages, internal systems, visualization, etc.). These clients upload images and initiate image recognition requests from time to time. During business peaks, high concurrent requests are likely to occur.
[0088] Configure high concurrency and cancel the control switch:
[0089] The maximum concurrency configuration is a module specifically designed for concurrent requests in the backend management system page of the AI service. Administrators can set a reasonable maximum concurrency based on the analysis of server hardware performance and past business traffic. For example, a maximum of 99 image recognition requests can be processed per second, and subsequent requests exceeding the limit will be queued.
[0090] Cancel the control switch. When the server is upgraded or the performance is greatly improved, the concurrency limit can be temporarily lifted to adapt to a large number of urgent businesses, so that requests will not be subject to the maximum concurrency limit and can be directly processed. However, this operation must be used with caution to avoid excessive pressure on the server due to long-term unlimited reception of requests.
[0091] Selectively configure load balancing: deploy multiple servers to jointly process image recognition requests, and reasonably allocate resources to process these requests through hardware load. The load balancer will monitor the current load of each server in real time (including CPU usage, memory usage and other indicators).
[0092] Hardware-aware algorithm design: Consider the hardware characteristics of different devices. For example, GPUs (graphics processing units) are good at parallel computing. When designing artificial intelligence algorithms, you can take advantage of this feature and parallelize computing tasks to speed up computing. For devices with special hardware acceleration units (such as neural processing units NPUs), design algorithms that are adapted to them and make efficient use of these hardware resources.
[0093] Perform adaptive reasoning: Dynamically adjust the model reasoning method according to the performance of the device and the current operating environment. For example, when the device resources are sufficient (such as on a high-performance server), complex model structures and high-resolution input data can be used for reasoning; when the device resources are limited (such as on an IoT device), simplify the model structure or reduce the resolution of the input data to achieve fast reasoning.
[0094] S23, calculates the gradient of the loss function with respect to each parameter through the back-propagation algorithm, and uses the optimizer to update the parameters to minimize the loss function.
[0095] The back-propagation algorithm calculates the gradient of the loss function for each parameter using the chain rule. After forward propagation, the error between the actual output and the expected output is calculated, and the error is propagated back from the output layer to the input layer layer by layer using the chain rule to calculate the gradient of each parameter. Subsequently, an appropriate optimizer (such as SGD, Adam, etc.) is selected to update the parameters according to the gradient direction to minimize the loss function. This process is iterated until the stopping condition is reached (such as loss convergence or the number of iterations reaches the upper limit), thereby gradually optimizing the performance of the neural network model.
[0096] S24, periodically evaluate the performance of the model during training.
[0097] During the training process, the performance of the model is regularly evaluated, such as accuracy, recall, and other indicators. Based on the evaluation results, the model parameters, optimizer settings, or data preprocessing methods are adjusted to improve the model performance.
[0098] Step S3, through machine analysis, disassembly and adaptation, match the semantic information, hierarchical relationships and adaptation rules of the artificial intelligence model page elements on different devices.
[0099] In this embodiment, step S3, through machine analysis, disassembly and adaptation, matching the semantic information, hierarchical relationship and adaptation rules of the artificial intelligence model page elements on different devices may also specifically include the following steps:
[0100] S31, performing semantic analysis on page elements.
[0101] Semantic analysis of page elements includes but is not limited to HTML parsing, CSS style analysis, and JavaScript script parsing.
[0102] HTML parsing, parse the HTML code of the page, extract page structure, tags, attributes and other information.
[0103] CSS style analysis: analyze the CSS style of the page and extract the layout, style, animation and other information of the elements.
[0104] JavaScript script parsing, parse the JavaScript script of the page to understand the dynamic behavior of the page and user interaction logic.
[0105] S32, decomposing the page into independent elements and components, and determining the hierarchical relationship between the elements and components.
[0106] Break the page down into separate elements and components so they can be adapted individually.
[0107] Element recognition includes identifying different types of elements on a page, such as text, images, buttons, forms, etc.
[0108] Component division includes dividing the page into different components, such as header, navigation bar, main content, sidebar, bottom, etc.
[0109] Hierarchical relationship determination includes determining the hierarchical relationship between elements and components for correct layout and display.
[0110] S33, matching and adaptation processing is performed according to the semantic information and hierarchical relationship of the page elements and the adaptation rules on different devices.
[0111] Semantic matching uses natural language processing technology to perform semantic matching on page elements and find elements and components that need to remain consistent on different devices.
[0112] Layout adaptation: adjust the layout and spacing of page elements according to the screen size and resolution of the device to adapt to different devices.
[0113] Style adaptation adjusts the style and appearance of page elements according to the device's operating system and browser type to ensure good visual effects on different devices.
[0114] Step S4, record page elements, components, and adaptation rule information.
[0115] In this embodiment, step S4, recording page elements, components, and adaptation rule information may further include the following steps:
[0116] S41, record the name, type, attribute, and style information of each element.
[0117] When recording web page element information, you should systematically and comprehensively mark each page element's name (such as buttons, input boxes, etc.), type (such as HTML tag types div, span, etc.), attributes (such as id, class, href, etc.), and style information (such as color, font size, margin, etc.).
[0118] S42, recording the name, function, layout, and style information of each component.
[0119] When recording information about each component, a systematic approach should be used to ensure accuracy and completeness. Specifically, first record the name of the component to clearly identify it; then describe its function in detail to clearly explain its role in the system. Next, you can draw a layout diagram or provide a layout description to accurately reflect the positional relationship of the components in the interface. Finally, record style information, including visual attributes such as color, font, and margins to ensure the consistency of the component's appearance. In this way, component information can be recorded comprehensively and accurately.
[0120] S43, recording the name, applicable conditions, and execution operation information of each adaptation rule.
[0121] When recording each page adaptation rule, the information should be comprehensive and accurate. Specifically, the rule name should be recorded in detail for easy identification and reference; the applicable conditions, including device type, screen size, resolution, etc., should be clearly stated to ensure the accuracy of rule application; at the same time, the execution operation information should be elaborated in detail, such as layout adjustment, style modification, content optimization and other specific measures to ensure the best display effect of the page in different environments. Through structured recording methods, page adaptation rules can be effectively managed and maintained, improving development efficiency and user experience.
[0122] S44, storing the adaptation rule in a database or a configuration file.
[0123] The adaptation rules are stored in a database or configuration file so that they can be called and applied in subsequent page adaptation processes.
[0124] Database storage: Store the adaptation rules in a relational database or a non-relational database for efficient query and update.
[0125] Configuration file storage: Store the adaptation rules in configuration files in formats such as JSON and YAML for version control and configuration management.
[0126] Step S5, calculating the size, position and display attributes of the page element according to the device information.
[0127] In this embodiment, step S5, calculating the size, position and display attributes of the page element according to the device information, may further include the following steps:
[0128] S51, obtaining the screen size, resolution, and operating system information of the device.
[0129] Get the device's screen size, resolution, operating system and other information for subsequent adaptation.
[0130] Get the screen size by using the device's browser or operating system API to get the screen width and height.
[0131] Get the resolution by using the device's browser or operating system API to get the screen resolution.
[0132] Operating system identification: obtain the operating system type and version information through the device's browser or operating system API.
[0133] S52: Calculate the size and proportion of the page elements according to the screen size and resolution of the device.
[0134] Width and height calculation: Calculate the width and height of page elements according to the screen size and resolution of the device to adapt to different devices.
[0135] Proportional adjustment: adjust the proportions of page elements according to the device's resolution and screen size ratio to ensure a coordinated visual effect on different devices.
[0136] S53: Calculate the position and layout of the page elements according to the screen size and resolution of the device.
[0137] Position calculation: calculate the position of page elements on the page based on the screen size and resolution of the device to ensure correct display on different devices.
[0138] Layout adjustment: adjust the layout of page elements according to the screen size and resolution of the device, such as flow layout, grid layout, etc., to adapt to different devices.
[0139] S54, calculating display attributes of page elements according to the operating system and browser type of the device.
[0140] Font size and style calculation: Calculate the font size and style of page elements based on the device's screen size and resolution to ensure clear display on different devices.
[0141] Color and background calculation: calculate the color and background of page elements based on the device's operating system and browser type to ensure consistent visual effects on different devices.
[0142] Step S6, quickly generating an adapted page according to the calculated size, position, display attributes and adaptation rules of the page elements.
[0143] In this embodiment, step S6, based on the calculated size, position and display attribute of the page element and the adaptation rule, quickly generating the adapted page may further include the following steps:
[0144] S61, generating a page according to the calculated size, position, display attributes and adaptation rules of the page elements.
[0145] HTML code generation: Generate HTML code that conforms to the device screen size and resolution based on device information and adaptation rules.
[0146] CSS style generation: Generate CSS styles that match the device operating system and browser type based on device information and adaptation rules.
[0147] JavaScript script generation: Generate JavaScript scripts that conform to the device interaction logic based on device information and adaptation rules.
[0148] S62, optimizing the generated page.
[0149] Optimize the generated pages to improve page loading speed and user experience.
[0150] Image compression and optimization: compress and optimize images on the page to reduce page loading time.
[0151] Code compression and obfuscation: compress and obfuscate HTML, CSS, JavaScript and other codes to reduce code size and improve security.
[0152] Cache and CDN acceleration, use cache and CDN technology to speed up page loading speed and response time.
[0153] S63, testing and verifying the generated page.
[0154] Test and validate the generated pages to ensure they display and interact correctly on different devices.
[0155] Functional testing: testing whether the various functions of the page are normal, such as navigation, search, form submission, etc.
[0156] Compatibility testing: testing the compatibility and display effects of the page on different devices and browsers.
[0157] Performance testing: testing page loading speed, response time and other performance indicators to ensure that the page can provide a smooth user experience on different devices.
[0158] S64, deploy the generated page to the server, publish it and put it online.
[0159] Server configuration: configure the server and database according to the needs and performance requirements of the page. This includes selecting appropriate server hardware, such as CPU, memory, and storage, to meet the running requirements of the page. At the same time, according to the technology stack that the page relies on, install the corresponding operating system and web server software, such as Linux system and Apache / Nginx, etc.
[0160] In terms of database configuration, select a suitable database management system, such as MySQL, PostgreSQL, etc., according to the data storage and processing capabilities required by the page, and install and configure it accordingly. Ensure that the database performance is optimized to meet the high concurrent access and data processing requirements of the page.
[0161] Next, upload the generated page file to the server, which involves using file transfer tools such as FTP and SCP to upload page code, static resources, etc. to the specified directory of the server.
[0162] Perform publishing and online operations, including configuring a virtual host in the Web server to point to the uploaded page file directory; setting up domain name resolution to point the domain name to the server's IP address; and performing necessary testing and verification to ensure that the page runs normally on the server and that performance meets the standards.
[0163] After completing the above steps, the page can be successfully launched and available for users to access and use.
[0164] Implementing this embodiment has the following beneficial effects:
[0165] First, it reduces the code duplication rate, avoids the tedious work of front-end developers developing multiple versions of pages or applications for different devices, improves development efficiency, greatly saves development time and costs, and speeds up project launch;
[0166] Second, it enhances the compatibility of pages, effectively solving the compatibility issues between different devices and browsers, so that pages can be displayed and run stably and consistently on multiple platforms and environments, reducing page deformation, display anomalies and other issues caused by compatibility differences;
[0167] Third, it can quickly respond to customers’ compatibility with different devices and improve user experience;
[0168] Fourth, it can achieve personalized customization: With the help of artificial intelligence and machine learning capabilities and technologies, it can provide personalized page layout and content display for different users based on user preferences, behavior and other data, thereby improving user satisfaction and loyalty;
[0169] Fifth, it can improve user experience: it can automatically generate the optimal page layout plan based on the screen size, resolution and other parameters of different devices, ensuring that the page presents good visual effects and operating experience on various devices, allowing users to browse and operate the page more conveniently.
[0170] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0171] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0172] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0173] Embodiment 2
[0174] Further references Figure 2 , as a response to the above Figure 1 The present invention provides an embodiment of a page adaptation device based on an artificial intelligence model, and the device embodiment is Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0175] like Figure 2 As shown, the artificial intelligence model-based page adaptation device 70 of this embodiment includes: an acquisition module 71, a training module 72, a matching module 73, a recording module 74, a calculation module 75 and a generation module 76. Among them:
[0176] The acquisition module 71 is used to acquire different types of page and device information;
[0177] A training module 72, for training using an artificial intelligence model based on page and device information;
[0178] A matching module 73, for matching semantic information, hierarchical relationships, and adaptation rules of the artificial intelligence model page elements on different devices through machine analysis, disassembly, and adaptation;
[0179] Recording module 74, used to record page elements, components, and adaptation rule information;
[0180] The calculation module 75 is used to calculate the size, position and display properties of the page elements according to the device information;
[0181] The generation module 76 is used to quickly generate an adapted page according to the calculated size, position and display attributes of the page elements and the adaptation rules.
[0182] Implementing this embodiment has the following beneficial effects:
[0183] First, it reduces the code duplication rate, avoids the tedious work of front-end developers developing multiple versions of pages or applications for different devices, improves development efficiency, greatly saves development time and costs, and speeds up project launch;
[0184] Second, it enhances the compatibility of pages, effectively solving the compatibility issues between different devices and browsers, so that pages can be displayed and run stably and consistently on multiple platforms and environments, reducing page deformation, display anomalies and other issues caused by compatibility differences;
[0185] Third, it can quickly respond to customers’ compatibility with different devices and improve user experience;
[0186] Fourth, it can achieve personalized customization: With the help of artificial intelligence and machine learning capabilities and technologies, it can provide personalized page layout and content display for different users based on user preferences, behavior and other data, thereby improving user satisfaction and loyalty;
[0187] Fifth, it can improve user experience: it can automatically generate the optimal page layout plan based on the screen size, resolution and other parameters of different devices, ensuring that the page presents good visual effects and operating experience on various devices, allowing users to browse and operate the page more conveniently.
[0188] Embodiment 3
[0189] To solve the above technical problems, the embodiment of the present invention also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.
[0190] The above-mentioned computer device 8 includes a memory 81, a processor 82, and a network interface 83 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 8 having components of a memory 81, a processor 82, and a network interface 83, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a programmable gate array (FPGA), a digital processor (DSP), an embedded device, etc.
[0191] The computer device may be a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote control, a touch pad, or a voice control device.
[0192] The memory 81 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 81 may be an internal storage unit of the computer device 8, such as a hard disk or memory of the computer device 8. In other embodiments, the memory 81 may also be an external storage device of the computer device 8, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 8. Of course, the memory 81 may also include both the internal storage unit of the computer device 8 and its external storage device. In this embodiment, the memory 81 is generally used to store the operating system and various application software installed on the computer device 8, such as computer-readable instructions based on the artificial intelligence model page adaptation method. In addition, the memory 81 can also be used to temporarily store various types of data that have been output or are to be output.
[0193] The processor 82 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 82 is generally used to control the overall operation of the computer device 8. In this embodiment, the processor 82 is used to run computer-readable instructions stored in the memory 81 or process data, such as running computer-readable instructions of the artificial intelligence model-based page adaptation method.
[0194] The network interface 83 may include a wireless network interface or a wired network interface. The network interface 83 is generally used to establish a communication connection between the computer device 8 and other electronic devices.
[0195] Implementing this embodiment has the following beneficial effects:
[0196] First, it reduces the code duplication rate, avoids the tedious work of front-end developers developing multiple versions of pages or applications for different devices, improves development efficiency, greatly saves development time and costs, and speeds up project launch;
[0197] Second, it enhances the compatibility of pages, effectively solving the compatibility issues between different devices and browsers, so that pages can be displayed and run stably and consistently on multiple platforms and environments, reducing page deformation, display anomalies and other issues caused by compatibility differences;
[0198] Third, it can quickly respond to customers’ compatibility with different devices and improve user experience;
[0199] Fourth, it can achieve personalized customization: With the help of artificial intelligence and machine learning capabilities and technologies, it can provide personalized page layout and content display for different users based on user preferences, behavior and other data, thereby improving user satisfaction and loyalty;
[0200] Fifth, it can improve user experience: it can automatically generate the optimal page layout plan based on the screen size, resolution and other parameters of different devices, ensuring that the page presents good visual effects and operating experience on various devices, allowing users to browse and operate the page more conveniently.
[0201] Embodiment 4
[0202] The present invention also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned artificial intelligence model-based page adaptation method.
[0203] Implementing this embodiment has the following beneficial effects:
[0204] First, it reduces the code duplication rate, avoids the tedious work of front-end developers developing multiple versions of pages or applications for different devices, improves development efficiency, greatly saves development time and costs, and speeds up project launch;
[0205] Second, it enhances the compatibility of pages, effectively solving the compatibility issues between different devices and browsers, so that pages can be displayed and run stably and consistently on multiple platforms and environments, reducing page deformation, display anomalies and other issues caused by compatibility differences;
[0206] Third, it can quickly respond to customers’ compatibility with different devices and improve user experience;
[0207] Fourth, it can achieve personalized customization: With the help of artificial intelligence and machine learning capabilities and technologies, it can provide personalized page layout and content display for different users based on user preferences, behavior and other data, thereby improving user satisfaction and loyalty;
[0208] Fifth, it can improve user experience: it can automatically generate the optimal page layout plan based on the screen size, resolution and other parameters of different devices, ensuring that the page presents good visual effects and operating experience on various devices, allowing users to browse and operate the page more conveniently.
[0209] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the various embodiment methods of the present invention.
[0210] Obviously, the embodiments described above are only some embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are given in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific embodiments, or to perform equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of the present invention, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.
Claims
1. A page adaptation method based on an artificial intelligence model, characterized in that: The steps include: Get different types of page and device information; Using an artificial intelligence model for training based on the page and device information; Through machine analysis, disassembly and adaptation, the semantic information, hierarchical relationships and adaptation rules of the AI model page elements on different devices are matched; Record page elements, components, and adaptation rule information; Calculate the size, position and display properties of page elements based on device information; According to the calculated size, position, display properties and adaptation rules of the page elements, the adapted page is quickly generated.
2. The method for page adaptation based on artificial intelligence model according to claim 1, characterized in that: The steps of obtaining different types of page and device information specifically include: Collect different types of page and device information; Perform data preprocessing on the different types of page and device information collected.
3. The method for page adaptation based on artificial intelligence model according to claim 1, characterized in that: The step of training using an artificial intelligence model according to the page and device information specifically includes: Select a neural network model and initialize the parameters of the neural network model; Distributing the page and device information and the neural network model to multiple GPUs or multiple computing nodes, and using a parallel algorithm for training; The gradient of the loss function with respect to each parameter is calculated through the back-propagation algorithm, and the optimizer is used to update the parameters to minimize the loss function. Evaluate the performance of the model periodically during training.
4. The method for page adaptation based on artificial intelligence model according to claim 1, characterized in that: The steps of matching the semantic information, hierarchical relationships and adaptation rules of the artificial intelligence model page elements on different devices through machine analysis, disassembly and adaptation specifically include: Perform semantic analysis on page elements; Break down the page into independent elements and components, and determine the hierarchical relationship between elements and components; Matching and adaptation are performed based on the semantic information and hierarchical relationships of page elements, as well as the adaptation rules on different devices.
5. The method for page adaptation based on artificial intelligence model according to claim 1, characterized in that: The step of recording page elements, components, and adaptation rule information specifically includes: Record the name, type, attributes, and style information of each element; Record the name, function, layout, and style information of each component; Record the name, applicable conditions, and execution operation information of each adaptation rule; Store the adaptation rules in a database or configuration file.
6. The method for page adaptation based on artificial intelligence model according to claim 1, characterized in that: The step of calculating the size, position and display attributes of the page element according to the device information specifically includes: Get the device's screen size, resolution, and operating system information; Calculate the size and proportion of page elements based on the device's screen size and resolution; Calculate the position and layout of page elements based on the device's screen size and resolution; Calculates the display properties of page elements based on the device's operating system and browser type.
7. The method for page adaptation based on an artificial intelligence model according to any one of claims 1 to 6, characterized in that: The step of quickly generating an adapted page according to the calculated size, position, display attribute and adaptation rule of the page element specifically includes: Generate a page based on the calculated size, position, display attributes and adaptation rules of the page elements; Optimize the generated pages; Test and validate the generated pages; Deploy the generated page to the server, publish it and put it online.
8. A page adaptation device based on an artificial intelligence model, characterized in that: include: The acquisition module is used to obtain different types of page and device information; A training module, used for training using an artificial intelligence model based on the page and device information; The matching module is used to match the semantic information, hierarchical relationships and adaptation rules of the AI model page elements on different devices through machine analysis, disassembly and adaptation; Recording module, used to record page elements, components, and adaptation rule information; A calculation module, used to calculate the size, position and display properties of page elements according to device information; The generation module is used to quickly generate an adapted page based on the calculated size, position, display properties and adaptation rules of the page elements.
9. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the artificial intelligence model-based page adaptation method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the artificial intelligence model-based page adaptation method as described in any one of claims 1 to 7.