Page construction method and device based on artificial intelligence, computer equipment and medium
Through the page construction method based on artificial intelligence, H5 page code is automatically generated, which solves the problems of frequent communication and inefficiency in traditional R&D processes, and achieves a page design that quickly responds to market changes and business needs.
Patent Information
- Application Number
- CN202411157047.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-27
AI Technical Summary
All links in the traditional H5 page R&D process require frequent communication and confirmation, resulting in a long overall R&D cycle, low page design efficiency, and it is difficult to quickly respond to market changes or emergency business needs.
Using the page construction method based on artificial intelligence, the page construction interface is displayed, the user's historical operation information is obtained, the recommended controls and attribute settings are generated, the user's drag and drop operations and attribute settings are received, the user is dragged and dropped, and the object code is converted into a target code file, and the code is performed. Optimize and export to realize page design that automatically generates code.
It greatly reduces page design and development time, improves the development efficiency of page design, and can quickly respond to market changes and business needs.
Smart Images

Figure CN119201101A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence development technology and the field of financial technology, and in particular to a page construction method, device, computer equipment and storage medium based on artificial intelligence. Background Art
[0002] In the current digital era, with the rapid development of mobile Internet technology, H5 (HTML5) pages have been widely used in the banking industry and many other industries due to their cross-platform, strong compatibility, and relatively low development costs. H5 pages not only enrich the user interaction experience, but also become an important means for banks to promote business and improve service efficiency.
[0003] However, the traditional H5 page development process usually starts with the product manager designing the product prototype, and after the UI designer's detailed design, the front-end developer will implement the code according to the design draft. In this process, frequent communication and confirmation are required between each link, resulting in a long overall development cycle, low efficiency of page design, and difficulty in quickly responding to market changes or urgent business needs. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a page construction method, device, computer equipment and storage medium based on artificial intelligence to solve the technical problems that the various links of the existing traditional H5 page development process require frequent communication and confirmation, resulting in a long overall development cycle and low efficiency of page design.
[0005] In order to solve the above technical problems, the embodiment of the present application provides a page construction method based on artificial intelligence, which adopts the following technical solutions:
[0006] Determine whether a page building request input by a user is received;
[0007] If yes, display a preset page building interface; wherein the page building interface includes a canvas area, a property setting area, a recommended content area, and a control library;
[0008] Acquire historical operation information of the user, and process the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user;
[0009] Displaying the recommendation control information and the recommendation attribute setting information in the recommendation content area;
[0010] receiving a drag operation on a target control triggered by the user in the canvas area, and receiving target property setting information corresponding to the target control input by the user in the property setting area; wherein the target control is a control in the control library;
[0011] After detecting that the user has completed the page design, converting the target control and the target property setting information into a corresponding target code file;
[0012] The target code file is exported to obtain a corresponding project file.
[0013] Furthermore, the step of converting the target control and the target property setting information into a corresponding target code file specifically includes:
[0014] Get the preset code template;
[0015] Filling the code template based on the target control and the target property setting information to obtain a corresponding first code file;
[0016] Performing code optimization processing on the first code file to obtain a corresponding second code file;
[0017] The second code file is used as the target code file.
[0018] Furthermore, the step of performing code optimization processing on the first code file to obtain a corresponding second code file specifically includes:
[0019] Formatting the first code file based on a preset code formatting tool to obtain a corresponding third code file;
[0020] Compressing the third code file to obtain a corresponding fourth code file;
[0021] Performing performance optimization processing on the fourth code file based on a preset performance optimization strategy to obtain a corresponding fifth code file;
[0022] The fifth code file is used as the second code file.
[0023] Furthermore, the step of exporting the target code file to obtain a corresponding engineering file specifically includes:
[0024] Obtaining a target export mode corresponding to the target code file;
[0025] Call the preset export tool;
[0026] Based on the export method, the target code file is packaged using the export tool to obtain a corresponding packaged file;
[0027] The packaged file is used as the project file.
[0028] Furthermore, before the step of obtaining the historical operation information of the user and processing the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user, the method further includes:
[0029] Obtaining designated historical operation information of a designated user within a preset time period; wherein the designated historical operation information includes a user behavior log, control usage frequency, and property setting preferences of the designated user;
[0030] Building a user profile of the designated user based on the designated historical operation information;
[0031] Preprocessing the user portrait to obtain corresponding initial sample data;
[0032] Performing feature selection processing on the initial sample data to obtain corresponding target sample data;
[0033] Obtain the preset initial recommendation model;
[0034] Based on the target sample data, the initial recommendation model is trained and tested to obtain a specified recommendation model that meets the preset construction requirements;
[0035] The designated recommendation model is used as the information recommendation model.
[0036] Furthermore, after the step of exporting the target code file to obtain the corresponding engineering file, the method further includes:
[0037] Calling a pre-built test environment and deploying the project file into the test environment;
[0038] Performing functional testing on the page corresponding to the project file based on a preset test case to obtain a corresponding functional test result;
[0039] Performing a performance test on the page based on a preset performance test tool to obtain a corresponding performance test result;
[0040] Performing problem repair processing on the engineering file based on the functional test result and the performance test result to obtain a repaired target engineering file;
[0041] Perform online processing based on the target project file.
[0042] Furthermore, after the step of performing online processing based on the target engineering file, the method further includes:
[0043] Call the preset monitoring tool;
[0044] Based on the monitoring tool, collecting the operation data of the target page corresponding to the target project file; wherein the number of the operation data includes a plurality of;
[0045] Determining whether there is designated operating data higher than a corresponding preset alarm threshold among all the operating data;
[0046] If so, extracting the designated operation data from the operation data, and generating corresponding alarm notification information based on the designated operation data;
[0047] Get the communication information of the preset operation and maintenance personnel;
[0048] Based on the communication information, the alarm notification information is pushed to the operation and maintenance personnel.
[0049] In order to solve the above technical problems, the embodiment of the present application further provides a page construction device based on artificial intelligence, which adopts the following technical solution:
[0050] A first judgment module is used to judge whether a page building request input by a user is received;
[0051] A first display module is used to display a preset page construction interface; wherein the page construction interface includes a canvas area, a property setting area, a recommended content area and a control library;
[0052] A first generating module is used to obtain the historical operation information of the user, and process the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user;
[0053] A second display module, used to display the recommendation control information and the recommendation attribute setting information in the recommendation content area;
[0054] A receiving module, configured to receive a drag operation on a target control triggered by the user in the canvas area, and receive target property setting information corresponding to the target control input by the user in the property setting area; wherein the target control is a control in the control library;
[0055] A conversion module, used for converting the target control and the target property setting information into a corresponding target code file after detecting that the user has completed the page design;
[0056] The export module is used to export the target code file to obtain the corresponding project file.
[0057] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0058] Determine whether a page building request input by a user is received;
[0059] If yes, display a preset page building interface; wherein the page building interface includes a canvas area, a property setting area, a recommended content area, and a control library;
[0060] Acquire historical operation information of the user, and process the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user;
[0061] Displaying the recommendation control information and the recommendation attribute setting information in the recommendation content area;
[0062] receiving a drag operation on a target control triggered by the user in the canvas area, and receiving target property setting information corresponding to the target control input by the user in the property setting area; wherein the target control is a control in the control library;
[0063] After detecting that the user has completed the page design, converting the target control and the target property setting information into a corresponding target code file;
[0064] The target code file is exported to obtain a corresponding project file.
[0065] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0066] Determine whether a page building request input by a user is received;
[0067] If yes, display a preset page building interface; wherein the page building interface includes a canvas area, a property setting area, a recommended content area, and a control library;
[0068] Acquire historical operation information of the user, and process the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user;
[0069] Displaying the recommendation control information and the recommendation attribute setting information in the recommendation content area;
[0070] receiving a drag operation on a target control triggered by the user in the canvas area, and receiving target property setting information corresponding to the target control input by the user in the property setting area; wherein the target control is a control in the control library;
[0071] After detecting that the user has completed the page design, converting the target control and the target property setting information into a corresponding target code file;
[0072] The target code file is exported to obtain a corresponding project file.
[0073] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0074] The present application first determines whether a page building request input by the user is received; if so, displays a preset page building interface; wherein the page building interface includes a canvas area, a property setting area, a recommended content area and a control library; then obtains the user's historical operation information, and processes the historical operation information based on a preset information recommendation model to generate recommended control information and recommended property setting information corresponding to the user; and displays the recommended control information and the recommended property setting information in the recommended content area; then receives a drag operation on a target control triggered by the user in the canvas area, and receives target property setting information corresponding to the target control input by the user in the property setting area; wherein the target control is a control in the control library; subsequently, after detecting that the user has completed the page design, converts the target control and the target property setting information into a corresponding target code file; finally, the target code file is exported to obtain a corresponding project file. The present application generates recommended control information and recommended property setting information corresponding to the user and displays them in the page construction interface based on the use of an information recommendation model, and then receives the drag operation of the target control triggered by the user in the canvas area, and receives the target property setting information corresponding to the target control input by the user in the property setting area, and converts the target control and the target property setting information into a corresponding target code file, and finally exports the target code file to obtain the corresponding project file, so as to realize page design based on the user's dragging control operation and inputting property setting information in the page construction interface, and automatically generates code, which can greatly reduce the time of page design and development, and effectively improve the development efficiency of page design. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0076] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0077] Figure 2 A flowchart of an embodiment of a page construction method based on artificial intelligence according to the present application;
[0078] Figure 3 is a structural schematic diagram of an embodiment of an artificial intelligence-based page building device according to the present application;
[0079] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0080] 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 application; 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 application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application 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 application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0081] 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 application. The appearance of the phrase in various locations 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.
[0082] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0083] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0084] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0085] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0086] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0087] It should be noted that the artificial intelligence-based page construction method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based page construction device is generally set in the server / terminal device.
[0088] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0089] Continue to refer Figure 2, showing a flow chart of an embodiment of the method for building a page based on artificial intelligence according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for building a page based on artificial intelligence provided in the embodiment of the present application can be applied to any scenario that requires page design, and the method for building a page based on artificial intelligence can be applied to products in these scenarios, for example, page design in the field of finance and insurance. The method for building a page based on artificial intelligence includes the following steps:
[0090] Step S201, determining whether a page building request input by a user is received.
[0091] In this embodiment, the electronic device (e.g. Figure 1 The server / terminal device shown in the figure) can obtain the page construction request input by the user through a wired connection method or a wireless connection method. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi DeBand) connection, and other wireless connection methods currently known or to be developed in the future. The executor of the present application is specifically a page construction system, which can be referred to as the system for short. The present application can be applied to the business scenario of page design of finance and insurance, for example, it can be applied to the construction scenario of H5 pages related to deposits, loans and other businesses in banks, and the above-mentioned users can be development employees of the bank.
[0092] Step S202: If yes, display a preset page construction interface; wherein the page construction interface includes a canvas area, a property setting area, a recommended content area, and a control library.
[0093] In this embodiment, the page construction interface is a pre-developed visual design interface including a canvas area, a property setting area, a recommended content area, and a control library. Among them, the page construction interface allows users to combine controls by dragging and dropping on the canvas area to form a page layout. The property setting area is used to collect and store the properties required by the control through a visual collector (such as an input box or a selector). The recommended content area is an area used to display recommended content to users and guide users to quickly find the required controls and property settings. The control library displays all available controls, such as text boxes, pictures, buttons, etc. Among them, the process of building a control library includes: Encapsulating controls: Encapsulating the H5 function codes commonly used by banks into draggable controls, including text, pictures, buttons, forms, etc., and presetting common styles (such as orange text, background, etc.). Property definition: Define configurable properties for each control, such as font style, color, size, background, touch event, etc. In addition, a toolbar with buttons for control selection, undo, redo, save, export, etc. can be configured, and the control drag logic can be implemented, allowing users to drag controls from the control library to the canvas and automatically position them to the appropriate position. It also provides functions such as scaling, rotating, and moving controls, allowing users to fine-tune the layout of controls.
[0094] Step S203: acquiring the historical operation information of the user, and processing the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user.
[0095] In this embodiment, the above-mentioned historical operation information may include user behavior logs, control usage frequency, and property setting preferences. The historical operation information can be input into the above-mentioned information recommendation model so that the historical operation information can be recommended through the information recommendation model, and the recommended control information and recommended property setting information corresponding to the user can be output. Among them, by using the information recommendation model to perform intelligent information recommendation and recommending some commonly used matching methods to users, it can reduce the time spent by users in finding controls and give users some inspiration. In addition, the construction process of the above-mentioned information recommendation model and the specific implementation process will be further described in detail in the subsequent specific embodiments of this application, so no excessive elaboration will be made here.
[0096] Step S204: display the recommendation control information and the recommendation attribute setting information in the recommended content area.
[0097] In this embodiment, by displaying the recommended control information and the recommended property setting information in the recommended content area, the user can be guided to quickly find the required controls and property settings during the page construction process, thereby improving user experience and efficiency.
[0098] Step S205, receiving a drag operation on a target control triggered by the user in the canvas area, and receiving target property setting information corresponding to the target control input by the user in the property setting area; wherein the target control is a control in the control library.
[0099] In this embodiment, the user can plan the control type and property settings required for the page based on the recommended control information and the recommended property setting information displayed in the above-mentioned recommended content area and in combination with actual needs, trigger the drag operation of the target control in the canvas area, and enter the target property setting information corresponding to the target control in the property setting area.
[0100] Step S206, after detecting that the user has completed the page design, converting the target control and the target property setting information into a corresponding target code file.
[0101] In this embodiment, the specific implementation process of converting the target control and the target property setting information into the corresponding target code file will be described in further detail in subsequent specific embodiments of the present application and will not be elaborated on here.
[0102] Step S207, exporting the target code file to obtain a corresponding project file.
[0103] In the present embodiment, the above-mentioned exported engineering file contains all the contents of the page to be designed and generated, including multimedia elements such as text, pictures, videos, and the layout and arrangement of these elements on the page. In addition, the engineering file defines the structure of the page through code, including the overall framework of the page, the hierarchical relationship of each part, and the relationship between them. This structure is specifically implemented and embodied in the exported engineering file. Among them, the above-mentioned specific implementation process of exporting the target code file to obtain the corresponding engineering file will be further described in detail in the subsequent specific embodiments of the present application, and will not be elaborated on here.
[0104] The present application generates recommended control information and recommended property setting information corresponding to the user and displays them in the page construction interface based on the use of an information recommendation model, and then receives the drag operation of the target control triggered by the user in the canvas area, and receives the target property setting information corresponding to the target control input by the user in the property setting area, and converts the target control and the target property setting information into a corresponding target code file, and finally exports the target code file to obtain the corresponding project file, so as to realize page design based on the user's dragging control operation and inputting property setting information in the page construction interface, and automatically generates code, which can greatly reduce the time of page design and development, and effectively improve the development efficiency of page design.
[0105] In some optional implementations, step S206 includes the following steps:
[0106] Get the preset code template.
[0107] In this embodiment, the above code template is a code template that defines HTML / CSS / JavaScript in advance using a template engine (such as Handlebars, EJS, etc.) according to actual business needs.
[0108] The code template is filled based on the target control and the target property setting information to obtain a corresponding first code file.
[0109] In this embodiment, the placeholders in the code template are dynamically filled according to the target control and the target property setting information on the canvas area to generate a complete code file, that is, the first code file.
[0110] Code optimization processing is performed on the first code file to obtain a corresponding second code file.
[0111] In this embodiment, the above-mentioned specific implementation process of performing code optimization processing on the first code file to obtain the corresponding second code file will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.
[0112] The second code file is used as the target code file.
[0113] The present application obtains a preset code template; then fills the code template based on the target control and the target property setting information to obtain a corresponding first code file; then optimizes the first code file to obtain a corresponding second code file; and subsequently uses the second code file as the target code file. The present application uses a code template to fill the code template based on the target control and the target property setting information to obtain a first code file, and then optimizes the first code file to obtain a target code file, thereby realizing fast and accurate conversion of the target control and the target property setting information into a corresponding target code file, improving the generation efficiency of the target code file and ensuring the accuracy of the obtained target code file.
[0114] In some optional implementations of this embodiment, performing code optimization processing on the first code file to obtain a corresponding second code file includes the following steps:
[0115] The first code file is formatted based on a preset code formatting tool to obtain a corresponding third code file.
[0116] In this embodiment, the code formatting tool may specifically be tools such as Prettier, ESLint, etc. By using the code formatting tool to format the first code file, the code readability may be improved.
[0117] The third code file is compressed to obtain a corresponding fourth code file.
[0118] In this embodiment, by compressing the third code file, the file size can be reduced, thereby increasing the loading speed.
[0119] The fourth code file is subjected to performance optimization processing based on a preset performance optimization strategy to obtain a corresponding fifth code file.
[0120] In this embodiment, the above performance optimization strategy includes a strategy for optimizing performance issues in DOM operations, event processing, etc. The fourth code file is analyzed for performance using the performance optimization strategy, and then the performance issues in DOM operations, event processing, etc. are optimized to complete the performance optimization processing of the fourth code file.
[0121] The fifth code file is used as the second code file.
[0122] The present application formats the first code file based on a preset code formatting tool to obtain a corresponding third code file; then compresses the third code file to obtain a corresponding fourth code file; then optimizes the performance of the fourth code file based on a preset performance optimization strategy to obtain a corresponding fifth code file; and subsequently uses the fifth code file as the second code file. The present application formats, compresses, and optimizes the performance of the first code file based on the use of a code formatting tool and a performance optimization strategy, thereby achieving fast and intelligent completion of the code optimization processing of the first code file, improving the processing efficiency of the code optimization processing, and ensuring the data accuracy of the second code file obtained after the code optimization processing.
[0123] In some optional implementations, step S207 includes the following steps:
[0124] Obtain a target export mode corresponding to the target code file.
[0125] In this embodiment, there is no specific limitation on the determination of the above-mentioned target export method, which can be set according to actual export requirements. For example, export methods such as ZIP compression package and Git repository link can be used.
[0126] Invoke the preset export tool.
[0127] In this embodiment, the above-mentioned export tool can specifically adopt a packaging tool, for example, tools such as Webpack, Rollup, etc.
[0128] Based on the export method, the target code file is packaged using the export tool to obtain a corresponding packaged file.
[0129] In this embodiment, the generated target code files are packaged into one or more corresponding project files by using an export tool to obtain the above-mentioned packaged files.
[0130] The packaged file is used as the project file.
[0131] In this embodiment, in the process of generating a project file, a detailed document description corresponding to the project file can also be generated, including project structure, dependencies, deployment steps and other information, so as to help users quickly get started and use the generated project file through the document description.
[0132] The present application obtains the target export method corresponding to the target code file; then calls a preset export tool; then based on the export method, uses the export tool to package the target code file to obtain a corresponding packaged file; and subsequently uses the packaged file as the project file. The present application uses the export tool to quickly and intelligently package the target code file according to the target export method corresponding to the target code file to complete the export processing of the target code file, thereby improving the processing efficiency of the export processing and ensuring the accuracy of the obtained project file.
[0133] In some optional implementations, before step S203, the electronic device may further perform the following steps:
[0134] Obtain designated historical operation information of a designated user within a preset time period; wherein the designated historical operation information includes a user behavior log, a control usage frequency, and a property setting preference of the designated user.
[0135] In this embodiment, there is no specific limitation on the time selection of the above-mentioned preset time period, and it can be set according to actual business usage requirements. For example, it can be set to within 3 months before the current time, or within half a year from the current time, and so on. The number of the above-mentioned designated users may include multiple. The above-mentioned designated historical operation information is information corresponding to page operations. The designated historical operation information includes the user behavior log, control usage frequency and property setting preferences of the specified user. Specifically, the user behavior log refers to: when the user interacts with the page, the user's operation behavior is recorded, such as control clicks, drags, property setting changes, etc. The control usage frequency refers to: counting the number of times each control is used by the user, and the frequency of use in different pages or scenarios. Property setting preferences refer to: recording the user's preference settings for different control attributes, such as font size, color, layout mode, etc.
[0136] A user profile of the specified user is constructed based on the specified historical operation information.
[0137] In this embodiment, a user interest model can be constructed based on the above-mentioned specified historical operation information, including the user's preferred control type, property settings, etc., to obtain a user portrait of the above-mentioned specified user.
[0138] The user portrait is preprocessed to obtain corresponding initial sample data.
[0139] In this embodiment, the above preprocessing specifically includes data cleaning, data conversion and data segmentation. Specifically, data cleaning includes: removing noise data, such as invalid clicks, abnormal attribute settings, etc. Data conversion includes: converting raw data into a format suitable for machine learning algorithm processing, such as feature vectorization, normalization, etc. Data segmentation includes: dividing the data set into a training set, a validation set and a test set for model training, validation and testing.
[0140] Perform feature selection processing on the initial sample data to obtain corresponding target sample data.
[0141] In this embodiment, the feature selection process refers to selecting features that have a significant impact on the recommendation effect from the initial sample data obtained after preprocessing to obtain the target sample data.
[0142] Get the preset initial recommendation model.
[0143] In this embodiment, a suitable machine learning algorithm can be selected as the recommendation algorithm corresponding to the above initial recommendation model according to business needs and data characteristics, such as collaborative filtering, content-based recommendation, deep learning, etc. Among them, the recommendation algorithm here uses some associations to be established during initialization, and gradually stores and records the information according to the user's habits during the user's use, so as to make more accurate recognition later.
[0144] The initial recommendation model is trained and tested based on the target sample data to obtain a specified recommendation model that meets the preset construction requirements.
[0145] In this embodiment, the initial recommendation model is trained by using a training set, the recommendation effect is optimized by adjusting the model parameters, and then the performance of the initial recommendation model is verified by using a validation set to ensure that the initial recommendation model is not overfitting or underfitting, thereby obtaining a specified recommendation model that meets the pre-built requirements.
[0146] The designated recommendation model is used as the information recommendation model.
[0147] In this embodiment, after obtaining the information recommendation model, it is possible to further define indicators for evaluating the recommendation effect, such as click-through rate, conversion rate, user satisfaction, etc. Then, the recommendation effect of the recommendation model is evaluated using the test set, and the recommendation algorithm and model are continuously optimized based on the evaluation results and user feedback to improve the recommendation effect and user experience.
[0148] By using target sample data constructed based on specified historical operation information to train and test the initial recommendation model, the present application can quickly and intelligently obtain an information recommendation model that meets preset construction requirements, thereby improving the construction efficiency of the information recommendation model and ensuring the model recommendation effect of the information recommendation model.
[0149] In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:
[0150] Call a pre-built test environment and deploy the project file to the test environment.
[0151] In this embodiment, the test environment includes hardware, operating system, database and other configurations similar to the production environment. Among them, necessary test tools, such as performance testing tool JMeter, are pre-installed and configured. In addition, the exported project files are deployed to the test environment and the infrastructure such as servers and databases are configured to ensure that the project files can run normally.
[0152] Based on the preset test cases, a functional test is performed on the page corresponding to the project file to obtain a corresponding functional test result.
[0153] In this embodiment, the above test cases are detailed test cases written in advance based on actual requirement documents and design documents related to page design. By executing the test cases, it is verified whether the functions of the page work as expected, and the corresponding functional test results are recorded, including success and failure cases.
[0154] A performance test is performed on the page based on a preset performance test tool to obtain a corresponding performance test result.
[0155] In this embodiment, the above performance test includes stress test and load test. By using performance test tools, the page is subjected to stress test and load test, and key indicators such as system response time, throughput, and resource utilization are monitored and recorded. Then, the key indicators are compared and analyzed with the expected indicator results to obtain the corresponding performance test results, and the performance and stability of the system are evaluated.
[0156] The project file is repaired based on the functional test result and the performance test result to obtain a repaired target project file.
[0157] In this embodiment, the problem repair process specifically includes problem location, problem repair, and retest verification processing. Specifically, problem location: locate the problem on the page based on the test results (functional test results and performance test results). Analyze the cause of the problem, including code defects, configuration errors, environmental problems, etc. Problem repair: Repair the located problem, specifically by modifying the code, configuration files, or adjusting the environment settings. After the repair, redeploy the project files to the test environment. Retest verification: Retest the repaired problem to ensure that the problem has been resolved. If necessary, perform additional testing to verify whether the repair has an impact on other functions.
[0158] Perform online processing based on the target project file.
[0159] In this embodiment, the above processing process includes: Environment preparation: confirm the configuration and status of the production environment, ensure consistency with the production environment, and back up important data of the production environment. Deployment of project files: deploy fully tested project files to the production environment. Update the configuration and dependencies of the production environment to ensure that the project files can run normally. Verification and launch: perform the final verification test in the production environment to ensure that the page functions normally. And monitor the operating status of the system in real time to promptly discover and handle possible problems.
[0160] This application calls a pre-built test environment and deploys the project file to the test environment; then performs a functional test on the page corresponding to the project file based on a preset test case to obtain a corresponding functional test result; then performs a performance test on the page based on a preset performance test tool to obtain a corresponding performance test result; subsequently, based on the functional test result and the performance test result, the project file is repaired to obtain a repaired target project file; and finally, the target project file is put online. After the target code file is exported and the corresponding project file is obtained, the application will further call a pre-built test environment and deploy the project file to the test environment, then perform a functional test on the page corresponding to the project file based on a preset test case, and perform a performance test on the page based on a preset performance test tool, and then perform a problem repair on the project file based on the functional test result and the performance test result to obtain a repaired target project file, and then the target project file is put online. Before the page goes online, this application can ensure the quality and stability of the page during testing, deployment, and online, thereby improving user experience and overall system performance.
[0161] In some optional implementations of this embodiment, after the step of performing online processing based on the target engineering file, the electronic device may further perform the following steps:
[0162] Call the preset monitoring tool.
[0163] In this embodiment, the monitoring tool may specifically be a tool that has a function of real-time monitoring of a page, such as Zabbix, Prometheus, and the like.
[0164] Based on the monitoring tool, operation data of a target page corresponding to the target project file is collected; wherein the number of the operation data includes multiple.
[0165] In this embodiment, the above-mentioned operation data may at least include data such as response time, throughput, and error rate.
[0166] It is determined whether there is any designated operating data higher than a corresponding preset alarm threshold value among all the operating data.
[0167] In this embodiment, an alarm threshold corresponding to the operation status of the page can be pre-set according to the actual page warning requirements, such as a response time higher than a corresponding response time threshold, a throughput higher than a corresponding throughput threshold, and an error rate higher than a corresponding error rate threshold. When the operation data of the target page corresponding to the target project file triggers these alarm thresholds, it will be determined that the operation status of the target page has triggered an alarm, such as a performance bottleneck. There is no specific limitation on the values of the response time threshold, throughput threshold, and error rate threshold, and they can be set according to the actual monitoring and warning requirements.
[0168] If so, the designated operation data is extracted from the operation data, and corresponding alarm notification information is generated based on the designated operation data.
[0169] In this embodiment, the specified operating data can be extracted from the operating data, and the specific properties corresponding to the specified operating data and the suggested solutions can be obtained. Then, the obtained specified operating data, the specific properties corresponding to the specified operating data and the suggested solutions can be filled into a preset alarm notification information template to generate the above alarm notification information.
[0170] Get the communication information of the preset operation and maintenance personnel.
[0171] In this embodiment, the above-mentioned operation and maintenance personnel may refer to the staff corresponding to the page maintenance work. The above-mentioned communication information may include a mobile phone number or an email address.
[0172] Based on the communication information, the alarm notification information is pushed to the operation and maintenance personnel.
[0173] In this embodiment, after the communication information is obtained, the alarm notification information is pushed to the communication terminal corresponding to the communication information of the operation and maintenance personnel to complete the alarm notification to the operation and maintenance personnel.
[0174] This application calls a preset monitoring tool; then based on the monitoring tool, it collects the operation data of the target page corresponding to the target engineering file; wherein the number of the operation data includes multiple; then it is determined whether there is a specified operation data higher than the corresponding preset alarm threshold in all the operation data; if so, the specified operation data is extracted from the operation data, and the corresponding alarm notification information is generated based on the specified operation data; subsequently, the preset communication information of the operation and maintenance personnel is obtained, and then based on the communication information, the alarm notification information is pushed to the operation and maintenance personnel. After the application is processed online based on the target engineering file, it will also intelligently call the control tool to collect the operation data of the target page corresponding to the target engineering file. If it is detected that there is a specified operation data higher than the corresponding preset alarm threshold in all the operation data, the corresponding alarm notification information will be automatically generated based on the specified operation data, and the alarm notification information will be pushed to the corresponding operation and maintenance personnel, so that the operation and maintenance personnel can promptly discover the performance bottlenecks and potential problems of the target page, and can take corresponding processing measures to ensure the stable operation of the target page, which is conducive to ensuring the stability and reliability of the target page, thereby improving the user experience.
[0175] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0176] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target code files, the above-mentioned target code files can also be stored in a node of a blockchain.
[0177] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0178] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0179] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0180] 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).
[0181] 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.
[0182] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a page construction device based on artificial intelligence, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0183] like Figure 3 As shown, the artificial intelligence-based page construction device 300 described in this embodiment includes: a first judgment module 301, a first display module 302, a first generation module 303, a second display module 304, a receiving module 305, a conversion module 306 and an export module 307.
[0184] in:
[0185] The first determination module 301 is used to determine whether a page building request input by a user is received;
[0186] The first display module 302 is used to display a preset page construction interface; wherein the page construction interface includes a canvas area, a property setting area, a recommended content area and a control library;
[0187] The first generating module 303 is used to obtain the historical operation information of the user, and process the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user;
[0188] A second display module 304 is used to display the recommendation control information and the recommendation attribute setting information in the recommendation content area;
[0189] The receiving module 305 is used to receive a drag operation on a target control triggered by the user in the canvas area, and receive target property setting information corresponding to the target control input by the user in the property setting area; wherein the target control is a control in the control library;
[0190] The conversion module 306 is used to convert the target control and the target property setting information into a corresponding target code file after detecting that the user has completed the page design;
[0191] The export module 307 is used to export the target code file to obtain a corresponding project file.
[0192] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based page building method in the aforementioned implementation mode, and will not be repeated here.
[0193] In some optional implementations of this embodiment, the conversion module 306 includes:
[0194] The first acquisition submodule is used to acquire a preset code template;
[0195] A filling submodule, used for filling the code template based on the target control and the target property setting information to obtain a corresponding first code file;
[0196] An optimization submodule, used for performing code optimization processing on the first code file to obtain a corresponding second code file;
[0197] The first determining submodule is used to use the second code file as the target code file.
[0198] In some optional implementations of this embodiment, the optimization submodule includes:
[0199] A formatting unit, configured to format the first code file based on a preset code formatting tool to obtain a corresponding third code file;
[0200] A compression unit, used for compressing the third code file to obtain a corresponding fourth code file;
[0201] an optimization unit, configured to perform performance optimization processing on the fourth code file based on a preset performance optimization strategy to obtain a corresponding fifth code file;
[0202] A determining unit is configured to use the fifth code file as the second code file.
[0203] In some optional implementations of this embodiment, the export module 307 includes:
[0204] A second acquisition submodule is used to acquire a target export mode corresponding to the target code file;
[0205] Call submodule to call the preset export tool;
[0206] A packaging submodule, used to package the target code file based on the export method using the export tool to obtain a corresponding packaged file;
[0207] The second determining submodule is used to use the packaged file as the project file.
[0208] In some optional implementations of this embodiment, the page construction device based on artificial intelligence further includes:
[0209] A first acquisition module is used to acquire designated historical operation information of a designated user within a preset time period; wherein the designated historical operation information includes a user behavior log, a control usage frequency, and a property setting preference of the designated user;
[0210] A construction module, used to construct a user portrait of the specified user based on the specified historical operation information;
[0211] A preprocessing module, used to preprocess the user portrait to obtain corresponding initial sample data;
[0212] A first processing module, used for performing feature selection processing on the initial sample data to obtain corresponding target sample data;
[0213] A second acquisition module is used to acquire a preset initial recommendation model;
[0214] A second processing module is used to train and test the initial recommendation model based on the target sample data to obtain a specified recommendation model that meets the preset construction requirements;
[0215] A determination module is used to use the specified recommendation model as the information recommendation model.
[0216] In some optional implementations of this embodiment, the page construction device based on artificial intelligence further includes:
[0217] A deployment module, used to call a pre-built test environment and deploy the project file into the test environment;
[0218] A first testing module, used to perform a functional test on a page corresponding to the project file based on a preset test case to obtain a corresponding functional test result;
[0219] A second testing module is used to perform a performance test on the page based on a preset performance testing tool to obtain a corresponding performance testing result;
[0220] A repair module, used to perform problem repair processing on the project file based on the function test result and the performance test result to obtain a repaired target project file;
[0221] The online module is used to perform online processing based on the target project file.
[0222] In some optional implementations of this embodiment, the page construction device based on artificial intelligence further includes:
[0223] A calling module is used to call the preset monitoring tool;
[0224] A collection module, used for collecting operation data of a target page corresponding to the target project file based on the monitoring tool; wherein the number of the operation data includes multiple;
[0225] A second determination module is used to determine whether there is designated operation data higher than a corresponding preset alarm threshold value among all the operation data;
[0226] a second generating module, configured to extract the designated operation data from the operation data and generate corresponding alarm notification information based on the designated operation data;
[0227] The third acquisition module is used to obtain the communication information of the preset operation and maintenance personnel;
[0228] A push module is used to push the alarm notification information to the operation and maintenance personnel based on the communication information.
[0229] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0230] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, 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 microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.
[0231] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0232] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, 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 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the page construction method based on artificial intelligence, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0233] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the artificial intelligence-based page building method.
[0234] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0235] The present application 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 artificial intelligence-based page building method as described above.
[0236] 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 by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, 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, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0237] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application 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 application more thorough and comprehensive. Although the present application is 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 implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A page construction method based on artificial intelligence, characterized in that: The steps include: Determine whether a page building request input by a user is received; If yes, display a preset page building interface; wherein the page building interface includes a canvas area, a property setting area, a recommended content area, and a control library; Acquire historical operation information of the user, and process the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user; Displaying the recommendation control information and the recommendation attribute setting information in the recommendation content area; receiving a drag operation on a target control triggered by the user in the canvas area, and receiving target property setting information corresponding to the target control input by the user in the property setting area; wherein the target control is a control in the control library; After detecting that the user has completed the page design, converting the target control and the target property setting information into a corresponding target code file; The target code file is exported to obtain a corresponding project file.
2. The method for building a page based on artificial intelligence according to claim 1, characterized in that: The step of converting the target control and the target property setting information into a corresponding target code file specifically includes: Get the preset code template; Filling the code template based on the target control and the target property setting information to obtain a corresponding first code file; Performing code optimization processing on the first code file to obtain a corresponding second code file; The second code file is used as the target code file.
3. The method for building a page based on artificial intelligence according to claim 2, characterized in that: The step of performing code optimization processing on the first code file to obtain a corresponding second code file specifically includes: Formatting the first code file based on a preset code formatting tool to obtain a corresponding third code file; Compressing the third code file to obtain a corresponding fourth code file; Performing performance optimization processing on the fourth code file based on a preset performance optimization strategy to obtain a corresponding fifth code file; The fifth code file is used as the second code file.
4. The method for building a page based on artificial intelligence according to claim 1, characterized in that: The step of exporting the target code file to obtain the corresponding engineering file specifically includes: Obtaining a target export mode corresponding to the target code file; Call the preset export tool; Based on the export method, the target code file is packaged using the export tool to obtain a corresponding packaged file; The packaged file is used as the project file.
5. The method for building a page based on artificial intelligence according to claim 1, characterized in that: Before the step of obtaining the historical operation information of the user and processing the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user, the method further includes: Obtaining designated historical operation information of a designated user within a preset time period; wherein the designated historical operation information includes a user behavior log, control usage frequency, and property setting preferences of the designated user; Building a user profile of the designated user based on the designated historical operation information; Preprocessing the user portrait to obtain corresponding initial sample data; Performing feature selection processing on the initial sample data to obtain corresponding target sample data; Obtain the preset initial recommendation model; Based on the target sample data, the initial recommendation model is trained and tested to obtain a specified recommendation model that meets the preset construction requirements; The designated recommendation model is used as the information recommendation model.
6. The method for building a page based on artificial intelligence according to claim 1, characterized in that: After the step of exporting the target code file to obtain the corresponding engineering file, the method further includes: Calling a pre-built test environment and deploying the project file into the test environment; Performing functional testing on the page corresponding to the project file based on a preset test case to obtain a corresponding functional test result; Performing a performance test on the page based on a preset performance test tool to obtain a corresponding performance test result; Performing problem repair processing on the engineering file based on the functional test result and the performance test result to obtain a repaired target engineering file; Perform online processing based on the target project file.
7. The method for building a page based on artificial intelligence according to claim 6, characterized in that: After the step of performing online processing based on the target engineering file, the method further includes: Call the preset monitoring tool; Based on the monitoring tool, collecting the operation data of the target page corresponding to the target project file; wherein the number of the operation data includes a plurality of; Determining whether there is designated operating data higher than a corresponding preset alarm threshold among all the operating data; If so, extracting the designated operation data from the operation data, and generating corresponding alarm notification information based on the designated operation data; Get the communication information of the preset operation and maintenance personnel; Based on the communication information, the alarm notification information is pushed to the operation and maintenance personnel.
8. A page building device based on artificial intelligence, characterized in that: include: A first determination module is used to determine whether a page building request input by a user is received; A first display module is used to display a preset page construction interface; wherein the page construction interface includes a canvas area, a property setting area, a recommended content area and a control library; A first generating module is used to obtain the historical operation information of the user, and process the historical operation information based on a preset information recommendation model to generate recommended control information and recommended attribute setting information corresponding to the user; A second display module, used to display the recommendation control information and the recommendation attribute setting information in the recommendation content area; A receiving module, configured to receive a drag operation on a target control triggered by the user in the canvas area, and receive target property setting information corresponding to the target control input by the user in the property setting area; wherein the target control is a control in the control library; A conversion module, used for converting the target control and the target property setting information into a corresponding target code file after detecting that the user has completed the page design; The export module is used to export the target code file to obtain the corresponding project file.
9. A computer device, characterized in that: It comprises 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 page building method based on artificial intelligence 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, and when the computer-readable instructions are executed by the processor, the steps of the artificial intelligence-based page building method as described in any one of claims 1 to 7 are implemented.
