Page generation method, device and electronic device based on drag-and-drop page components

By using drag trajectory control and approximate page component detection methods in page development, the problems of long page development cycle and inaccurate layout are solved, efficient and accurate page component adjustment and content filling are achieved, and the page development efficiency is improved. and availability.

CN118170371BActive Publication Date: 2024-10-01JIANGSU SHURUI DATA TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410092342.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2024-10-01
Estimated Expiration
2044-01-22

AI Technical Summary

Technical Problem

The conventional page development method requires the participation of multiple professionals, resulting in a long development cycle. In addition, the drag and drop in drag-and-drop page development is not accurate enough, resulting in inaccurate page component layout, reducing the usability of the page.

Method used

Control the movement of page components to the initial position by monitoring the drag trajectory, perform approximate page component detection and position fine-tuning, realize global page component adjustment, and fill content according to the page theme description information.

Benefits of technology

It improves the efficiency of page development, ensures the precise layout and high availability of page components, and reduces the extension of the development cycle caused by the participation of professionals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118170371B_ABST
    Figure CN118170371B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a page generation method, device and electronic device based on a drag-and-drop page component. A specific implementation of the method includes: in response to monitoring a selection operation for a target page component, controlling the target page component to move to an initial component position according to a drag trajectory; performing approximate page component detection starting from the initial component position to generate an approximate page component information set; fine-tuning the initial component position according to the component specification information and component position information included in the approximate page component information in the approximate page component information set; moving the target page component to the adjusted component position; in response to completion of the move, performing a global page component adjustment on the initial page canvas to generate an adjusted page canvas; filling component content for at least one page component included in the adjusted page canvas according to the page theme description information corresponding to the initial page canvas. This implementation improves the efficiency of page development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a page generation method, device, and electronic device based on a drag-and-drop page component. Background Art

[0002] Page development refers to a technology that designs page styles and page functions according to user needs. At present, in the process of page development, the commonly used method is: first, the page requirements analysis is carried out by the requirements analyst; then, the page designer and developer designs and develops the page according to the requirements analysis results.

[0003] However, the inventors have found that when the above method is adopted, the following technical problems often occur:

[0004] Conventional page development methods often require the participation of multiple professionals, resulting in a long page development cycle and affecting page development efficiency.

[0005] Continuing, in the process of developing drag-and-drop pages, there are further technical problems as follows:

[0006] Since the dragging of page components may not be precise enough, the layout of page components in the entire page may be inaccurate, thereby reducing the usability of the generated page.

[0007] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0008] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0009] Some embodiments of the present disclosure propose a page generation method, device, and electronic device based on a drag-and-drop page component to solve one or more of the technical problems mentioned in the above background technology section.

[0010] In a first aspect, some embodiments of the present disclosure provide a page generation method based on a drag-type page component, the method comprising: in response to monitoring a selection operation for a target page component, controlling the target page component to move to an initial component position according to a drag trajectory, wherein the target page component is a page component selected from a list of optional page components, the initial component position is an end position of the drag trajectory, and the initial component position is located within an initial page canvas; performing approximate page component detection starting from the initial component position to generate an approximate page component information set, wherein the approximate page component information set includes the approximate page component information of the target page component and the approximate page component information of the target page component. The page component information includes: component specification information and component position information; according to the component specification information and component position information included in the approximate page component information in the above-mentioned approximate page component information set, the above-mentioned initial component position is fine-tuned to generate an adjusted component position; the above-mentioned target page component is moved to the above-mentioned adjusted component position; in response to the completion of the movement, the above-mentioned initial page canvas is globally adjusted to generate an adjusted page canvas; according to the page theme description information corresponding to the above-mentioned initial page canvas, at least one page component included in the above-mentioned adjusted page canvas is filled with component content to generate a content-filled page.

[0011] In a second aspect, some embodiments of the present disclosure provide a page generation device based on a drag-type page component, the device comprising: a first moving unit, configured to control the target page component to move to an initial component position according to a drag trajectory in response to monitoring a selection operation on a target page component, wherein the target page component is a page component selected from a list of optional page components, the initial component position is an end position of the drag trajectory, and the initial component position is located within the initial page canvas; an approximate page component detection unit, configured to perform approximate page component detection starting from the initial component position to generate an approximate page component information set, wherein the approximate page component information in the approximate page component information set includes: component specification a position fine-tuning unit, configured to perform position fine-tuning on the initial component position according to the component specification information and component position information included in the approximate page component information in the approximate page component information set, so as to generate an adjusted component position; a second moving unit, configured to move the target page component to the adjusted component position; a global page component adjustment unit, configured to perform global page component adjustment on the initial page canvas in response to the completion of the movement, so as to generate an adjusted page canvas; a component content filling unit, configured to perform component content filling on at least one page component included in the adjusted page canvas according to the page theme description information corresponding to the initial page canvas, so as to generate a content-filled page.

[0012] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0013] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.

[0014] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the page generation method based on the drag-and-drop page component of some embodiments of the present disclosure, the page development efficiency is improved. Specifically, the reason for the low efficiency of page development is that the conventional page development method often requires the participation of multiple professionals, resulting in a long page development cycle, which affects the efficiency of page development. Based on this, the page generation method based on the drag-and-drop page component of some embodiments of the present disclosure, first, in response to monitoring the selection operation for the target page component, the target page component is controlled to move to the initial component position according to the drag trajectory, wherein the target page component is the page component selected in the optional page component list, the initial component position is the end position of the drag trajectory, and the initial component position is located in the initial page canvas. In this way, the position of the page component is adjusted by dragging. Secondly, the approximate page component detection is performed with the initial component position as the starting point to generate an approximate page component information set, wherein the approximate page component information in the approximate page component information set includes: component specification information and component position information. Next, according to the component specification information and component position information included in the approximate page component information in the above-mentioned approximate page component information set, the position of the above-mentioned initial component is fine-tuned to generate the adjusted component position. In practice, since the dragging method may cause the dragging position to be inaccurate, the position fine-tuning of the target page component is achieved by combining the approximate page component. Further, the above-mentioned target page component is moved to the above-mentioned adjusted component position. In addition, in response to the completion of the movement, the above-mentioned initial page canvas is adjusted globally to generate the adjusted page canvas. In this way, the global page component adjustment is achieved to avoid the problem of inaccurate global page layout caused by local adjustments. Finally, according to the page theme description information corresponding to the above-mentioned initial page canvas, the component content is filled for at least one page component included in the above-mentioned adjusted page canvas to generate a content-filled page, thereby realizing automatic page content filling. In this way, the page development efficiency is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0016] Figure 1 is a flow chart of some embodiments of a page generation method based on a drag-and-drop page component according to the present disclosure;

[0017] Figure 2 is a component position relationship diagram of page components according to some embodiments of the page generation method based on drag-and-drop page components disclosed herein;

[0018] Figure 3 It is a structural schematic diagram of some embodiments of a page generation device based on a drag-and-drop page component according to the present disclosure;

[0019] Figure 4 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0021] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0022] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0023] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0024] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0025] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0026] refer to Figure 1 , shows a process 100 of some embodiments of a method for generating a page based on a drag-and-drop page component according to the present disclosure. The method for generating a page based on a drag-and-drop page component comprises the following steps:

[0027] Step 101 , in response to monitoring a selection operation on a target page component, controlling the target page component to move to an initial component position according to a dragging trajectory.

[0028] In some embodiments, the execution subject (e.g., a computing device) of the page generation method based on the drag-and-drop page component can control the target page component to move to the initial component position according to the drag trajectory in response to monitoring the selection operation for the target page component. Among them, the target page component is the page component selected in the optional page component list. The optional page component list can be a list including optional page components. The page component can be a web page component used to fill in the page. In practice, the page component can be but not limited to any of the following: a list page component, a check box page component, a drop-down bar page component, a rectangular frame page component, and a text box page component. Specifically, the above-mentioned execution subject can monitor the mouse event to determine whether there is a selection operation for the target page component. The drag trajectory can be the drag trajectory of the mouse dragging the target page component. The above-mentioned initial component position is the trajectory end position of the above-mentioned drag trajectory. The above-mentioned initial component position is located in the initial page canvas.

[0029] It should be noted that the above-mentioned computing device can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or it can be implemented as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here. It should be understood that the number of computing devices can be any number according to the implementation needs.

[0030] Step 102, performing approximate page component detection starting from the initial component position to generate an approximate page component information set.

[0031] In some embodiments, the above-mentioned execution entity may perform approximate page component detection starting from the initial component position to generate an approximate page component information set. Among them, the approximate page component information in the approximate page component information set includes: component specification information and component location information. The page component corresponding to the approximate page component information may be a page component similar to the target page component. The component specification information represents the component specifications of the page component corresponding to the approximate page component information. In practice, the component specification information may include: component size, component attributes. The component location information represents the position of the page component corresponding to the approximate page component information within the initial page canvas.

[0032] As an example, first, the execution subject can construct a circular detection area with the initial component position as the center, and take the page components whose component positions are within the circular detection area as candidate page components to obtain a candidate page component set. Then, the component specification information and component location information corresponding to the page components that are consistent with the component type of the target page component are determined from the candidate page component set as candidate page component information to obtain the candidate page component information set.

[0033] In some optional implementations of some embodiments, the execution subject performs similar page component detection starting from the initial component position to generate a similar page component information set, which may include the following steps:

[0034] The first step is to generate a component description vector corresponding to the target page component according to the component type and component specification information corresponding to the target page component as a first component description vector.

[0035] In practice, since component types are limited, one-hot encoding can be used to encode component types to generate component type vectors. Since page components are limited by style requirements, the corresponding component specification information often differs. Therefore, first, the present application can structure the component specification information to generate structured component specification information. Then, the present application performs feature extraction on the structured component specification information through an autoencoder to generate a component specification information vector. Finally, the above-mentioned execution entity can concatenate the component type vector and the component specification information vector corresponding to the target page component to generate a first component description vector.

[0036] In the second step, starting from the above initial component position, perform the following horizontal page component detection steps:

[0037] In the first sub-step, the detection frame is moved horizontally with a fixed step size.

[0038] The detection frame may be a preset rectangular frame. Specifically, the ratio of the frame size of the detection frame to the canvas size of the initial page canvas is a preset value.

[0039] In the second sub-step, in response to determining that a page component is framed in the detection frame, the page component framed in the detection frame is determined as a first candidate page component.

[0040] The third sub-step is to determine the component type and component specification information corresponding to the first candidate page component.

[0041] In practice, the execution subject may read the corresponding DOM (Document Object Model) tree in the initial page canvas to determine the component type and component specification information corresponding to the first candidate page component.

[0042] The fourth sub-step is to generate a component description vector corresponding to the first candidate page component as a second component description vector according to the component type and component specification information corresponding to the first candidate page component.

[0043] The execution subject may generate the second component description vector by referring to the method of generating the first component description vector in the first step, which will not be described in detail here.

[0044] The fifth sub-step is to determine the vector similarity between the first component description vector and the second component description vector to obtain a first similarity.

[0045] In practice, the execution subject may determine the vector similarity between the first component description vector and the second component description vector by calculating the cosine similarity to generate the first similarity. Specifically, in the process of calculating the cosine similarity, the execution subject may calculate the cosine similarity of two parts, namely, the first part: the cosine similarity of the vector corresponding to the component type in the first component description vector and the vector corresponding to the component type in the second component description vector. The second part: the cosine similarity of the vector corresponding to the component description information in the first component description vector and the vector corresponding to the component description information in the second component description vector, and weighted sum the two parts of the cosine similarity obtained as the first similarity. In the weighted summation process, the weight value corresponding to the first part is greater than the weight value corresponding to the second part.

[0046] The sixth sub-step, in response to determining that the above-mentioned first similarity is greater than a preset similarity threshold, generates the approximate page component information in the above-mentioned approximate page component information set according to the component position and component specification information corresponding to the above-mentioned first candidate page component.

[0047] The third step is to use the above initial component position as the starting point and perform the following vertical page component detection steps:

[0048] In the first sub-step, the detection frame is moved vertically with a fixed step size.

[0049] In the second sub-step, in response to determining that a page component is framed in the detection frame, the page component framed in the detection frame is determined as a second candidate page component.

[0050] The third sub-step is to determine the component type and component specification information corresponding to the second candidate page component.

[0051] In practice, the execution subject may read the corresponding DOM (Document Object Model) tree in the initial page canvas to determine the component type and component specification information corresponding to the second candidate page component.

[0052] The fourth sub-step is to generate a component description vector corresponding to the second candidate page component according to the component type and component specification information corresponding to the second candidate page component as a third component description vector.

[0053] The execution subject may generate the third component description vector by referring to the method of generating the first component description vector in the first step, which will not be described in detail here.

[0054] The fifth sub-step is to determine the vector similarity between the first component description vector and the third component description vector to obtain a second similarity.

[0055] In practice, the execution subject may determine the vector similarity between the first component description vector and the third component description vector by calculating the cosine similarity to generate the second similarity. Specifically, in the process of calculating the cosine similarity, the execution subject may calculate the cosine similarity of two parts, namely, the first part: the cosine similarity between the vector corresponding to the component type in the first component description vector and the vector corresponding to the component type in the third component description vector. The second part: the cosine similarity between the vector corresponding to the component description information in the first component description vector and the vector corresponding to the component description information in the third component description vector, and weighted sum the two parts of the cosine similarity obtained as the second similarity. In the weighted summation process, the weight value corresponding to the first part is greater than the weight value corresponding to the second part.

[0056] The sixth sub-step, in response to determining that the second similarity is greater than the preset similarity threshold, generates approximate page component information in the approximate page component information set according to the component position and component specification information corresponding to the second candidate page component.

[0057] Step 103 , fine-tuning the initial component position according to the component specification information and component position information included in the approximate page component information in the approximate page component information set, to generate an adjusted component position.

[0058] In some embodiments, the execution entity may fine-tune the initial component position according to the component specification information and component position information included in the approximate page component information in the approximate page component information set to generate an adjusted component position. The adjusted component position represents the adjusted center position and component boundary position of the target page component in the initial page canvas. For example, the target page component may be a rectangular frame component. The adjusted component position may include the adjusted center point position and the adjusted rectangular frame corner point position corresponding to the rectangular frame component.

[0059] As an example, first, the execution entity may determine the component position center according to the component position information included in the approximate page component information in the approximate page component information set. The component position center is the center of each page component corresponding to the approximate page component information set. Secondly, determine the first axis of symmetry with the component position center. The first axis of symmetry is an axis of symmetry that can divide each page component corresponding to the approximate page component information set and the target page component into axisymmetric parts. Then, the approximate page component information corresponding to the page component that is axisymmetric with the target page component position among each page component corresponding to the approximate page component information set is determined as the axisymmetric page component information. Next, determine the axisymmetric position according to the component specification information and component position information included in the axisymmetric page component information as the adjusted component position.

[0060] In some optional implementations of some embodiments, the execution subject fine-tunes the initial component position according to the component specification information and component position information included in the approximate page component information in the approximate page component information set to generate an adjusted component position, which may include the following steps:

[0061] The first step is to group the above-mentioned approximate page component information set according to the component position information included in the approximate page component information in the above-mentioned approximate page component information set to generate an approximate page component information group set.

[0062] Among them, the page components corresponding to each piece of approximate page component information in the approximate page component information group are close in component position to the above-mentioned target page component.

[0063] As an example, refer to Figure 2 The component position relationship diagram of the page components shown in FIG. Figure 2Display each page component corresponding to the target page component and the approximate page component information set. When the target page component is page component F, the approximate page component information corresponding to page component A, page component B, page component C, page component E, page component G, page component I, page component J and page component K constitute an approximate page component information group. The approximate page component information corresponding to page component D, page component H and page component L constitutes an approximate page component information group. When the target page component is page component A, the approximate page component information corresponding to page component B, page component F and page component E constitutes an approximate page component information group. The approximate page component information corresponding to page component C, page component G, page component K, page component J and page component I constitutes an approximate page component information group. The approximate page component information corresponding to page component D, page component H and page component L constitutes an approximate page component information group.

[0064] The second step is to generate a weight matrix based on the above-mentioned approximate page component information group set.

[0065] In practice, the matrix size of the weight matrix is ​​determined by the number and relative positions of the page components corresponding to the approximate page component information group set and the target page components. Figure 2 The component position relationship diagram of the page components shown in the figure, the matrix size of the weight matrix is ​​3×4. Among them, the weight values ​​corresponding to the positions of the approximate page component information in the approximate page component information group are the same. The weight values ​​corresponding to the approximate page component information group gradually decrease according to the distance between the page component corresponding to the approximate page component information group and the target page component. That is, the larger the weight value corresponding to the page component closer to the target page component, the smaller the weight value corresponding to the page component closer to the target page component.

[0066] The third step is to generate an initial position adjustment matrix according to the component specification information and component position information included in the approximate page component information in the above approximate page component information set.

[0067] The matrix size of the initial position adjustment matrix is ​​consistent with the matrix size of the weight matrix. The matrix values ​​in the initial position adjustment matrix represent the position increment from the initial component position to the adjusted component position. Figure 2 For example, the position increment from page component A to page component B should be equal to the position increment from page component B to page component C. Based on this, the above-mentioned execution entity can use the page component corresponding to the candidate page component information as a reference to determine the position increment of the target page component from the initial component position to the adjusted component position, so as to generate the above-mentioned initial position adjustment amount matrix.

[0068] The fourth step is to update the initial position adjustment matrix using the weight matrix to generate an updated position adjustment matrix.

[0069] In practice, the execution entity may multiply the matrix values ​​in the weight matrix and the corresponding positions in the initial position adjustment matrix as the matrix values ​​in the corresponding positions in the updated position adjustment matrix to generate the updated position adjustment matrix.

[0070] The fifth step is to generate the adjusted component position according to the updated position adjustment matrix.

[0071] In practice, the execution subject may first determine the arithmetic mean of the matrix values ​​in the updated position adjustment matrix, and then add the initial component position and the arithmetic mean to obtain the adjusted component position.

[0072] The content of "in some optional implementation methods of some embodiments" in the above steps 103 and 104, as an inventive point of the present disclosure, solves the technical problem mentioned in the background technology that "due to the fact that the dragging of page components may not be precise enough, the layout of page components in the entire page may be inaccurate, thereby reducing the usability of the generated page". First, in practice, similar page components often correspond to similar layout methods. Therefore, the present disclosure determines the approximate page component information set by horizontal and vertical detection methods respectively. Secondly, considering that there are distance constraints between similar page components during the fine-tuning process, and the constraints between page components at different distances gradually weaken, the present disclosure updates the initial position adjustment amount matrix by generating a weight matrix, and determines the adjusted component position in combination with the updated position adjustment amount matrix. In this way, automatic page component position fine-tuning is achieved, which solves the problem of inaccurate layout of page components in the entire page due to imprecise dragging during the dragging of page components.

[0073] Step 104, moving the target page component to the adjusted component position.

[0074] In some embodiments, the execution subject may move the target page component to the adjusted component position. In practice, the execution subject may update the component position of the target page component to the adjusted component position to achieve the purpose of moving the target page component.

[0075] Step 105 , in response to the completion of the movement, globally adjust the page components of the initial page canvas to generate an adjusted page canvas.

[0076] In some embodiments, in response to the completion of the move, the execution entity may perform global page component adjustments on the initial page canvas to generate an adjusted page canvas. In practice, the execution entity may repeat steps 103 to 104 to obtain a page canvas containing multiple selected page components as an adjusted page canvas. Specifically, the execution entity may treat each target page component contained in each initial page canvas and the page component corresponding to the corresponding approximate page component information set as a unit, and adopt the method of "in some optional implementations of some embodiments" in step 103 to perform global page component adjustments to generate an adjusted page canvas.

[0077] In some optional implementations of some embodiments, the execution subject performs global page component adjustment on the initial page canvas to generate an adjusted page canvas, which may include the following steps:

[0078] The first step is to generate a page component diagram according to at least one page component included in the initial page canvas.

[0079] For example, the execution subject may use the page components of at least one page component included in the initial page canvas as nodes to generate an undirected graph as a page component graph. Specifically, the page component graph may be represented by an adjacency matrix. For another example, the execution subject may convert the color value of the non-page component area in the initial page canvas to 0, perform binarization on the area corresponding to the page component, and obtain the page component graph.

[0080] In the second step, global graph features are extracted from the above page component graph to generate global canvas features.

[0081] In practice, the execution subject may extract global graph features from the page component graph through a graph feature extraction model to generate global canvas features. The graph feature extraction model may be an AlexNet model with the fully connected layer and the pooling layer removed.

[0082] The third step is to extract local graph features from the above page component graph using the block level as the feature extraction unit to generate local canvas features and obtain a local canvas feature set.

[0083] The feature extraction scale of the local graph feature extraction is smaller than the feature extraction scale of the global graph feature extraction. In practice, the execution subject may extract local graph features from the page component graph using a local feature extraction model whose receptive field is smaller than that of the graph feature extraction model, taking the block level as the feature extraction unit, to generate local canvas features. The local feature extraction model may be a convolutional neural network model.

[0084] The fourth step is to generate the page canvas adjustment information according to the global canvas features, the local canvas feature set and a pre-trained page canvas adjustment information generation model.

[0085] The page canvas adjustment information generation model is a pre-trained language model. For example, the page canvas adjustment information generation model may be a GPT model. The page canvas adjustment information is used to adjust the position of the page components in the initial page canvas.

[0086] The fifth step is to adjust the page components of the initial page canvas according to the page canvas adjustment information to generate the adjusted page canvas.

[0087] Step 106: fill component content in at least one page component included in the adjusted page canvas according to the page theme description information corresponding to the initial page canvas, so as to generate a content-filled page.

[0088] In some embodiments, the execution subject may fill the at least one page component included in the adjusted page canvas with component content according to the page theme description information corresponding to the initial page canvas, so as to generate a content-filled page. The page body description information is description information for describing the page function of the adjusted page canvas.

[0089] In some optional implementations of some embodiments, the execution subject fills component content in at least one page component included in the adjusted page canvas according to the page theme description information corresponding to the initial page canvas to generate a content-filled page, which may include the following steps:

[0090] The first step is to determine page component hierarchical description information according to at least one page component included in the adjusted page canvas.

[0091] The page component hierarchical description information is used to describe the hierarchical relationship of the page components in at least one page component included in the adjusted page canvas. In practice, the execution subject may use the tree structure of the DOM tree corresponding to the adjusted page canvas as the page component hierarchical description information.

[0092] In the second step, based on the above page component level description information as a constraint, the above page body description information is segmented and expanded to generate a set of description information to be filled.

[0093] In practice, first, the execution subject can implement the description information segmentation of different segmentation granularities for the page body description information according to the number of components and component relationships of the page components corresponding to the page component hierarchical description information, so as to determine the trunk description information corresponding to each page component in at least one page component included in the adjusted page canvas. Then, the execution subject can expand the trunk description information through, for example, a GPT model to generate description information to be filled, and obtain a set of description information to be filled.

[0094] The third step is to fill the description information to be filled in the above-mentioned description information set into the corresponding page component in at least one page component included in the above-mentioned adjusted page canvas to generate the above-mentioned content-filled page.

[0095] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the page generation method based on the drag-and-drop page component of some embodiments of the present disclosure, the page development efficiency is improved. Specifically, the reason for the low efficiency of page development is that the conventional page development method often requires the participation of multiple professionals, resulting in a long page development cycle, which affects the efficiency of page development. Based on this, the page generation method based on the drag-and-drop page component of some embodiments of the present disclosure, first, in response to monitoring the selection operation for the target page component, the target page component is controlled to move to the initial component position according to the drag trajectory, wherein the target page component is the page component selected in the optional page component list, the initial component position is the end position of the drag trajectory, and the initial component position is located in the initial page canvas. In this way, the position of the page component is adjusted by dragging. Secondly, the approximate page component detection is performed with the initial component position as the starting point to generate an approximate page component information set, wherein the approximate page component information in the approximate page component information set includes: component specification information and component position information. Next, according to the component specification information and component position information included in the approximate page component information in the above-mentioned approximate page component information set, the position of the above-mentioned initial component is fine-tuned to generate the adjusted component position. In practice, since the dragging method may cause the dragging position to be inaccurate, the position fine-tuning of the target page component is achieved by combining the approximate page component. Further, the above-mentioned target page component is moved to the above-mentioned adjusted component position. In addition, in response to the completion of the movement, the above-mentioned initial page canvas is adjusted globally to generate the adjusted page canvas. In this way, the global page component adjustment is achieved to avoid the problem of inaccurate global page layout caused by local adjustments. Finally, according to the page theme description information corresponding to the above-mentioned initial page canvas, the component content is filled for at least one page component included in the above-mentioned adjusted page canvas to generate a content-filled page, thereby realizing automatic page content filling. In this way, the page development efficiency is greatly improved.

[0096] Further references Figure 3 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a page generation device based on a drag-and-drop page component. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the page generation device based on the drag-and-drop page component can be specifically applied to various electronic devices.

[0097] like Figure 3 As shown, some embodiments of the page generation device 300 based on the drag-and-drop page component include: a first moving unit 301, an approximate page component detection unit 302, a position fine-tuning unit 303, a second moving unit 304, a global page component adjustment unit 305 and a component content filling unit 306. The first moving unit 301 is configured to, in response to monitoring a selection operation for a target page component, control the target page component to move to an initial component position according to a dragging trajectory, wherein the target page component is a page component selected in a list of optional page components, the initial component position is the end position of the dragging trajectory, and the initial component position is located within the initial page canvas; the approximate page component detection unit 302 is configured to perform approximate page component detection starting from the initial component position to generate an approximate page component information set, wherein the approximate page component information in the approximate page component information set includes: component specification information and component position information; the position fine-tuning unit 303 is configured to detect the approximate page components ... It is configured to fine-tune the position of the above-mentioned initial component according to the component specification information and component position information included in the approximate page component information in the above-mentioned approximate page component information set, so as to generate an adjusted component position; the second moving unit 304 is configured to move the above-mentioned target page component to the above-mentioned adjusted component position; the global page component adjustment unit 305 is configured to perform global page component adjustment on the above-mentioned initial page canvas in response to the completion of the movement, so as to generate an adjusted page canvas; the component content filling unit 306 is configured to fill component content for at least one page component included in the above-mentioned adjusted page canvas according to the page theme description information corresponding to the above-mentioned initial page canvas, so as to generate a content-filled page.

[0098] It can be understood that the units recorded in the page generation device 300 based on the drag-and-drop page component are similar to the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the page generation device 300 based on the drag-and-drop page component and the units included therein, and will not be described in detail here.

[0099] Reference below Figure 4, which shows a structural schematic diagram of an electronic device (eg, a computing device) 400 suitable for implementing some embodiments of the present disclosure. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0100] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory 402 or a program loaded from a storage device 408 into a random access memory 403. Various programs and data required for the operation of the electronic device 400 are also stored in the random access memory 403. The processing device 401, the read-only memory 402, and the random access memory 403 are connected to each other via a bus 404. An input / output interface 405 is also connected to the bus 404.

[0101] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 4 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0102] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the read-only memory 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0103] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0104] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0105] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being installed in the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to monitoring a selection operation for a target page component, controls the above-mentioned target page component to move to an initial component position according to a drag trajectory, wherein the above-mentioned target page component is a page component selected in a list of optional page components, the above-mentioned initial component position is the end position of the above-mentioned drag trajectory, and the above-mentioned initial component position is located within the initial page canvas; performs approximate page component detection starting from the above-mentioned initial component position to generate an approximate page component information set, wherein the above-mentioned approximate page component information set The approximate page component information in the approximate page component information set includes: component specification information and component position information; according to the component specification information and component position information included in the approximate page component information in the approximate page component information set, fine-tune the position of the initial component to generate an adjusted component position; move the target page component to the adjusted component position; in response to the completion of the move, perform a global page component adjustment on the initial page canvas to generate an adjusted page canvas; according to the page theme description information corresponding to the initial page canvas, fill component content for at least one page component included in the adjusted page canvas to generate a content-filled page.

[0106] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0107] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0108] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a first moving unit, an approximate page component detection unit, a position fine-tuning unit, a second moving unit, a global page component adjustment unit, and a component content filling unit. Among them, the names of these units do not constitute limitations on the units themselves in certain cases, for example, the position fine-tuning unit may also be described as "a unit for fine-tuning the position of the above-mentioned initial component according to the component specification information and component position information included in the approximate page component information in the above-mentioned approximate page component information set, so as to generate an adjusted component position".

[0109] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0110] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A page generation method based on a drag-and-drop page component, comprising: In response to monitoring a selection operation for a target page component, controlling the target page component to move to an initial component position according to a drag track, wherein the target page component is a page component selected from a list of optional page components, the initial component position is an end position of the drag track, and the initial component position is located within the initial page canvas; Performing approximate page component detection with the initial component position as a starting point to generate an approximate page component information set, wherein the approximate page component information in the approximate page component information set includes: component specification information and component position information; According to the component specification information and component position information included in the approximate page component information in the approximate page component information set, fine-tuning the initial component position to generate an adjusted component position; Moving the target page component to the adjusted component position; In response to the movement being completed, performing global page component adjustment on the initial page canvas to generate an adjusted page canvas; According to the page theme description information corresponding to the initial page canvas, at least one page component included in the adjusted page canvas is filled with component content to generate a content-filled page, wherein: The step of fine-tuning the initial component position according to the component specification information and component position information included in the approximate page component information in the approximate page component information set to generate an adjusted component position includes: According to the component position information included in the approximate page component information in the approximate page component information set, the approximate page component information set is grouped to generate an approximate page component information group set, wherein the page components corresponding to the respective approximate page component information in the approximate page component information group are close in component position to the target page component; Generate a weight matrix according to the approximate page component information group set, wherein the matrix size of the weight matrix is ​​determined by the number and relative positions of the page components corresponding to the approximate page component information group set and the target page components, and the weight values ​​of the corresponding positions of the approximate page component information in the approximate page component information group in the weight matrix are the same, and the weight value corresponding to the page component closer to the target page component is larger; Generate an initial position adjustment matrix according to the component specification information and component position information included in the approximate page component information in the approximate page component information set, wherein the matrix size of the initial position adjustment matrix is ​​consistent with the matrix size of the weight matrix, and the matrix value in the initial position adjustment matrix represents the position increment from the initial component position to the adjusted component position; The initial position adjustment amount matrix is ​​updated by the weight matrix to generate an updated position adjustment amount matrix, including: multiplying the matrix values ​​of the weight matrix and the corresponding positions in the initial position adjustment amount matrix to obtain the matrix values ​​of the corresponding positions in the updated position adjustment amount matrix to generate the updated position adjustment amount matrix; Generating the adjusted component position according to the updated position adjustment amount matrix includes: determining the arithmetic mean of the matrix values ​​in the updated position adjustment amount matrix; and adding the initial component position and the arithmetic mean to obtain the adjusted component position.

2. The method according to claim 1, wherein: The method further comprises: In response to receiving component content update information for the content-filled page, component content is updated for at least one page component included in the content-filled page according to the component content update information to generate a content-updated page.

3. The method according to claim 2, wherein: The method further comprises: Create a test container; In response to successful creation, in the test container, a page function test is performed on the content updated page using a pre-set test sample to generate a page test result; In response to the page test result indicating that the test has failed, a page test exception prompt message is generated for the page after the content is updated.

4. The method according to claim 3, wherein: The detecting of approximate page components with the initial component position as a starting point to generate an approximate page component information set includes: Generate a component description vector corresponding to the target page component as a first component description vector according to the component type and component specification information corresponding to the target page component; Taking the initial component position as the starting point, the following horizontal page component detection steps are performed: Move the detection frame laterally with a fixed step size; In response to determining that a page component is framed in the detection frame, determining the page component framed in the detection frame as a first candidate page component; Determine the component type and component specification information corresponding to the first candidate page component; Generate a component description vector corresponding to the first candidate page component as a second component description vector according to the component type and component specification information corresponding to the first candidate page component; Determine a vector similarity between the first component description vector and the second component description vector to obtain a first similarity; In response to determining that the first similarity is greater than a preset similarity threshold, generating approximate page component information in the approximate page component information set according to the component position and component specification information corresponding to the first candidate page component; Taking the initial component position as the starting point, the following vertical page component detection steps are performed: Move the detection frame vertically with a fixed step size; In response to determining that a page component is framed in the detection frame, determining the page component framed in the detection frame as a second candidate page component; Determine the component type and component specification information corresponding to the second candidate page component; generating a component description vector corresponding to the second candidate page component as a third component description vector according to the component type and component specification information corresponding to the second candidate page component; Determine the vector similarity between the first component description vector and the third component description vector to obtain a second similarity; In response to determining that the second similarity is greater than the preset similarity threshold, the approximate page component information in the approximate page component information set is generated according to the component position and component specification information corresponding to the second candidate page component.

5. The method according to claim 4, wherein: The global page component adjustment is performed on the initial page canvas to generate an adjusted page canvas, including: Generate a page component diagram according to at least one page component included in the initial page canvas; Performing global graph feature extraction on the page component graph to generate global canvas features; Taking the block level as a feature extraction unit, performing local graph feature extraction on the page component graph to generate local canvas features and obtain a local canvas feature set, wherein the feature extraction scale of the local graph feature extraction is smaller than the feature extraction scale of the global graph feature extraction; Generate the page canvas adjustment information according to the global canvas feature, the local canvas feature set and a pre-trained page canvas adjustment information generation model; According to the page canvas adjustment information, the page components of the initial page canvas are adjusted to generate the adjusted page canvas.

6. The method according to claim 5, wherein: The step of filling component content in at least one page component included in the adjusted page canvas according to the page theme description information corresponding to the initial page canvas to generate a content-filled page includes: Determine page component hierarchical description information according to at least one page component included in the adjusted page canvas; Taking the page component level description information as a constraint, segmenting and expanding the page body description information to generate a set of description information to be filled; The description information to be filled in the description information to be filled set is filled into a corresponding page component in at least one page component included in the adjusted page canvas to generate the content-filled page.

7. A page generation device based on a drag-and-drop page component, comprising: A first moving unit is configured to, in response to monitoring a selection operation on a target page component, control the target page component to move to an initial component position according to a drag track, wherein the target page component is a page component selected from a list of optional page components, the initial component position is a track end position of the drag track, and the initial component position is located within the initial page canvas; The approximate page component detection unit is configured to perform approximate page component detection starting from the initial component position to generate an approximate page component information set, wherein the approximate page component information in the approximate page component information set includes: component specification information and component position information; A position fine-tuning unit is configured to fine-tune the initial component position according to the component specification information and component position information included in the approximate page component information in the approximate page component information set, so as to generate an adjusted component position; A second moving unit is configured to move the target page component to the adjusted component position; A global page component adjustment unit is configured to perform global page component adjustment on the initial page canvas in response to completion of the movement, so as to generate an adjusted page canvas; The component content filling unit is configured to fill component content for at least one page component included in the adjusted page canvas according to the page theme description information corresponding to the initial page canvas, so as to generate a content-filled page, wherein: The step of fine-tuning the initial component position according to the component specification information and component position information included in the approximate page component information in the approximate page component information set to generate an adjusted component position includes: According to the component position information included in the approximate page component information in the approximate page component information set, the approximate page component information set is grouped to generate an approximate page component information group set, wherein the page components corresponding to the respective approximate page component information in the approximate page component information group are close in component position to the target page component; Generate a weight matrix according to the approximate page component information group set, wherein the matrix size of the weight matrix is ​​determined by the number and relative positions of the page components corresponding to the approximate page component information group set and the target page components, and the weight values ​​of the corresponding positions of the approximate page component information in the approximate page component information group in the weight matrix are the same, and the weight value corresponding to the page component closer to the target page component is larger; Generate an initial position adjustment matrix according to the component specification information and component position information included in the approximate page component information in the approximate page component information set, wherein the matrix size of the initial position adjustment matrix is ​​consistent with the matrix size of the weight matrix, and the matrix value in the initial position adjustment matrix represents the position increment from the initial component position to the adjusted component position; The initial position adjustment amount matrix is ​​updated by the weight matrix to generate an updated position adjustment amount matrix, including: multiplying the matrix values ​​of the weight matrix and the corresponding positions in the initial position adjustment amount matrix to obtain the matrix values ​​of the corresponding positions in the updated position adjustment amount matrix to generate the updated position adjustment amount matrix; Generating the adjusted component position according to the updated position adjustment amount matrix includes: determining the arithmetic mean of the matrix values ​​in the updated position adjustment amount matrix; and adding the initial component position and the arithmetic mean to obtain the adjusted component position.

8. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • System and method providing responsive editing and viewing, integrating hierarchical fluid components and dynamic layout

    CA3140610A1

  • Page skeleton screen generation method, device and equipment, and readable storage medium

    CN111352627A

  • File generation method and device, electronic equipment and computer readable medium

    CN112631588A

  • Color filling method and device

    CN112907700A

  • System and method for adaptable trend detection for component condition indicator data

    EP3467604A1