CN106980508A - Method and apparatus for generating the page - Google Patents

Method and apparatus for generating the page Download PDF

Info

Publication number
CN106980508A
CN106980508A CN201710213101.0A CN201710213101A CN106980508A CN 106980508 A CN106980508 A CN 106980508A CN 201710213101 A CN201710213101 A CN 201710213101A CN 106980508 A CN106980508 A CN 106980508A
Authority
CN
China
Prior art keywords
page
module
information
page module
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710213101.0A
Other languages
Chinese (zh)
Inventor
肖凤言
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201710213101.0A priority Critical patent/CN106980508A/en
Publication of CN106980508A publication Critical patent/CN106980508A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This application discloses the method and apparatus for generating the page.One embodiment of this method includes:For each module information in the configuration file that previously generates, the module information is matched with the module information of each component in the assembly set prestored;If the match is successful, the component indicated by the module information that the match is successful is selected from assembly set as target element;The module information of at least one component based on each page module at least one page module in configuration file, is combined to target element, generates at least one page module;The page module information of at least one page module based on the page to be generated in configuration file, is combined at least one page module generated, generates the page.This embodiment improves the efficiency of the generation page.

Description

Method and apparatus for generating the page
Technical field
The application is related to field of computer technology, and in particular to Internet technical field, more particularly, to generates the page Method and apparatus.
Background technology
With the rapid development of Internet, increasing industry enters propagation and the business of row information by Webpage Push.User can obtain various resources by browsing Webpage.
However, existing auto-building html files mode is typically the generation page of monoblock type, when the page has renewal, it is necessary to again Full page is generated, causes efficiency of page generation relatively low.
The content of the invention
The purpose of the application is to propose a kind of improved method and apparatus for generating the page, to solve background above The technical problem that technology segment is mentioned.
In a first aspect, the embodiment of the present application provides a kind of method for generating the page, this method includes:For advance Each module information in the configuration file of generation, by each component in the module information and the assembly set prestored Module information is matched, wherein, configuration file is used for the page module for recording at least one page module of the page to be generated The module information of at least one component of each page module in information and at least one page module;If the match is successful, from The component indicated by the module information that the match is successful is selected in assembly set as target element;Based in configuration file extremely The module information of at least one component of each page module in a few page module, is combined to target element, raw Into at least one page module;The page module letter of at least one page module based on the page to be generated in configuration file Breath, is combined at least one page module generated, generates the page.
In certain embodiments, this method also includes:If matching is unsuccessful, to matching indicated by unsuccessful module information The content of component analyzed, the component indicated by the unsuccessful module information of generation matching is used as target element.
In certain embodiments, the page module information of at least one page module is being treated including at least one page module Generate the layout information on the page;And the page mould of at least one page module based on the page to be generated in configuration file Block message, is combined at least one page module generated, generates the page, including:According in configuration file at least Layout information of one page module on the page to be generated, is laid out at least one page module generated, generation The page.
In certain embodiments, this method also includes:More new command in response to receiving the page, according to more new command More new configuration file is indicated, wherein, more new command includes at least one of following:Add specified page module, delete specified page Module and replacement specified page module.
In certain embodiments, the step of the step of this method also includes generation configuration file, generation configuration file, includes: Content to the page to be generated is analyzed, and by page division to be generated at least one page module, and obtains at least one The page module information of page module;For each page module at least one page module, in the page module Appearance is analyzed, and obtains the module information of at least one component of the page module;The page based at least one page module The module information of at least one component of each page module in module information and at least one page module, generation configuration text Part.
In certain embodiments, for each page module at least one page module, in the page module Appearance is analyzed, and obtains the module information of at least one component of the page module, including:For at least one page module Each page module, the layout to the page module analyzes, and obtains the module information of the template assembly of the page module; The pattern of the page module is analyzed, the module information of the styling component of the page module is obtained;To the page module Function is analyzed, and obtains the module information of the functional unit of the Page Template.
Second aspect, the embodiment of the present application provides a kind of device for being used to generate the page, and the device includes:Component matching Unit, be configured to for each module information in the configuration file that previously generates, by the module information and prestores The module information of each component in assembly set is matched, wherein, configuration file is used to record the page to be generated at least At least one component of each page module in the page module information and at least one page module of one page module Module information;Component chooses unit, if being configured to, the match is successful, and the module information that the match is successful is selected from assembly set Indicated component is used as target element;Page module generation unit, is configured to based at least one page in configuration file The module information of at least one component of each page module in face mould block, is combined to target element, generation at least one Individual page module;Page generating unit, is configured at least one page module based on the page to be generated in configuration file Page module information, at least one page module generated is combined, generate the page.
In certain embodiments, the device also includes:Component generation element, if it is unsuccessful to be configured to matching, to matching The content of component indicated by unsuccessful module information is analyzed, the group indicated by the unsuccessful module information of generation matching Part is used as target element.
In certain embodiments, the page module information of at least one page module is being treated including at least one page module Generate the layout information on the page;And page generating unit is further configured to:According at least one in configuration file Layout information of the page module on the page to be generated, is laid out at least one page module generated, generates the page.
In certain embodiments, the device also includes:Renewal of the page unit, is configured in response to receiving the page more New command, according to the instruction more new configuration file of more new command, wherein, more new command includes at least one of following:Addition is specified Page module, deletion specified page module and replacement specified page module.
In certain embodiments, the device also includes configuration file generation unit, is configured to generate configuration file, bag Include:Page module acquisition of information subelement, is configured to analyze the content of the page to be generated, by page division to be generated Into at least one page module, and obtain the page module information of at least one page module;Module information obtains subelement, matches somebody with somebody Put for for each page module at least one page module, the content to the page module to be analyzed, obtain and be somebody's turn to do The module information of at least one component of page module;Configuration file generates subelement, is configured to be based at least one page The module information of at least one component of each page module in the page module information and at least one page module of module, Generate configuration file.
In certain embodiments, module information obtains subelement and included:Template assembly data obtaining module, is configured to pair Each page module at least one page module, the layout to the page module is analyzed, and obtains the page module Template assembly module information;Styling component data obtaining module, is configured to analyze the pattern of the page module, Obtain the module information of the styling component of the page module;Functional unit data obtaining module, is configured to the page module Function analyzed, obtain the module information of the functional unit of the Page Template.
The third aspect, the embodiment of the present application provides a kind of server, and the server includes:One or more processors; Storage device, for storing one or more programs, when one or more programs are executed by one or more processors so that one Individual or multiple processors realize the method as described in any implementation in first aspect.
Fourth aspect, the embodiment of the present application provides a kind of computer-readable recording medium, is stored thereon with computer journey Sequence, realizes the method as described in any implementation in first aspect when the computer program is executed by processor.
The method and apparatus for generating the page that the embodiment of the present application is provided, by by the module information in configuration file Matched with the module information in assembly set, obtain target element;Then the group of the page module in configuration file The module information of part, is combined to target element, generates page module;Finally according to the page module letter in configuration file Breath, is combined to the page module generated, generates the page.By page module and modularization, when updating the page, only The module or component for needing to update on the page is updated the page after generation updates can be achieved, so as to improve generation page The efficiency in face.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that the embodiment of the present application can apply to exemplary system architecture figure therein;
Fig. 2 is the flow chart for being used to generate one embodiment of the method for the page according to the application;
Fig. 3 is the schematic diagram for being used to generate an application scenarios of the method for the page according to the embodiment of the present application;
Fig. 4 is the flow chart of one embodiment of the method for the generation configuration file according to the application;
Fig. 5 is the structural representation for being used to generate one embodiment of the device of the page according to the application;
Fig. 6 is adapted for the structural representation of the computer system of the server for realizing the embodiment of the present application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that, in order to Be easy to description, illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1, which is shown, can apply the method for generating the page or the device for generating the page of the embodiment of the present application Embodiment exemplary system architecture 100.
As shown in figure 1, system architecture 100 can include terminal device 101,102,103, network 104 and server 105. Medium of the network 104 to provide communication link between terminal device 101,102,103 and server 105.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted with using terminal equipment 101,102,103 by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications can be installed, such as web browser should on terminal device 101,102,103 With, shopping class application, searching class application, JICQ, mailbox client, social platform software etc..
Terminal device 101,102,103 can be the various electronic equipments browsed with display screen and supported web page, bag Include but be not limited to smart mobile phone, tablet personal computer, E-book reader, pocket computer on knee and desktop computer etc..
Server 105 can be to provide the server of various services, such as to being shown on terminal device 101,102,103 Webpage provides the backstage web page server supported.Backstage web page server can be to the page module information and group in configuration file Part information is analyzed, generate the corresponding page and by the page feed back to request browse the page terminal device 101,102, 103。
It should be noted that the method for being used to generate the page that the embodiment of the present application is provided typically is held by server 105 OK, correspondingly, it is generally positioned at for generating the device of the page in server 105.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realizing need Will, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the flow for being used to generate one embodiment of the method for the page according to the application is shown 200.This is used for the method for generating the page, comprises the following steps:
Step 201, for each module information in the configuration file that previously generates, by the module information with prestoring Assembly set in the module information of each component matched.
In the present embodiment, for each module information in configuration file, the method for generating the page runs on it On electronic equipment (such as the server 105 shown in Fig. 1) can be by each component in the module information and assembly set Module information be compared, if in assembly set in the presence of a component module information it is identical with the module information, match Success;It is on the contrary then match unsuccessful.
In the present embodiment, in order to improve the reusability of component, electronic equipment can be in advance by higher some of reusability Component is prestored in the form of assembly set., can first will be each in configuration file when electronic equipment generates the page Module information is matched with the module information of each component in assembly set, if the match is successful, is obtained from assembly set The component is taken, if matching is unsuccessful, the component is generated.This also reduces the workload of formation component.
Herein, configuration file can be the file of various forms.For example, configuration file can be JSON (JavaScript Object Notation, JS object tag) file.JSON is a kind of data interchange format of lightweight, it It is (a kind of by Ecma (European Computer Manufacturers Association, Europe meter based on ECMAScript Suan Ji AEMs) the international shell script design language standardized by ECMA-262) specification a subset, using complete Full data are stored and represent independently of the text formatting of programming language.It is succinct to cause JSON to turn into reason with clearly hierarchical structure The data interchange language thought.Configuration file can also be XML (Extensible Markup Language, extensible markup language Speech) file.XML is W3C (World Wide Web Consortium, World Wide Web Consortium) standard technique, portable stronger, Various platforms are general, and XML is highly expansible, and its markup language can be with self-defined, therefore can provide more data Operation.
Herein, configuration file can be used for the page module information for recording at least one page module of the page to be generated With the module information of at least one component of each page module at least one page module.Wherein, page module again may be used To be referred to as page plate, it can be analyzed by the content to the page to be generated, so that by page division Cheng Ruo to be generated Dry page plate, one piece of content of each page plate correspondence page to be generated.If for example, the page to be generated is medical webpage The page, then the page to be generated can be just divided into:Multiple page modules such as disease, symptom, inspection, operation.Page module Information can include but is not limited to the title of page module, the mark of page module, the name of each component of composition page module Claim, the layout information on the page to be generated of mark, page module of each component of composition page module etc..Component again may be used To be referred to as web pages component, various conventional interface assemblies can be included, can light structure such as form, tree, the combobox that links Produce various page modules.Under normal circumstances, component can include but is not limited to tpl (template, template) component, CSS (i.e. JavaScript is a kind of literal translation formula script language by (Cascading Style Sheets, CSS) component and JS Speech) component etc..Module information can include but is not limited to the title of component, the mark of component, the page module belonging to component Title, the mark of page module belonging to component etc..
Analyzed and oneself by the content to the page to be generated it should be noted that configuration file can be electronic equipment Dynamic generate or research staff is manually generated according to advance demand information, tool of the present embodiment to configuration file Body generating mode is without limiting.
Step 202, if the match is successful, the component indicated by the module information that the match is successful is selected from assembly set and is made For target element.
In the present embodiment, if the matching result in step 201 shows that the match is successful, electronic equipment can be from component set The component indicated by the module information that the match is successful is selected in conjunction as target element.So, assembly set is not only increased In component reusability, also reduce the workload of formation component.
In some optional implementations of the present embodiment, if matching is unsuccessful, electronic equipment can to matching not into The content of component indicated by the module information of work(is analyzed, and the component indicated by the unsuccessful module information of generation matching is made For target element.As an example, electronic equipment can be carried out to the content for matching the component indicated by unsuccessful module information Analysis, it is determined that generation matches the data structure and data type needed for the component indicated by unsuccessful module information, and is utilized The data structure and data type determined, the component indicated by the unsuccessful module information of generation matching are used as target group Part.
Step 203, at least one group based on each page module at least one page module in configuration file The module information of part, is combined to target element, generates at least one page module.
In the present embodiment, based on the target element obtained in step 202, electronic equipment can be first according to configuration file The module information of at least one component of each page module at least one page module of middle record, from target element Each component for constituting each page module is obtained respectively;Then each component of each page module is combined respectively, Generate each page module.If as an example, in configuration file record by each component for constituting each page module title, Then target element can be divided into component corresponding with each page module by electronic equipment according to the title of target element first Subset;Then a pair subset of components corresponding with each page module is combined respectively, generates each page module.
Step 204, the page module information of at least one page module based on the page to be generated in configuration file is right At least one page module generated is combined, and generates the page.
In the present embodiment, based on the page module generated in step 203, electronic equipment can be first according to configuration file Page module information at least one page module of middle record, is combined at least one page module generated, Generate the page.As an example, electronic equipment can be believed according to the page module at least one page recorded in configuration file The order of breath, by each page module at least one page module generated successively from top to bottom, arranges from left to right On the page to be generated.
In some optional implementations of the present embodiment, the page module information of at least one page module can be wrapped Include layout information of at least one page module on the page to be generated;And electronic equipment can according in configuration file extremely Few layout information of the page module on the page to be generated, is laid out at least one page module generated, raw Into the page.Wherein, layout information can be the information such as viewing area of each page module on the page to be generated.As showing Example, the display region information that electronic equipment can be according to each page module on the page to be generated arranges each page module Cloth is on the viewing area corresponding with each page module on the page to be generated.
In some optional implementations of the present embodiment, the more new command in response to receiving the page, electronic equipment Can according to more new command instruction more new configuration file, wherein, more new command includes at least one of following:Add specified page Module, deletion specified page module and replacement specified page module.If as an example, more new command is addition specified page module Instruction, then electronic equipment can be first by the page module information of the specified page module and the specified page module at least The module information write-in configuration file of one component;Then believe according to the page module of the specified page module in configuration file The module information of breath and at least one component of the specified page module is combined into the specified page module;Finally by specified page Module is added in the page.
With continued reference to Fig. 3, Fig. 3 is the application scenarios for being used to generate the method for the page according to the embodiment of the present application Schematic diagram.In Fig. 3 application scenarios, server 301 is first by the module information and assembly set in configuration file 302 Module information is matched, and obtains target element 303;Then, page module of the server 301 in configuration file 302 The module information of component, is combined to target element 303, generates page module 304;Finally, server 301 is according to configuration text Page module information in part 302, is combined to the page module 304 generated, generates the page 305, and in client 306 In the case of initiating the browse request of the page 305 to server 301, the page 305 is sent to client 306.
What the embodiment of the present application was provided, which be used for, generates the method for the page by by the module information and component in configuration file Module information in set is matched, and obtains target element;Then the group of the component of the page module in configuration file Part information, is combined to target element, generates page module;Finally according to the page module information in configuration file, to institute The page module of generation is combined, and generates the page.By page module and modularization, when updating the page, only to the page The upper module or component for needing to update, which is updated, can be achieved the page after generation updates, so as to improve the effect of the generation page Rate.
With further reference to Fig. 4, it illustrates the stream of one embodiment of the method for the generation configuration file according to the application Journey 400.The flow 400 comprises the following steps:
Step 401, the content to the page to be generated is analyzed, by page division to be generated at least one page mould Block, and obtain the page module information of at least one page module.
In the present embodiment, electronic equipment (such as the server 105 shown in Fig. 1) can be first to the page to be generated Content is analyzed, so that by page division to be generated into several page modules;Then several pages being divided into are obtained The page module information of module.Wherein, one piece of content of each page module correspondence page to be generated.Page module information can be with Including but not limited to the title of page module, the mark of page module, constitute page module each component title, composition page The layout information of the mark, page module of each component of face mould block on the page to be generated etc..
Step 402, for each page module at least one page module, the content to the page module is divided Analysis, obtains the module information of at least one component of the page module.
In the present embodiment, for each page module at least one page module, electronic equipment can be to the page The content of face mould block is analyzed, and obtains the module information of at least one component of the page module.Wherein, component again can be by Referred to as web pages component, can include various conventional interface assemblies, such as form, tree, linkage combobox, can easily construct Various page modules.Under normal circumstances, page assembly can include but is not limited to tpl components, CSS components and JS components etc.. Module information can include but is not limited to the title of component, the mark of component, the title of page module belonging to component, component institute Mark of page module of category etc..
In some optional implementations of the present embodiment, electronic equipment can be at least one page module Each page module, the layout to the page module is analyzed, and obtains the module information of the template assembly of the page module;It is right The pattern of the page module is analyzed, and obtains the module information of the styling component of the page module;To the work(of the page module It can be analyzed, obtain the module information of the functional unit of the Page Template.Wherein, the layout of different page modules is general not Together, its corresponding tpl component is also differed.The pattern of different page modules is typically different, its corresponding CSS component also not phase Together.The function of different page modules is typically different, and its corresponding JS component is typically also differed.
Step 403, it is each in the page module information based at least one page module and at least one page module The module information of at least one component of page module, generates configuration file.
In the present embodiment, electronic equipment can be by the page mould of at least one page module got in step 401 The component of at least one component of each page module at least one page module got in block message and step 402 In the empty configuration file of information write-in, you can generation configuration file.
The method for the generation configuration file that the embodiment of the present application is provided by electronic equipment to the content of the page to be generated and The content for constituting each page module of the page to be generated is analyzed and automatically generates configuration file, improves generation configuration text The efficiency of part.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, it is used to generate page this application provides one kind One embodiment of the device in face, the device embodiment is corresponding with the embodiment of the method shown in Fig. 2, and the device can specifically be answered For in various electronic equipments.
As shown in figure 5, the device 500 that being used for shown in the present embodiment generates the page includes:Component matching unit 501, group Part chooses unit 502, page module generation unit 503 and page generating unit 504.Wherein, component matching unit 501, configuration For each module information in the configuration file for previously generating, by the module information and the assembly set prestored The module information of each component matched, wherein, configuration file is used at least one page mould for recording the page to be generated The module information of at least one component of each page module in the page module information and at least one page module of block;Group Part chooses unit 502, if being configured to, the match is successful, is selected from assembly set indicated by the module information that the match is successful Component is used as target element;Page module generation unit 503, is configured to based at least one page module in configuration file In each page module at least one component module information, target element is combined, at least one page is generated Module;Page generating unit 504, is configured to the page of at least one page module based on the page to be generated in configuration file Face mould block message, is combined at least one page module generated, generates the page.
In the present embodiment, in the device 500 for generating the page:Component matching unit 501, component choose unit 502, The specific processing of page module generation unit 503 and page generating unit 504 and its technique effect brought can be referred to respectively The related description of step 201, step 202, step 203 and step 204 in Fig. 2 correspondence embodiments, will not be repeated here.
In some optional implementations of the present embodiment, the device 500 for generating the page also includes:Component is generated Unit (not shown), if being configured to, matching is unsuccessful, to matching in the component indicated by unsuccessful module information Appearance is analyzed, and the component indicated by the unsuccessful module information of generation matching is used as target element.
In some optional implementations of the present embodiment, the page module information of at least one page module is included extremely Few layout information of the page module on the page to be generated;And page generating unit 504 is further configured to:According to Layout information of at least one page module on the page to be generated in configuration file, at least one page mould generated Block is laid out, and generates the page.
In some optional implementations of the present embodiment, the device 500 for generating the page also includes:Renewal of the page Unit (not shown), is configured to the more new command in response to receiving the page, updates and matches somebody with somebody according to the instruction of more new command File is put, wherein, more new command includes at least one of following:Add specified page module, delete specified page module and replacement Specified page module.
In some optional implementations of the present embodiment, the device 500 for generating the page also includes configuration file Generation unit (not shown), is configured to generate configuration file, including:Page module acquisition of information subelement is (in figure not Show), it is configured to analyze the content of the page to be generated, by page division to be generated at least one page module, And obtain the page module information of at least one page module;Module information obtains subelement (not shown), is configured to For each page module at least one page module, the content to the page module is analyzed, and obtains the page mould The module information of at least one component of block;Configuration file generates subelement (not shown), is configured to be based at least one The group of at least one component of each page module in the page module information and at least one page module of individual page module Part information, generates configuration file.
In some optional implementations of the present embodiment, module information, which obtains subelement (not shown), to be included: Template assembly data obtaining module (not shown), is configured to for each page mould at least one page module Block, the layout to the page module is analyzed, and obtains the module information of the template assembly of the page module;Styling component information Acquisition module (not shown), is configured to analyze the pattern of the page module, obtains the pattern of the page module The module information of component;Functional unit data obtaining module (not shown), is configured to enter the function of the page module Row analysis, obtains the module information of the functional unit of the Page Template.
Below with reference to Fig. 6, it illustrates suitable for the computer system 600 for the server of realizing the embodiment of the present application Structural representation.The server that Fig. 6 goes out is only an example, should not be come to the function of the embodiment of the present application and using range band Any limitation.
As Fig. 6 shows, computer system 600 includes CPU (CPU) 601, and it can be according to being stored in read-only deposit Program in reservoir (ROM) 602 is held from the program that storage part 608 is loaded into random access storage device (RAM) 603 Row various appropriate actions and processing.In RAM 603, the system that is also stored with 600 operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interfaces 605 are connected to lower component:Importation 606 including keyboard, mouse etc.;Penetrated including such as negative electrode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 608 including hard disk etc.; And the communications portion 609 of the NIC including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net performs communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc., are arranged on driver 610, in order to read from it as needed Computer program be mounted into as needed storage part 608.
Especially, in accordance with an embodiment of the present disclosure, the process described above with reference to flow chart may be implemented as computer Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being carried on computer-readable medium On computer program, the computer program include be used for execution flow chart shown in method program code.In such reality Apply in example, the computer program can be downloaded and installed by communications portion 609 from network, and/or from detachable media 611 are mounted.When the computer program is performed by CPU (CPU) 601, perform what is limited in the present processes Above-mentioned functions.
It should be noted that the above-mentioned computer-readable medium of the application can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer-readable recording medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, system, device or the device of infrared ray or semiconductor, or it is any more than combination.Meter The more specifically example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more wires, just Take formula computer disk, hard disk, random access storage device (RAM), read-only storage (ROM), erasable type and may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In this application, computer-readable recording medium can any include or store journey The tangible medium of sequence, the program can be commanded execution system, device or device and use or in connection.And at this In application, computer-readable signal media can be included in a base band or as the data-signal of carrier wave part propagation, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limit In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium beyond storage medium is read, the computer-readable medium, which can send, propagates or transmit, to be used for Used by instruction execution system, device or device or program in connection.Included on computer-readable medium Program code can be transmitted with any appropriate medium, be included but is not limited to:Wirelessly, electric wire, optical cable, RF etc., or above-mentioned Any appropriate combination.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, the part of the module, program segment or code is used comprising one or more In the executable instruction for realizing defined logic function.It should also be noted that in some realizations as replacement, being marked in square frame The function of note can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actually It can perform substantially in parallel, they can also be performed in the opposite order sometimes, this is depending on involved function.Also to note Meaning, the combination of each square frame in block diagram and/or flow chart and the square frame in block diagram and/or flow chart can be with holding The special hardware based system of function or operation as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit can also be set within a processor, for example, can be described as:A kind of processor bag Include component matching unit, component and choose unit, page module generation unit and page generating unit.Wherein, the name of these units Claim not constituting restriction to the unit in itself under certain conditions, for example, component matching unit be also described as " for Each module information in the configuration file previously generated, by each group in the module information and the assembly set prestored The unit that the module information of part is matched ".
As on the other hand, present invention also provides a kind of computer-readable medium, the computer-readable medium can be Included in server described in above-described embodiment;Can also be individualism, and without be incorporated the server in.It is above-mentioned Computer-readable medium carries one or more program, when said one or multiple programs are performed by the server, So that the server:For each module information in the configuration file that previously generates, by the module information and prestore The module information of each component in assembly set is matched, wherein, configuration file is used to record the page to be generated at least At least one component of each page module in the page module information and at least one page module of one page module Module information;If the match is successful, the component indicated by the module information that the match is successful is selected from assembly set as target Component;The component letter of at least one component based on each page module at least one page module in configuration file Breath, is combined to target element, generates at least one page module;At least one based on the page to be generated in configuration file The page module information of individual page module, is combined at least one page module generated, generates the page.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to the technology of the particular combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, is carried out by above-mentioned technical characteristic or its equivalent feature Other technical schemes formed by any combination.Such as features described above has similar work(with (but not limited to) disclosed herein The technical characteristic of energy carries out technical scheme formed by replacement mutually.

Claims (14)

1. a kind of method for generating the page, it is characterised in that methods described includes:
For each module information in the configuration file that previously generates, by the module information and the assembly set prestored The module information of each component matched, wherein, the configuration file is used at least one page for recording the page to be generated The group of at least one component of the page module information of face mould block and each page module at least one described page module Part information;
If the match is successful, the component indicated by the module information that the match is successful is selected from the assembly set as target group Part;
At least one component based on each page module at least one page module described in the configuration file Module information, is combined to the target element, generates at least one page module;
The page module information of at least one page module based on the page to be generated in the configuration file, to giving birth to Into at least one page module be combined, generate the page.
2. according to the method described in claim 1, it is characterised in that methods described also includes:
If matching is unsuccessful, the content for matching the component indicated by unsuccessful module information is analyzed, described of generation Target element is used as with the component indicated by unsuccessful module information.
3. according to the method described in claim 1, it is characterised in that the page module packet of at least one page module Include the layout information of at least one page module on the page to be generated;And
The page module information of at least one page module of the page to be generated based in the configuration file is right At least one page module generated is combined, and generates the page, including:
According to layout information of at least one page module on the page to be generated described in the configuration file, to institute At least one page module of generation is laid out, and generates the page.
4. the method according to one of claim 1-3, it is characterised in that methods described also includes:
More new command in response to receiving the page, the configuration file is updated according to the instruction of the more new command, its In, the more new command includes at least one of following:Specified page module is added, specified page module is deleted and replaces specific page Face mould block.
5. the method according to one of claim 1-3, it is characterised in that methods described also includes the step of generation configuration file Suddenly, the step of generation configuration file includes:
Content to the page to be generated is analyzed, and by the page division to be generated at least one page module, and is obtained The page module information of at least one page module;
For each page module at least one described page module, the content to the page module is analyzed, and is obtained The module information of at least one component of the page module;
Each page in page module information and at least one described page module based at least one page module The module information of at least one component of module, generates configuration file.
6. method according to claim 5, it is characterised in that described for each at least one described page module Page module, the content to the page module is analyzed, and obtains the module information of at least one component of the page module, bag Include:
For each page module at least one described page module, the layout to the page module is analyzed, and is obtained The module information of the template assembly of the page module;
The pattern of the page module is analyzed, the module information of the styling component of the page module is obtained;
Function to the page module is analyzed, and obtains the module information of the functional unit of the Page Template.
7. a kind of device for being used to generate the page, it is characterised in that described device includes:
Component matching unit, is configured to for each module information in the configuration file that previously generates, by the module information Matched with the module information of each component in the assembly set prestored, wherein, the configuration file is used to record Each page in the page module information of at least one page module of the page to be generated and at least one described page module The module information of at least one component of module;
Component chooses unit, if being configured to, the match is successful, and the module information that the match is successful is selected from the assembly set Indicated component is used as target element;
Page module generation unit, is configured to based on each at least one page module described in the configuration file The module information of at least one component of page module, is combined to the target element, generates at least one page module;
Page generating unit, is configured at least one page module based on the page to be generated in the configuration file Page module information, at least one page module generated is combined, generate the page.
8. device according to claim 7, it is characterised in that described device also includes:
Component generation element, if being configured to, matching is unsuccessful, to matching in the component indicated by unsuccessful module information Appearance is analyzed, and is generated the component indicated by the unsuccessful module information of matching and is used as target element.
9. device according to claim 7, it is characterised in that the page module packet of at least one page module Include the layout information of at least one page module on the page to be generated;And
The page generating unit is further configured to:
According to layout information of at least one page module on the page to be generated described in the configuration file, to institute At least one page module of generation is laid out, and generates the page.
10. the device according to one of claim 7-9, it is characterised in that described device also includes:
Renewal of the page unit, is configured to the more new command in response to receiving the page, according to the finger of the more new command Show the renewal configuration file, wherein, the more new command includes at least one of following:Addition specified page module, deletion refer to Determine page module and replace specified page module.
11. the device according to one of claim 7-9, it is characterised in that described device also includes configuration file and generates list Member, is configured to generate configuration file, including:
Page module acquisition of information subelement, is configured to analyze the content of the page to be generated, by the page to be generated Face is divided at least one page module, and obtains the page module information of at least one page module;
Module information obtains subelement, is configured to for each page module at least one described page module, to this The content of page module is analyzed, and obtains the module information of at least one component of the page module;
Configuration file generates subelement, be configured to page module information based at least one page module and it is described extremely The module information of at least one component of each page module in a few page module, generates configuration file.
12. device according to claim 11, it is characterised in that the module information, which obtains subelement, to be included:
Template assembly data obtaining module, is configured to for each page module at least one described page module, right The layout of the page module is analyzed, and obtains the module information of the template assembly of the page module;
Styling component data obtaining module, is configured to analyze the pattern of the page module, obtains the page module The module information of styling component;
Functional unit data obtaining module, is configured to analyze the function of the page module, obtains the Page Template The module information of functional unit.
13. a kind of server, it is characterised in that the server includes:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are by one or more of computing devices so that one or more of processors are real The existing method as described in any in claim 1-6.
14. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program The method as described in any in claim 1-6 is realized when being executed by processor.
CN201710213101.0A 2017-04-01 2017-04-01 Method and apparatus for generating the page Pending CN106980508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710213101.0A CN106980508A (en) 2017-04-01 2017-04-01 Method and apparatus for generating the page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710213101.0A CN106980508A (en) 2017-04-01 2017-04-01 Method and apparatus for generating the page

Publications (1)

Publication Number Publication Date
CN106980508A true CN106980508A (en) 2017-07-25

Family

ID=59343782

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710213101.0A Pending CN106980508A (en) 2017-04-01 2017-04-01 Method and apparatus for generating the page

Country Status (1)

Country Link
CN (1) CN106980508A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704243A (en) * 2017-10-19 2018-02-16 用友网络科技股份有限公司 Construction method and device, the computer equipment and storage medium of front-end interface
CN107908747A (en) * 2017-11-17 2018-04-13 深圳市泉眼网络科技有限公司 A kind of page generation method and device
CN108958736A (en) * 2018-07-20 2018-12-07 北京三快在线科技有限公司 Page generation method, device, electronic equipment and computer-readable medium
CN108984714A (en) * 2018-07-09 2018-12-11 北京三快在线科技有限公司 Page rendering method, apparatus, electronic equipment and computer-readable medium
CN109388396A (en) * 2018-09-18 2019-02-26 深圳壹账通智能科技有限公司 Page generation method, device, computer equipment and storage medium
CN109634658A (en) * 2018-12-17 2019-04-16 浩云科技股份有限公司 The configuration method and device of Webpage
CN110020308A (en) * 2017-12-01 2019-07-16 北京高德云图科技有限公司 The method and device of cell component load
CN110209977A (en) * 2018-02-11 2019-09-06 北京京东尚科信息技术有限公司 Method and apparatus for generating webpage
CN110543298A (en) * 2018-05-28 2019-12-06 北京京东尚科信息技术有限公司 webpage style generation method and device and webpage generation method and device
CN110633081A (en) * 2019-08-23 2019-12-31 北京浪潮数据技术有限公司 Page generation method and device
CN110865827A (en) * 2018-08-27 2020-03-06 阿里巴巴集团控股有限公司 Data updating method, device and system
CN110968309A (en) * 2019-10-15 2020-04-07 京东数字科技控股有限公司 Template generation method and device, electronic equipment and storage medium
CN111158680A (en) * 2019-12-27 2020-05-15 北京同邦卓益科技有限公司 Page construction method, device, equipment and storage medium
CN111367507A (en) * 2020-03-11 2020-07-03 上海东普信息科技有限公司 Page code generation method, device, equipment and storage medium
CN112631591A (en) * 2020-12-30 2021-04-09 深圳前海微众银行股份有限公司 Table element linkage method, device, equipment and computer readable storage medium
CN113254444A (en) * 2021-05-25 2021-08-13 四川虹魔方网络科技有限公司 Background attachment implementation method for customized television desktop component
CN113703785A (en) * 2021-08-31 2021-11-26 康键信息技术(深圳)有限公司 Component-based platform deployment method, device, equipment and storage medium
WO2023142337A1 (en) * 2022-01-28 2023-08-03 上海商汤智能科技有限公司 Experiment presentation method and apparatus, and electronic device, storage medium and program product

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7814409B2 (en) * 2005-06-27 2010-10-12 Bea Systems, Inc. System and method for configuring a document
CN102637184A (en) * 2011-02-15 2012-08-15 北京千橡网景科技发展有限公司 Method and system for customizing webpages
US20150317171A1 (en) * 2014-05-02 2015-11-05 Lexmark International, Inc. System and Methods for Loading an Application and its Modules in a Client Device
CN105095445A (en) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 Page generation method and system
US20160224323A1 (en) * 2013-10-31 2016-08-04 International Business Machines Corporation Consolidating and reusing portal information
CN106021617A (en) * 2016-07-12 2016-10-12 腾讯科技(深圳)有限公司 Page generation method and device
CN106202096A (en) * 2015-05-05 2016-12-07 阿里巴巴集团控股有限公司 Customer terminal webpage rendering intent and device
CN106406846A (en) * 2015-08-03 2017-02-15 腾讯科技(深圳)有限公司 A display interface creating method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7814409B2 (en) * 2005-06-27 2010-10-12 Bea Systems, Inc. System and method for configuring a document
CN102637184A (en) * 2011-02-15 2012-08-15 北京千橡网景科技发展有限公司 Method and system for customizing webpages
US20160224323A1 (en) * 2013-10-31 2016-08-04 International Business Machines Corporation Consolidating and reusing portal information
US20150317171A1 (en) * 2014-05-02 2015-11-05 Lexmark International, Inc. System and Methods for Loading an Application and its Modules in a Client Device
CN106202096A (en) * 2015-05-05 2016-12-07 阿里巴巴集团控股有限公司 Customer terminal webpage rendering intent and device
CN105095445A (en) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 Page generation method and system
CN106406846A (en) * 2015-08-03 2017-02-15 腾讯科技(深圳)有限公司 A display interface creating method and device
CN106021617A (en) * 2016-07-12 2016-10-12 腾讯科技(深圳)有限公司 Page generation method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHENCHUN91: "前端组件化开发", 《前端组件化开发 *

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704243B (en) * 2017-10-19 2020-12-01 用友网络科技股份有限公司 Front-end interface construction method and device, computer equipment and storage medium
CN107704243A (en) * 2017-10-19 2018-02-16 用友网络科技股份有限公司 Construction method and device, the computer equipment and storage medium of front-end interface
CN107908747A (en) * 2017-11-17 2018-04-13 深圳市泉眼网络科技有限公司 A kind of page generation method and device
CN110020308A (en) * 2017-12-01 2019-07-16 北京高德云图科技有限公司 The method and device of cell component load
CN110209977B (en) * 2018-02-11 2024-04-12 北京京东尚科信息技术有限公司 Method and device for generating webpage
CN110209977A (en) * 2018-02-11 2019-09-06 北京京东尚科信息技术有限公司 Method and apparatus for generating webpage
CN110543298A (en) * 2018-05-28 2019-12-06 北京京东尚科信息技术有限公司 webpage style generation method and device and webpage generation method and device
CN108984714A (en) * 2018-07-09 2018-12-11 北京三快在线科技有限公司 Page rendering method, apparatus, electronic equipment and computer-readable medium
CN108958736A (en) * 2018-07-20 2018-12-07 北京三快在线科技有限公司 Page generation method, device, electronic equipment and computer-readable medium
CN108958736B (en) * 2018-07-20 2022-04-15 北京三快在线科技有限公司 Page generation method and device, electronic equipment and computer readable medium
CN110865827A (en) * 2018-08-27 2020-03-06 阿里巴巴集团控股有限公司 Data updating method, device and system
CN110865827B (en) * 2018-08-27 2023-04-25 阿里巴巴集团控股有限公司 Data updating method, device and system
CN109388396A (en) * 2018-09-18 2019-02-26 深圳壹账通智能科技有限公司 Page generation method, device, computer equipment and storage medium
CN109634658A (en) * 2018-12-17 2019-04-16 浩云科技股份有限公司 The configuration method and device of Webpage
CN110633081A (en) * 2019-08-23 2019-12-31 北京浪潮数据技术有限公司 Page generation method and device
CN110968309B (en) * 2019-10-15 2021-11-12 京东数字科技控股有限公司 Template generation method and device, electronic equipment and storage medium
CN110968309A (en) * 2019-10-15 2020-04-07 京东数字科技控股有限公司 Template generation method and device, electronic equipment and storage medium
CN111158680A (en) * 2019-12-27 2020-05-15 北京同邦卓益科技有限公司 Page construction method, device, equipment and storage medium
CN111367507A (en) * 2020-03-11 2020-07-03 上海东普信息科技有限公司 Page code generation method, device, equipment and storage medium
CN112631591A (en) * 2020-12-30 2021-04-09 深圳前海微众银行股份有限公司 Table element linkage method, device, equipment and computer readable storage medium
CN112631591B (en) * 2020-12-30 2024-02-27 深圳前海微众银行股份有限公司 Method, apparatus, device and computer readable storage medium for table element linkage
CN113254444A (en) * 2021-05-25 2021-08-13 四川虹魔方网络科技有限公司 Background attachment implementation method for customized television desktop component
CN113254444B (en) * 2021-05-25 2022-11-04 四川虹魔方网络科技有限公司 Background attachment implementation method for customized television desktop component
CN113703785A (en) * 2021-08-31 2021-11-26 康键信息技术(深圳)有限公司 Component-based platform deployment method, device, equipment and storage medium
CN113703785B (en) * 2021-08-31 2023-10-31 康键信息技术(深圳)有限公司 Component-based platform deployment method, device, equipment and storage medium
WO2023142337A1 (en) * 2022-01-28 2023-08-03 上海商汤智能科技有限公司 Experiment presentation method and apparatus, and electronic device, storage medium and program product

Similar Documents

Publication Publication Date Title
CN106980508A (en) Method and apparatus for generating the page
CN107832045A (en) Across the method and apparatus of programming language interface conversion
CN107818143A (en) A kind of page configuration, generation method and device
CN104714982B (en) A kind of loading method and system of webpage
CN109840429A (en) Intelligent contract deployment, call method and device
CN107729106A (en) It is a kind of that the method and apparatus quickly redirected are realized between application component
CN107729319A (en) Method and apparatus for output information
CN109739478A (en) Front end project automated construction method, device, storage medium and electronic equipment
CN112100550A (en) Page construction method and device
CN108804327A (en) A kind of method and apparatus of automatic Data Generation Test
CN105718559B (en) Search forms pages and the method and apparatus of target pages transforming relationship
CN107301129A (en) Method and apparatus for generating test case
US9152619B2 (en) System and method for constructing markup language templates and input data structure specifications
CN110020329A (en) For generating the methods, devices and systems of webpage
CN107357914A (en) Information processing method and device
CN110297636A (en) A kind of automatic production of HTML page and parameter management method based on page configuration file, system and device
CN107066618A (en) Display methods and device after a kind of Webpage conversion
CN106919711A (en) The method and apparatus of the markup information based on artificial intelligence
CN109857388A (en) Code generating method, device, server and computer-readable medium
CN106896937A (en) Method and apparatus for being input into information
CN109981322A (en) The method and apparatus of cloud resource management based on label
CN107491382A (en) Log-output method and device
CN109033282A (en) A kind of Web page text extracting method and device based on extraction template
CN110020358A (en) Method and apparatus for generating dynamic page
CN109635223A (en) Page display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170725