Page generation method and device, equipment and storage medium

By obtaining web page code information from the target system, merging components and generating target component library, the problem of large workload and poor accuracy of page diagram drawing in the PPM system is solved, and efficient page restoration and change are achieved.

CN119311267APending Publication Date: 2025-01-14INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310864725.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

During the development of project requirements, when drawing system page diagrams for functional transformation points, the existing technology has problems such as large workload and difficulty in ensuring accuracy. Especially in the PPM system, nearly 100 functional menus require manual restoration of page layout and Component composition.

Method used

By obtaining the web code information of the target system, establishing an initial component library, merging components with the same class name, generating a target component library, and calling the target component set based on the web link, generating the target function page, and changing the preset rules on it , generate the changed page.

Benefits of technology

It effectively reduces manual repetition, improves the accuracy of page restoration and changes, and reduces the time cost in the development process of demand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311267A_ABST
    Figure CN119311267A_ABST
Patent Text Reader

Abstract

The invention provides a page generation method and device, equipment and a storage medium, and can be applied to the technical field of computers and the technical field of finance. The method comprises the steps that attribute information corresponding to webpage elements in each function page in first webpage code information is obtained, and the first webpage code information comes from a target system; obtaining an initial component library according to each piece of attribute information corresponding to the webpage element; combining the components with the same class name in the initial component library to obtain a target component library; based on a target webpage link corresponding to a first target function page in the first webpage code information, calling a target component set corresponding to the target webpage link from a target component library, and generating the first target function page corresponding to the target webpage link; and performing a change operation on each target component in the first target function page according to a preset rule to obtain a second target function page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of computer technology and financial technology, and in particular to a page generation method, device, equipment, medium and program product. Background Art

[0002] During the project's demand development process, it is necessary to draw a system page diagram for the functional transformation points to show changes such as newly added or modified fields. Taking the PPM (Programmer's Package Manager, a graphical management tool) system as an example, there are nearly a hundred function menus in the PPM system. Each demand development process needs to restore the page layout and component composition by comparing the existing system situation. Therefore, in the related technology, drawing page diagrams for demand development has the problem of large workload and difficulty in ensuring accuracy. Summary of the invention

[0003] In view of the above problems, the present disclosure provides a page generation method, apparatus, device, medium and program product.

[0004] According to a first aspect of the present disclosure, there is provided a page generation method, comprising:

[0005] Obtaining attribute information corresponding to web page elements in each functional page in the first web page code information, wherein the first web page code information is derived from the target system;

[0006] According to each attribute information corresponding to the above web page elements, an initial component library is obtained;

[0007] Merge the components with the same class name in the above initial component library to obtain the target component library;

[0008] Based on the target web page link corresponding to the first target function page in the first web page code information, calling the target component set corresponding to the target web page link from the target component library to generate the first target function page corresponding to the target web page link;

[0009] Each target component in the above-mentioned first target function page is changed according to preset rules to obtain a second target function page.

[0010] According to an embodiment of the present disclosure, the initial component library is obtained according to each attribute information corresponding to the above web page element, including:

[0011] According to the position parameters in the attribute information corresponding to each of the web page elements, a first association relationship is established between each of the web page elements and each of the function pages, wherein the first association relationship represents a plurality of web page elements included in each of the function pages and the positions of the plurality of web page elements in the function pages;

[0012] The first association relationship, each of the web page elements and the attribute information corresponding to each of the web page elements are stored in a component library to obtain the initial component library, wherein the components in the initial component library represent the web page elements.

[0013] According to an embodiment of the present disclosure, the components with the same class name in the initial component library are merged to obtain a target component library, including:

[0014] Based on the attribute information corresponding to each of the components in the initial component library, components with the same class name in the initial component library are merged;

[0015] In the above initial component library, components with the same class name in the above initial component library are combined into a common component set;

[0016] Establishing a second association relationship between each common component in the common component set and each of the function pages, wherein the second association relationship represents at least one of the function pages where each of the common components is located;

[0017] After merging the components with the same class name in the initial component library, the second association relationship is stored in the initial component library to obtain the target component library.

[0018] According to an embodiment of the present disclosure, the target component library includes the first association relationship and the second association relationship. Based on the target web page link corresponding to the first target function page in the first web page code information, the target component set corresponding to the target web page link is called from the target component library to generate the first target function page corresponding to the target web page link, including:

[0019] Based on the first association relationship and the second association relationship, obtaining a target component set corresponding to the target web page link and attribute information corresponding to each target component from the target component library;

[0020] Each of the target components in the target component set is typeset according to corresponding attribute information to generate the first target function page corresponding to the target web page link.

[0021] According to an embodiment of the present disclosure, the page generation method further includes:

[0022] After the version of the target system is changed, the first webpage code information and the second webpage code information are obtained, wherein the first webpage code information represents the webpage code before the version is changed, and the second webpage code information represents the webpage code after the version is changed;

[0023] Generate a version change record table according to the first webpage code information and the second webpage code information;

[0024] According to the above version change record table, the above target component library is updated to obtain a new target component library.

[0025] According to an embodiment of the present disclosure, generating a version change record table according to the first webpage code information and the second webpage code information includes:

[0026] According to the first webpage code information, a first hash value of the first webpage code information is calculated using a hash algorithm;

[0027] According to the second webpage code information, using the hash algorithm, a second hash value of the second webpage code information is calculated;

[0028] Compare the first Hash value with the second Hash value to obtain a comparison result;

[0029] When the comparison result indicates that the first hash value and the second hash value are inconsistent, each web page element in each function page in the first web page code information is compared with each web page element in each function page in the second web page code information to obtain change information corresponding to the second web page code information;

[0030] Based on the above change information, the above version change record table is generated.

[0031] According to an embodiment of the present disclosure, the target component library is updated according to the version change record table to obtain a new target component library, including:

[0032] Acquire attribute information corresponding to each changed web page element in the version change record table from the second web page code information;

[0033] According to the attribute information corresponding to each of the changed web page elements, the target component library is updated to obtain the new target component library.

[0034] The second aspect of the present disclosure provides a page generation device, including: a first acquisition module, a second acquisition module, a merging module, a first generation module and a third acquisition module. Among them, the first acquisition module is used to obtain the attribute information corresponding to the web page elements in each function page in the first web page code information, wherein the above-mentioned first web page code information comes from the target system. The second acquisition module is used to obtain an initial component library according to each attribute information corresponding to the above-mentioned web page element. The merging module is used to merge the components with the same class name in the above-mentioned initial component library to obtain a target component library. The first generation module is used to call the target component set corresponding to the above-mentioned target web page link from the above-mentioned target component library based on the target web page link corresponding to the first target function page in the above-mentioned first web page code information, and generate the above-mentioned first target function page corresponding to the above-mentioned target web page link. The third acquisition module is used to perform a change operation on each target component in the above-mentioned first target function page according to a preset rule to obtain a second target function page.

[0035] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above method.

[0036] The fourth aspect of the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above method.

[0037] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0038] According to the page generation method, apparatus, device, medium and program product provided by the present disclosure, the attribute information corresponding to the web page elements in each function page in the first web page code information is obtained, and according to each attribute information corresponding to the web page element, an initial component library can be obtained, and then the components with the same class name in the initial component library are merged to obtain a target component library, so that based on the target web page link corresponding to the first target function page in the first web page code information, the target component set corresponding to the target web page link can be called from the target component library to generate the first target function page corresponding to the target web page link, and each target component in the first target function page can be changed according to the preset rules to obtain the second target function page, based on the obtained target component library, the components related to the target web page link can be directly called from the target component library and the components can be typeset, so that the first target function page can be restored, and on the basis of the first target function page, the target components in the first target function page can be changed according to the preset rules to obtain the changed second target function page, which can effectively reduce manual repetitive work and time cost in the demand development process, and improve the accuracy of page restoration and change. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above contents and other purposes, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0040] Figure 1 The application scenario diagram of the page generation method according to the embodiment of the present disclosure is schematically shown;

[0041] Figure 2 A flowchart of a page generation method according to an embodiment of the present disclosure is schematically shown;

[0042] Figure 3 A flowchart of obtaining a target component library according to an embodiment of the present disclosure is schematically shown;

[0043] Figure 4 A flowchart of generating a version change record table according to an embodiment of the present disclosure is schematically shown;

[0044] Figure 5 A schematic diagram showing a structural block diagram of a page generating device according to an embodiment of the present disclosure; and

[0045] Figure 6 A block diagram of an electronic device suitable for implementing a page generating method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0046] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0047] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0048] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0049] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0050] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of the data involved (including but not limited to user personal information) comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.

[0051] In the process of implementing the present disclosure, it was found that as the system construction gradually matures, most of the current functional transformation points are small-scale adjustments based on the original menu page, or new menus that refer to the layout and implementation methods of the existing functional pages. At this stage, page diagram design can be carried out through the hand-drawn component library in the prototype-related software, but the establishment of components consumes a lot of human resources, and there are different degrees of differences between different pages in a system, and there are many system function menus. It is unrealistic to rely entirely on manual means to establish web prototype components. At the same time, when the prototype components are used to restore the system pages and design for subtle optimization, the input-output ratio and accuracy will be further reduced. Therefore, in the related art, there are problems such as large workload and difficulty in ensuring accuracy when drawing page schematics in demand research and development.

[0052] To this end, an embodiment of the present disclosure provides a page generation method, which obtains attribute information corresponding to each web page element in each function page in the first web page code information, wherein the first web page code information originates from the target system; obtains an initial component library based on each attribute information corresponding to the web page element; merges components with the same class name in the initial component library to obtain a target component library; based on a target web page link corresponding to the first target function page in the first web page code information, calls a target component set corresponding to the target web page link from the target component library to generate a first target function page corresponding to the target web page link; performs a change operation on each target component in the first target function page according to preset rules to obtain a second target function page.

[0053] Figure 1 The application scenario diagram of the page generation method according to the embodiment of the present disclosure is schematically shown.

[0054] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0055] The user may use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0056] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0057] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0058] For example, the attribute information corresponding to the web page elements in each functional page in the first web page code information can be obtained through the server 105, and an initial component library can be obtained based on each attribute information corresponding to the web page element. The components with the same class name in the initial component library are then merged to obtain a target component library. Based on the target web page link corresponding to the first target functional page in the first web page code information, a target component set corresponding to the target web page link is called from the target component library to generate a first target functional page corresponding to the target web page link. Finally, each target component in the first target functional page is changed according to preset rules to obtain a second target functional page.

[0059] It should be noted that the page generation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the page generation device provided in the embodiment of the present disclosure can generally be set in the server 105. The page generation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the page generation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0060] 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.

[0061] The following will be based on Figure 1 The scene described by Figure 2 to Figure 4 The page generation method of the disclosed embodiment is described in detail.

[0062] Figure 2 The flowchart of the page generation method according to the embodiment of the present disclosure is schematically shown.

[0063] like Figure 2 As shown, the method 200 includes operations S210 to S250.

[0064] In operation S210, attribute information corresponding to each web page element in each function page in the first web page code information is obtained.

[0065] According to an embodiment of the present disclosure, the first webpage code information originates from the target system. For example, the first webpage code information may represent webpage source code information.

[0066] According to an embodiment of the present disclosure, a target system may include multiple function menus, and each function menu may correspond to a function page. A web page element may represent a component in a function page, and a web page element may represent a component. Attribute information may include position parameters and style parameters corresponding to the web page element. Among them, the position parameter may represent the position information of a web page element on a function page; the style parameter may represent the style information of a web page element, such as color, size, font, etc.; the component may represent pictures, text, etc. on the function page.

[0067] According to an embodiment of the present disclosure, first web page code information of a target system may be acquired, and then attribute information corresponding to web page elements in each functional page may be acquired from the first web page code information.

[0068] According to an embodiment of the present disclosure, taking the code information corresponding to a certain function page in the first webpage code information as an example, the code information in the code information can be sorted one by one starting from (document body element). (content division element), <aside>(indicates the part that is almost irrelevant to the rest of the page content), <nav>(indicates a portion of a page), <input> <select>(select element), (button element) and other code information corresponding to the web page elements are analyzed to obtain the inline styles corresponding to the web page elements. The inline styles may include style parameters corresponding to the web page elements.

[0069] In operation S220, an initial component library is obtained according to each attribute information corresponding to the web page element.

[0070] According to an embodiment of the present disclosure, each attribute information corresponding to the web page element can be saved, and then an initial component library can be obtained based on the attribute information corresponding to each web page element. The initial component library may include each web page element and the attribute information corresponding to the web page element.

[0071] In operation S230, components with the same class name in the initial component library are merged to obtain a target component library.

[0072] According to an embodiment of the present disclosure, components with the same class name in the initial component library can be merged so that components with the same class name appear only once in the component library, thereby reducing the number of components stored in the component library. Components with the same class name can represent components with repeated class names.

[0073] According to an embodiment of the present disclosure, taking the corresponding button web page element as an example, in the code information, it is actually a button element, but it will correspond to a class name, and the class names are all determined. For example, the class name may be determination, or it may be comparison, or it may be submission, etc., then for the button component, the component with repeated class name can represent that multiple components are all determination, or multiple components are all submission, etc., that is, the class name is the same.

[0074] According to an embodiment of the present disclosure, in the initial component library, for each type of component, the components with the same class name are merged respectively, so as to obtain the target component library.

[0075] In operation S240, based on the target web page link corresponding to the first target function page in the first web page code information, the target component set corresponding to the target web page link is called from the target component library to generate the first target function page corresponding to the target web page link.

[0076] According to an embodiment of the present disclosure, the target system may include multiple function menus, and each function menu may be equivalent to a web page link. After obtaining the target component library, the function menu that needs to be changed, that is, the target web page link, can be determined according to the needs, wherein the target web page link can correspond to the first target function page in the target system.

[0077] According to an embodiment of the present disclosure, based on the target web page link, that is, the first target function page, the target component set corresponding to the first target function page can be directly called from the target component library, and the target components in the target component set are laid out according to the corresponding attribute information, so that the first target function page can be restored.

[0078] In operation S250, each target component in the first target function page is changed according to the preset rules to obtain the second target function page.

[0079] According to an embodiment of the present disclosure, based on the restored first target function page, each target component in the first target function page can be changed according to preset rules in a prototype editing tool such as Axure (a prototype drawing software), so as to obtain a second target function page.

[0080] According to an embodiment of the present disclosure, the preset rules can represent the deletion of a certain target component or the addition of a certain target component or the adjustment of the attribute information of a certain target component. For example, the first target function page may include target component A, target component B and target component C, and the preset rules can represent the deletion of target component A, the addition of target component D, and the adjustment of target component C. Then, the second target function page obtained by performing a change operation on the first target function page based on the preset rules may include target component B, target component D and target component E, wherein target component E can represent the new component obtained after adjusting target component C.

[0081] According to an embodiment of the present disclosure, attribute information corresponding to the web page elements in each function page in the first web page code information is obtained, and based on each attribute information corresponding to the web page element, an initial component library can be obtained, and then the components with the same class name in the initial component library are merged to obtain a target component library, so that based on the target web page link corresponding to the first target function page in the first web page code information, a target component set corresponding to the target web page link can be called from the target component library to generate a first target function page corresponding to the target web page link, and each target component in the first target function page is changed according to preset rules to obtain a second target function page, and based on the obtained target component library, components related to the target web page link can be directly called from the target component library and the components can be typeset to restore the first target function page, and on the basis of the first target function page, the target components in the first target function page are changed according to preset rules to obtain the changed second target function page, which can effectively reduce manual repetitive work and time cost in the demand development process, and improve the accuracy of page restoration and change.

[0082] According to an embodiment of the present disclosure, an initial component library is obtained according to each attribute information corresponding to a web page element, including: establishing a first association relationship between each web page element and each functional page according to a position parameter in each attribute information corresponding to the web page element; storing the first association relationship, each web page element, and the attribute information corresponding to each web page element in the component library to obtain the initial component library.

[0083] According to an embodiment of the present disclosure, the first association relationship can represent multiple web page elements included in each functional page and the positions of the multiple web page elements in the functional pages respectively. The components in the initial component library can represent web page elements.

[0084] According to an embodiment of the present disclosure, a first association relationship between each web page element and each function page can be established based on the position parameter in the attribute information corresponding to each web page element, that is, based on the first association relationship, multiple web page elements included in a certain function page and the positions of the multiple web page elements on the function page can be determined, wherein the multiple web page elements can include web page elements of repeated types. For example, based on the first association relationship, it can be determined that a certain function page includes two web page elements A, web page element B and web page element C, and the positions of the two web page elements A on the function page, the positions of the web page element B on the function page, and the positions of the web page element C on the function page.

[0085] According to an embodiment of the present disclosure, the first association relationship, each web page element and the attribute information corresponding to each web page element can be stored in a component library to obtain an initial component library.

[0086] According to an embodiment of the present disclosure, for a certain function page, all components included in the function page can be determined based on the first association relationship, and all components corresponding to the function page and the corresponding attribute information can be directly called from the initial component library.

[0087] FIG. 3 schematically shows a flow chart of obtaining a target component library according to an embodiment of the present disclosure.

[0088] As shown in FIG. 3, the method 300 includes operations S310 to S340.

[0089] In operation S310, based on the attribute information corresponding to each component in the initial component library, the components with the same class name in the initial component library are merged.

[0090] According to an embodiment of the present disclosure, the class name corresponding to each component can be determined based on the attribute information corresponding to each component. In the case where the class names of multiple components are the same, the components with the same class name can be merged in the initial component library, that is, only one component is saved for the components with the same class name.

[0091] In operation S320, in the initial component library, the components with the same class name in the initial component library are formed into a public component set.

[0092] According to an embodiment of the present disclosure, the components with the same class name can be formed into a public component set. Among them, the components with the same class name can be defined as public components.

[0093] In operation S330, a second association relationship between each public component in the public component set and each functional page is established.

[0094] According to an embodiment of the present disclosure, the second association relationship can represent at least one functional page where each common component is located.

[0095] According to an embodiment of the present disclosure, a second association relationship between each common component in the common component set and each functional page can be established based on the position parameter in each attribute information corresponding to the web page element, that is, based on the second association relationship, the position of a certain common component in those functional pages and in the corresponding functional page can be determined.For example, based on the second association relationship, it is possible to determine whether a certain common component is in function page A, function page B, and function page C, as well as the position of the common component in function page A, the position of the common component in function page B, and the position of the common component in function page C.

[0096] In operation S340, after merging components with the same class name in the initial component library, the second association relationship is stored in the initial component library to obtain a target component library.

[0097] According to an embodiment of the present disclosure, after merging components with the same class name in the initial component library, the second association relationship is stored in the initial component library to obtain a target component library.

[0098] According to an embodiment of the present disclosure, merging components with the same class name in the initial component library can make components with the same class name appear only once in the component library, thereby reducing the number of components stored in the component library, and storing the second association relationship in the initial component library can determine the function page where a certain common component is located based on the second association relationship, so that the corresponding component can be directly called from the target component library later.

[0099] According to an embodiment of the present disclosure, the target component library may include a first association relationship and a second association relationship. Based on the target web page link corresponding to the first target function page in the first web page code information, the target component set corresponding to the target web page link is called from the target component library to generate the first target function page corresponding to the target web page link, including: based on the first association relationship and the second association relationship, the target component set corresponding to the target web page link and the attribute information corresponding to each target component are obtained from the target component library; each target component in the target component set is typeset according to the corresponding attribute information to generate the first target function page corresponding to the target web page link.

[0100] According to an embodiment of the present disclosure, based on the determined target web page link, the first target function page corresponding to the target web page link can be determined, then all components corresponding to the first target function page and the attribute information corresponding to the components can be determined based on the first association relationship, and the common components corresponding to the first target function page and the attribute information corresponding to the components can be determined based on the second association relationship, so that the target component set corresponding to the target web page link and the attribute information corresponding to each target component can be obtained.

[0101] According to an embodiment of the present disclosure, the position of each target component in the first target function page can be determined based on the position parameter in the attribute information corresponding to each target component; the style of each target component can be determined based on the style information in the attribute information corresponding to each target component. Based on the position and style corresponding to each target component, each target component is laid out and typeset to obtain the first target function page.

[0102] According to an embodiment of the present disclosure, the target component library may store attribute information corresponding to each component. When a component in the target component library is subsequently called, a component of a corresponding style may be constructed based on the style parameters in the attribute information corresponding to the component, and then the corresponding component may be laid out and typeset at a corresponding position on the page according to the position parameters. Alternatively, the target component library may store component patterns constructed based on corresponding style parameters and position parameters corresponding to the component. When a component in the target component library is subsequently called, a component of a corresponding style may be directly obtained from the target component library, and laid out and typeset at a corresponding position on the page according to the corresponding position parameters.

[0103] According to an embodiment of the present disclosure, based on a determined target web page link, a target component corresponding to a target web page link may be directly called from the target component library, and each target component may be laid out and typeset according to the corresponding attribute information, so that the first target function page may be restored, so that the target component may be subsequently changed directly on the first target function page to obtain a second target function page.

[0104] According to an embodiment of the present disclosure, the page generation method further includes: after the version of the target system is changed, obtaining the first web page code information and the second web page code information; generating a version change record table according to the first web page code information and the second web page code information; and updating the target component library according to the version change record table to obtain a new target component library.

[0105] According to an embodiment of the present disclosure, the first web page code information can represent the web page code before the version change, and the second web page code information can represent the web page code after the version change.

[0106] According to an embodiment of the present disclosure, based on the obtained second target function page, the second target function page can be code edited, so as to obtain a new version of the target system. After the version of the target system is changed and the new version of the target system is delivered to the test environment, a version change record table can be generated by the change of the code information corresponding to the web page elements between the obtained first web page code information and the second web page code information. The version change record table may include the addition, deletion, and adjustment of attribute information of the web page elements.

[0107] According to an embodiment of the present disclosure, based on the change information of the web page elements in the version change record table, i.e., the addition, deletion, and adjustment of the web page elements, the target component library obtained based on the first web page code information can be updated, thereby obtaining a new target component library corresponding to the second web page code information.

[0108] According to an embodiment of the present disclosure, the second web page code information can be used as the first web page code information before the next version change to compare with the new second web page code information after the next version change, and the new target component library obtained can be updated again.

[0109] According to an embodiment of the present disclosure, the target component library can be updated based on the version change record table generated by comparing the first web page code information and the second web page code information obtained before and after the version change, so that the second target function page after the first target function page is changed can be restored based on the new target component library obtained later.

[0110] FIG. 4 schematically shows a flow chart of generating a version change record table according to an embodiment of the present disclosure.

[0111] As shown in FIG. 4, the method 400 includes operations S410 to S450.

[0112] In operation S410, a first hash value of the first web page code information is calculated using a hash algorithm based on the first web page code information.

[0113] According to an embodiment of the present disclosure, the web page source code is fully acquired based on a certain version, the web page code is downloaded, the first web page code information is obtained, the first hash value of the first web page code information is calculated, and used as an analysis basis, wherein the first web page source code information can represent the web page code information before the version change of the target system.

[0114] In operation S420, a second hash value of the second web page code information is calculated using a hash algorithm based on the second web page code information.

[0115] According to an embodiment of the present disclosure, after each version is delivered to the test environment, the latest version of the web page code is downloaded to obtain the second web page code information, and the second hash value of the second web page code information is calculated, wherein the second web page code information can represent the web page code information after the target system version is changed.

[0116] In operation S430, the first hash value and the second hash value are compared to obtain a comparison result.

[0117] According to an embodiment of the present disclosure, the first hash value and the second hash value can be compared to obtain a comparison result. Whether the function page has changed can be determined based on the comparison result.

[0118] In operation S440, when the comparison result indicates that the first hash value and the second hash value are inconsistent, each web page element in each function page in the first web page code information is compared with each web page element in each function page in the second web page code information to obtain change information corresponding to the second web page code information.

[0119] According to an embodiment of the present disclosure, when the comparison result can indicate that the first hash value and the second hash value are inconsistent, the function page changes, and a full comparison of the first web page code information and the second web page code information is required.< / select> (form element), (input element), <input> <select>, etc., code information corresponding to the web page elements, and records the addition of new web page elements, adjustment of attribute information of web page elements, deletion of web page elements, etc. Among them, the change information can represent the addition of new web page elements, adjustment of attribute information of web page elements, deletion of web page elements, etc.

[0120] In operation S450, based on the change information, a version change record table is generated.

[0121] According to an embodiment of the present disclosure, a version change record table can be generated based on the obtained change information.

[0122] According to an embodiment of the present disclosure, the calculated first hash value of the first web page code information and the second hash value of the second web page code information are compared. When the comparison result represents that the first hash value and the second hash value are inconsistent, by comparing each web page element in each function page in the first web page code information with each web page element in each function page in the second web page code information, the change information corresponding to the second web page code information is obtained, so that the version change record table can be generated according to the change information, so as to update the target component library according to the version change record table later.

[0123] According to an embodiment of the present disclosure, according to the version change record table, the target component library is updated to obtain a new target component library, including: obtaining the attribute information corresponding to each changed web page element in the version change record table from the second web page code information; updating the target component library according to the attribute information corresponding to each changed web page element to obtain a new target component library.

[0124] According to an embodiment of the present disclosure, the attribute information corresponding to each changed web page element recorded in the version change record table is obtained from the second web page code information, and according to the attribute information corresponding to each changed web page element, the components, the common component set, the first association relationship, the second association relationship and the attribute information corresponding to each changed web page element in the target component library are updated, so that a new target component library can be obtained.

[0125] According to an embodiment of the present disclosure, the newly added web page elements can be directly stored in the target component library, the attribute information of the adjusted web page elements can be updated, and the deleted web page elements can be deleted.

[0126] According to an embodiment of the present disclosure, based on the changed web page elements recorded in the version change record representation, the target component library can be self-updated so that the second target function page can be restored during the next version change of the target system.

[0127] Based on the above-mentioned page generation method, the present disclosure also provides a page generation device. The device will be described in detail below in conjunction with Figure 5.

[0128] Figure 5 schematically shows a structural block diagram of the page generation device according to an embodiment of the present disclosure.

[0129] As shown in Figure 5, the page generation device 500 of this embodiment includes a first acquisition module 510, a second acquisition module 520, a merging module 530, a first generation module 540 and a third acquisition module 550.

[0130] The first acquisition module 510 is used to obtain the attribute information corresponding to the web page elements in each functional page in the first web page code information, wherein the first web page code information is derived from the target system. In one embodiment, the first acquisition module 510 can be used to perform the operation S210 described above, which will not be described in detail here.

[0131] The second acquisition module 520 is used to obtain the initial component library according to the attribute information corresponding to each web page element. In one embodiment, the second acquisition module 520 can be used to perform the operation S220 described above, which will not be described in detail here.

[0132] The merging module 530 is used to merge the components with the same class name in the initial component library to obtain the target component library. In one embodiment, the merging module 530 can be used to perform the operation S230 described above, which will not be described in detail here.

[0133] The first generation module 540 is used to call the target component set corresponding to the target web page link from the target component library based on the target web page link corresponding to the first target functional page in the first web page code information, and generate the first target functional page corresponding to the target web page link. In one embodiment, the first generation module 540 can be used to perform the operation S240 described above, which will not be described in detail here.

[0134] The third acquisition module 550 is used to perform a change operation on each target component in the first target function page according to a preset rule to obtain a second target function page. In one embodiment, the third acquisition module 550 can be used to perform the operation S250 described above, which will not be described in detail here.

[0135] According to an embodiment of the present disclosure, the second acquisition module 520 includes a first establishment unit and a first acquisition unit.

[0136] The first establishment unit is used to establish a first association relationship between each web page element and each function page according to a position parameter in each attribute information corresponding to the web page element, wherein the first association relationship represents a plurality of web page elements included in each function page and the positions of the plurality of web page elements in the function page respectively.

[0137] The first acquisition unit is used to store the first association relationship, each web page element and the attribute information corresponding to each web page element in a component library to obtain an initial component library, wherein the components in the initial component library represent the web page elements.

[0138] According to an embodiment of the present disclosure, the merging module 530 includes a merging unit, a constituting unit, a second establishing unit, and a second obtaining unit.

[0139] The merging unit is used to merge components with the same class name in the initial component library based on the attribute information corresponding to each component in the initial component library.

[0140] The constituting unit is used to form a common component set in the initial component library with components with the same class name in the initial component library.

[0141] The second establishing unit is used to establish a second association relationship between each common component in the common component set and each functional page, wherein the second association relationship represents at least one functional page where each common component is located.

[0142] A second obtaining unit, configured to store the second association relationship in the initial component library after merging the components with the same class name in the initial component library to obtain a target component library.

[0143] According to an embodiment of the present disclosure, the first generating module 540 includes a first obtaining unit and a first generating unit.

[0144] The first obtaining unit, configured to obtain a target component set corresponding to a target web page link and attribute information corresponding to each target component from the target component library based on the first association relationship and the second association relationship.

[0145] The first generating unit, configured to layout each target component in the target component set according to the corresponding attribute information to generate a first target function page corresponding to the target web page link.

[0146] According to an embodiment of the present disclosure, the page generating device 500 further includes an obtaining module, a second generating module and a fourth obtaining module.

[0147] An obtaining module, configured to obtain the first web page code information and the second web page code information after the version of the target system is changed, wherein the first web page code information represents the web page code before the version change, and the second web page code information represents the web page code after the version change.

[0148] A second generation module, configured to generate a version change record table according to the first web page code information and the second web page code information.

[0149] A fourth acquisition module, configured to update the target component library according to the version change record table to obtain a new target component library.

[0150] According to an embodiment of the present disclosure, the second generation module includes a first calculation unit, a second calculation unit, a comparison unit, a third acquisition unit, and a second generation unit.

[0151] The first calculation unit, configured to calculate a first hash value of the first web page code information using a hash algorithm according to the first web page code information.

[0152] The second calculation unit, configured to calculate a second hash value of the second web page code information using a hash algorithm according to the second web page code information.

[0153] The comparison unit, configured to compare the first hash value and the second hash value to obtain a comparison result.

[0154] The third acquisition unit, configured to compare each web page element in each function page in the first web page code information with each web page element in each function page in the second web page code information to obtain change information corresponding to the second web page code information when the comparison result indicates that the first hash value and the second hash value are inconsistent.

[0155] A second generation unit is used to generate a version change record table based on the change information.

[0156] According to an embodiment of the present disclosure, the fourth acquisition module includes a second acquisition unit and an update unit.

[0157] The second acquisition unit is used to obtain attribute information corresponding to each changed web page element in the version change record table from the second web page code information.

[0158] The update unit is used to update the target component library according to the attribute information corresponding to each changed web page element to obtain a new target component library.According to an embodiment of the present disclosure, any multiple modules in the first acquisition module 510, the second acquisition module 520, the merging module 530, the first generation module 540 and the third acquisition module 550 can be merged in one module to realize, or any one module therein can be split into multiple modules. Or, at least part of the functions of one or more modules in these modules can be combined with at least part of the functions of other modules, and realized in one module. According to an embodiment of the present disclosure, at least one of the first acquisition module 510, the second acquisition module 520, the merging module 530, the first generation module 540 and the third acquisition module 550 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way that circuit is integrated or packaged, or with any one of software, hardware and firmware three kinds of implementations or with any of several suitable combinations thereof. Alternatively, at least one of the first obtaining module 510, the second obtaining module 520, the merging module 530, the first generating module 540 and the third obtaining module 550 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be executed.

[0160] FIG6 schematically shows a block diagram of an electronic device suitable for implementing a page generating method according to an embodiment of the present disclosure.

[0161] As shown in FIG6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for executing different actions of the method flow according to an embodiment of the present disclosure. In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other through bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 602 and / or RAM 603. It should be noted that the program may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that the computer program read therefrom is installed into the storage portion 608 as needed.

[0164] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0165] According to the embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: 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), 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 the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.

[0166] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the item recommendation method provided by the embodiment of the present disclosure.

[0167] When the computer program is executed by the processor 601, the above-mentioned functions defined in the system / device of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0168] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0169] In such an embodiment, the computer program may be downloaded and installed from the network through the communication part 609, and / or installed from a removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above may be implemented by a computer program module.

[0170] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0171] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each square frame in a flow chart or a block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, a program segment, or a part of a code comprises one or more executable instructions for realizing the logical function of a regulation. It should also be noted that in some implementations as replacements, the function marked in the square frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two square frames represented in succession can actually be executed substantially in parallel, and they can sometimes also be executed in the opposite order, depending on the function involved. It should also be noted that each square frame in a block diagram or a flow chart, and the combination of the square frames in a block diagram or a flow chart, can be realized by a dedicated hardware-based system that performs a specified function or operation, or can be realized by a combination of dedicated hardware and computer instructions.

[0172] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0173] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present disclosure.< / select> ,, < / nav> < / aside>

Claims

1. A page generation method, comprising: Obtaining attribute information corresponding to each web page element in each functional page in the first web page code information, wherein the first web page code information is derived from the target system; Obtaining an initial component library according to each attribute information corresponding to the web page element; Merge components with the same class name in the initial component library to obtain a target component library; Based on the target web page link corresponding to the first target function page in the first web page code information, calling the target component set corresponding to the target web page link from the target component library to generate the first target function page corresponding to the target web page link; Each target component in the first target function page is changed according to preset rules to obtain a second target function page.

2. The method according to claim 1, wherein: The initial component library is obtained according to each attribute information corresponding to the web page element, including: According to each position parameter in the attribute information corresponding to the web page element, a first association relationship is established between each web page element and each function page, wherein the first association relationship represents a plurality of web page elements included in each function page and the positions of the plurality of web page elements in the function page respectively; The first association relationship, each web page element and the attribute information corresponding to each web page element are stored in a component library to obtain the initial component library, wherein the components in the initial component library represent the web page elements.

3. The method according to claim 1, wherein: The components with the same class name in the initial component library are merged to obtain a target component library, including: Based on the attribute information corresponding to each of the components in the initial component library, merging components with the same class name in the initial component library; In the initial component library, components with the same class name in the initial component library are combined into a common component set; Establishing a second association relationship between each common component in the common component set and each function page, wherein the second association relationship represents at least one function page where each common component is located; After merging components with the same class name in the initial component library, the second association relationship is stored in the initial component library to obtain the target component library.

4. The method according to claim 1, wherein: The target component library includes the first association relationship and the second association relationship, and based on the target web page link corresponding to the first target function page in the first web page code information, calling the target component set corresponding to the target web page link from the target component library to generate the first target function page corresponding to the target web page link includes: Based on the first association relationship and the second association relationship, acquiring a target component set corresponding to the target web page link and attribute information corresponding to each target component from the target component library; Each target component in the target component set is typeset according to corresponding attribute information to generate the first target function page corresponding to the target web page link.

5. The method according to claim 3 or 4, further comprising: After the version of the target system is changed, the first webpage code information and the second webpage code information are obtained, wherein the first webpage code information represents the webpage code before the version is changed, and the second webpage code information represents the webpage code after the version is changed; Generate a version change record table according to the first webpage code information and the second webpage code information; According to the version change record table, the target component library is updated to obtain a new target component library.

6. The method according to claim 5, wherein: The step of generating a version change record table according to the first webpage code information and the second webpage code information includes: According to the first webpage code information, a first hash value of the first webpage code information is calculated by using a hash algorithm; According to the second webpage code information, using the hash algorithm, a second hash value of the second webpage code information is calculated; Compare the first Hash value and the second Hash value to obtain a comparison result; When the comparison result indicates that the first hash value and the second hash value are inconsistent, each web page element in each function page in the first web page code information is compared with each web page element in each function page in the second web page code information to obtain change information corresponding to the second web page code information; Based on the change information, the version change record table is generated.

7. The method according to claim 5, wherein: The updating of the target component library according to the version change record table to obtain a new target component library includes: Acquire attribute information corresponding to each changed web page element in the version change record table from the second web page code information; According to the attribute information corresponding to each changed web page element, the target component library is updated to obtain the new target component library.

8. A page generating device, comprising: A first obtaining module, used to obtain attribute information corresponding to each web page element in each functional page in the first web page code information, wherein the first web page code information comes from the target system; A second obtaining module is used to obtain an initial component library according to each attribute information corresponding to the web page element; A merging module, used for merging components with the same class name in the initial component library to obtain a target component library; A first generating module is used to call a target component set corresponding to the target web page link from the target component library based on the target web page link corresponding to the first target function page in the first web page code information, and generate the first target function page corresponding to the target web page link; The third acquisition module is used to perform a change operation on each target component in the first target function page according to a preset rule to obtain a second target function page.

9. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.