Movatterモバイル変換


[0]ホーム

URL:


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

Method and apparatus for generating the page
Download PDF

Info

Publication number
CN109062563A
CN109062563ACN201810865876.0ACN201810865876ACN109062563ACN 109062563 ACN109062563 ACN 109062563ACN 201810865876 ACN201810865876 ACN 201810865876ACN 109062563 ACN109062563 ACN 109062563A
Authority
CN
China
Prior art keywords
component
page
target
value
attribute
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.)
Granted
Application number
CN201810865876.0A
Other languages
Chinese (zh)
Other versions
CN109062563B (en
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 LtdfiledCriticalBeijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810865876.0ApriorityCriticalpatent/CN109062563B/en
Publication of CN109062563ApublicationCriticalpatent/CN109062563A/en
Application grantedgrantedCritical
Publication of CN109062563BpublicationCriticalpatent/CN109062563B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请实施例公开了用于生成页面的方法和装置。该方法的一具体实施方式包括:获取用于描述目标页面的JSON格式数据,其中,该JSON格式数据包括该目标页面所包括的组件的组件类型、组件类型值、该组件类型值对应的组件的属性和属性值;根据该组件类型值,在预设的组件集合中查找组件作为目标组件,其中,该组件集合中的组件为预先进行注册的组件;根据组件类型值对应的组件的属性和属性值,更新目标组件的相应的属性和属性值;基于更新后的目标组件,生成目标页面。通过该实施例方式能够基于JSON格式数据生成页面,且该方法简化了页面生成方式。

The embodiment of the present application discloses a method and device for generating a page. A specific implementation of the method includes: obtaining JSON format data used to describe the target page, wherein the JSON format data includes the component type of the component included in the target page, the component type value, and the value of the component corresponding to the component type value Attributes and attribute values; according to the component type value, find the component in the preset component collection as the target component, wherein the components in the component collection are pre-registered components; according to the attribute and attribute of the component corresponding to the component type value value, update the corresponding attribute and attribute value of the target component; generate the target page based on the updated target component. Through this embodiment, a page can be generated based on data in JSON format, and the method simplifies the way of generating a page.

Description

Method and apparatus for generating the page
Technical field
The invention relates to field of computer technology, and in particular to the method and apparatus for generating the page.
Background technique
JSON (JavaScript Object Notation, JS object numbered musical notation) is a kind of data exchange lattice of lightweightFormula.It is based on a subset of ECMAScript (the JS specification that European Computer association formulates), is programmed using being totally independent ofThe text formatting of language stores and indicates data.Succinctly and clearly hierarchical structure makes JSON become ideal data exchangeLanguage is easy to people and reads and write, while being also easy to machine parsing.
Summary of the invention
The embodiment of the present application proposes the method and apparatus that user generates the page.
In a first aspect, the embodiment of the present application provides a kind of method for generating the page, it is used for this method comprises: receivingThe JSON formatted data of target pages is described, wherein JSON formatted data includes the component class of component included by target pagesType and component type value, component type are worth the attribute and attribute value of corresponding component;According to component type value, in preset componentComponent is searched in set as target element, wherein the component in assembly set is the component registered in advance;According to componentThe attribute and attribute value of the corresponding component of types value update the respective attributes and attribute value of target element;Based on updated meshComponent is marked, target pages are generated.
In some embodiments, it is based on updated target element, generates target pages, comprising: according to JSON format numberAccording to the routing information of securing component types value;According to routing information, the function of target element and the position in target pages are determinedIt sets, and based on identified position, generates target pages.
In some embodiments, it includes for configuring to component behavior that component type, which is worth the attribute value of corresponding component,Value.
In some embodiments, component behavior includes at least one of the following: transmission request, pop-up content, reproducting content, pageFace jumps, submission form, updates target element, closes prompting frame.
In some embodiments, the attribute value that component type is worth corresponding component includes at least one of the following: and serverThe jump address of the address and the page that are communicated.
Second aspect, the embodiment of the present application provide it is a kind of for generating the device of the page, the device include: obtain it is singleMember is configured to receive the JSON formatted data for describing target pages, wherein JSON formatted data includes target pages instituteIncluding component component type and component type value, component type be worth the attribute and attribute value of corresponding component;Searching unit,It is configured to according to component type value, component is searched in preset assembly set as target element, wherein in assembly setComponent be the component registered in advance;Updating unit, be configured to be worth according to component type corresponding component attribute andAttribute value updates the respective attributes and attribute value of target element;Page generating unit is configured to based on updated target groupPart generates target pages.
In some embodiments, page generating unit is further configured to: according to JSON formatted data, securing component classThe routing information of offset;According to routing information, the function of target element and the position in target pages are determined, and be based on instituteDetermining position generates target pages.
In some embodiments, it includes for configuring to component behavior that component type, which is worth the attribute value of corresponding component,Value.
In some embodiments, component behavior includes at least one of the following: transmission request, pop-up content, reproducting content, pageFace jumps, submission form, updates target element, closes prompting frame.
In some embodiments, the attribute value that component type is worth corresponding component includes at least one of the following: and serverThe jump address of the address and the page that are communicated.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, which includes: one or more processingDevice;Storage device, for storing one or more programs;When one or more programs are executed by one or more processors, makeObtain method of the one or more processors realization as described in implementation any in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, shouldThe method as described in implementation any in first aspect is realized when computer program is executed by processor.
Method and apparatus provided by the embodiments of the present application for generating the page, by obtaining for describing target pagesJSON formatted data, wherein the JSON formatted data includes the component type and component type of component included by target pagesValue, component type are worth the attribute and attribute value of corresponding component.In this way, according to the types value of component, it can be in preset componentComponent is searched in set as target element, wherein the component in assembly set is the component registered in advance.Basis laterComponent type is worth the attribute and attribute value of corresponding component, updates the respective attributes and attribute value of target element.Finally, based on moreTarget element after new generates target pages.So as to generate the page based on JSON formatted data, page generation side is simplifiedFormula.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is otherFeature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the application can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for generating the page of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the method for generating the page of the embodiment of the present application;
Fig. 4 is the flow chart according to another embodiment of the method for generating the page of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for generating the page of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the electronic equipment of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouchedThe 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 toConvenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phaseMutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can the method for generating the page using the embodiment of the present application or the device for generating the pageExemplary architecture 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105.Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be withIncluding various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send outSend message etc..Various client applications can be installed on terminal device 101,102,103, such as Integrated Development Environment (IDE,Integrated Development Environment) class application, web browser applications, instant messaging tools, text volumeCollect class application, the application of browser class etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hardWhen part, it can be the various electronic equipments with display screen, including but not limited to smart phone, tablet computer, e-book readingDevice, pocket computer on knee and desktop computer etc..When terminal device 101,102,103 is software, may be mounted atIn above-mentioned cited electronic equipment.Multiple softwares or software module may be implemented into (such as providing distributed clothes in itBusiness), single software or software module also may be implemented into.It is not specifically limited herein.
Server 105 can be to provide the server of various services, and for example, terminal device 101,102,103 is sent to itJSON formatted data background server.Background server can carry out JSON formatted data the processing such as analyzing, and will placeReason result (such as generating the page according to JSON formatted data) feeds back to terminal device.
It should be noted that the embodiment of the present application provided by for generate the page method can by terminal device 101,102, it 103 executes, can also be executed by server 105.Correspondingly, it can be set for generating the device of the page in terminal device101, it in 102,103, also can be set in server 105.
It should be noted that server can be hardware, it is also possible to software.When server is hardware, may be implementedAt the distributed server cluster that multiple servers form, individual server also may be implemented into.It, can when server is softwareTo be implemented as multiple softwares or software module (such as providing Distributed Services), single software or software also may be implemented intoModule.It is not specifically limited herein.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization needIt wants, can have any number of terminal device, network and server.It such as may include terminal device, network and serverEach one.Alternatively, only including terminal device without including network and server.Alternatively, only not including that terminal is set including serverStandby or network.Or including server and terminal device alternative one and network.
With continued reference to Fig. 2, the process of one embodiment of the method for generating the page according to the application is shown200.This be used for generate the page method the following steps are included:
Step 201, the JSON formatted data for describing target pages is obtained.
In the present embodiment, for generate the method for the page executing subject (such as terminal device shown in FIG. 1 101,102,103 or server 105) can obtain by various modes description target pages JSON formatted data.Such as: Yong HukeTo send one section for describing the JSON formatted data of the page to executing subject by user terminal, executing subject receives this section of JSONFormatted data;Or user directly can input one section of JSON formatted data to executing subject.Above-mentioned target pages be user according toActual demand, the page for finally needing to generate.
In the present embodiment, in general, target pages are to be formed by one or more components with certain arrangement mode.CauseThis, can be divided into one or more components according to the function of target pages.Therefore, it can use JSON formatted data to retouchComponent is stated so that target pages to be described.The JSON formatted data for describing target pages includes: included by target pagesComponent type, component type value, the component type of component are worth the attribute and attribute value of corresponding component.With following first segment JSONIllustrate for formatted data:
In above-mentioned JSON formatted data, component type is " type ", and the value of corresponding component type is " page ".Component classThere are three the attributes of the corresponding component of offset " page ", is respectively as follows: " title ", " subTitle " and " body ".And " title "Corresponding attribute value is " this is title ", and " subTitle " corresponding attribute value is " this is subtitle ", " body " corresponding categoryProperty value be " { " type ": " form " } ".
Step 202, according to component type value, component is searched in preset assembly set as target element.
In the present embodiment, component type value and the corresponding relationship of the component in preset assembly set are preset.It is rightIn each component type value, corresponding component can be found in assembly set as target element.
For example, the component in assembly set can be the component registered in advance, by the component and group after registrationThe association of part types value.Specifically, for example, the path added automatically to the node of each of JSON formatted data part types valueRegistration information and routing information are associated by information in component registration, i.e. the registration information knot that may indicate that routing informationComponent type value in tail is the component type value with the component liaison of the registration.Still it is with one section of above-mentioned JSON formatted dataExample adds its routing information in the node of " page " to the component type value in above-mentioned JSON formatted data.Correspondingly, pre-If being had registered in assembly set and the associated page component of above-mentioned routing information.Then this component type value is the node of " page "It can be identified, i.e., can realize and corresponding component is found as target element by component type value.Likewise,The node of component type value " form " adds paths information automatically, such as " page/body/0/form ", correspondingly, in description componentsIt is had registered in set and the associated form component of the routing information, the i.e. registration information of form component in the description components setShow the node that all paths are ended up with " form ", is all the node for calling the form component, in this way, in the component type valueWhen identified for the node of " form ", so that it may find form component in description components as target element.
In the present embodiment, optionally, the component in assembly set includes but is not limited to following at least one: the page(page) component, list (form) component, Text Entry (txet) component, radio box (Radios) component, button(button) component.
Step 203, the attribute and attribute value of corresponding component are worth according to component type, updates the respective attributes of target elementAnd attribute value.
Executing subject is after finding target element, according to the component type value pair in step 201 in JSON formatted dataThe attribute and attribute value for the component answered can update the respective attributes and attribute value of target element.It should be noted that target groupThe attribute and attribute value of part can characterize the attribute such as label, title, movement, interface configuration of corresponding component.Still with above-mentionedFirst segment JSON formatted data for, after executing subject finds target element page, according to the corresponding component of the componentAttribute and attribute value " " title ": " this is title ", " subTitle ": " this is subtitle ", " body ": { " type ": "Form " } " update the target element, i.e., " this is title " and " this is subtitle " can be shown in the component that such offset is pageText, and be also nested in the page component component that component type value is form.
In the present embodiment, the respective attributes of target element and attribute value are assigned to target element, there is target elementCorresponding attribute.
Step 204, it is based on updated target element, generates target pages.
In the present embodiment, by above-mentioned steps 203, the corresponding attribute of target element and attribute value are updated.Updated target element may include the attribute informations such as the label for having component, title, and it is possible to according to above-mentioned JSON formatData, the routing information of securing component types value.And routing information can reflect the location information of component.According to determining positionInformation may finally generate target pages.
Still by taking first segment JSON formatted data as an example, the path of component type value " form " is " page/body/0/Form " can reflect out form component and be located in page component.Therefore, in the target pages of generation, page component is located at bottomLayer, form component are disposed thereon.
With continued reference to the signal that Fig. 3, Fig. 3 are according to the application scenarios of the method for generating the page of the present embodimentFigure.In the application scenarios of Fig. 3, terminal device 301 first obtains the JSON formatted data for describing the page.The JSON format numberAccording to include target pages included by component component type, component type value, component type be worth corresponding component attribute andAttribute value.JSON formatted data in the terminal device 301 of Fig. 3 is identical as above-mentioned first segment JSON formatted data, the JSON latticeIn formula data, component type is " type ", and the value of corresponding component type is " page ".Corresponding group of component type value " page "There are three the attributes of part, is respectively as follows: " title ", " subTitle " and " body ".And " title " corresponding attribute value is that " this isTitle ", " subTitle " corresponding attribute value are " this is subtitle ", and " body " corresponding attribute value is " { " type ": "form"}".It again include component type in " body " corresponding attribute value for " type ", component type value is the component of " form ".Terminal device 301 can be searched in preset assembly set and component class according to component type value " page " and " form " laterOffset is " page " and " form " corresponding component as target element (page component and form component), in the assembly setComponent is the component registered in advance.Further according to the attribute and attribute of component type value " page " and " form " corresponding componentValue " " title ": " this is title ", " subTitle ": " this is subtitle ", " body ": { " type ": " form " } " updates meshMark the respective attributes and attribute value of component.Based on updated target element (page component and form component), page object is generatedFace.
The method provided by the above embodiment for generating the page of the application is obtained for describing target pages firstJSON formatted data, above-mentioned JSON formatted data include the type of component included by target pages, component type value, component classThe attribute and attribute value of the component of the corresponding component of offset.Then it according to said modules types value, is looked into description components setLook for component as target element, the component in said modules set is the component registered in advance.Further according to said modules classThe attribute and attribute value of the corresponding component of offset update the respective attributes and attribute value of target element.Finally, being based on above-mentioned updateTarget element afterwards generates target pages.Mode can generate the page, and letter based on JSON formatted data through the foregoing embodimentPage generating mode is changed.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for generating the page.The useIn the process 400 for the method for generating the page, comprising the following steps:
Step 401, the JSON formatted data for describing target pages is obtained.
In the present embodiment, for generate the method for the page executing subject (such as terminal device shown in FIG. 1 101,102,103 or server 105) can obtain by various modes description target pages JSON formatted data.
In the present embodiment, in general, target pages are to be formed by one or more components with certain arrangement mode.CauseThis, can be divided into one or more components according to the function of target pages.Therefore, it can use JSON formatted dataComponent is described so that target pages to be described.The JSON formatted data for describing target pages includes included by target pagesComponent type, component type value, the component type of component are worth the attribute and attribute value of corresponding component.
In the present embodiment, optionally, the attribute value of the corresponding component of said modules types value may include for groupThe value that part behavior is configured.Specific component behavior may include at least one of following: send request, pop-up content, duplicationContent, submission form, updates target element, closes prompting frame page jump.That is, said modules types value is correspondingThe attribute value of component can be the value to component progress said modules behavior configuration.Such as: " actionType ": " copy ", "Content ": " contents value " } for the attribute value of a certain component, the component behavior for specially carrying out reproducting content to component is matchedThe attribute value set.Optionally, the attribute value of the corresponding component of said modules types value can also be included at least one of the following: and be takenThe address and page jump address that business device is communicated.Illustrate by taking following second segment JSON formatted datas as an example:
Attribute value is the code of " put:/api/customer " in this section of JSON formatted data, to be to component type valueThe address that the component of " form " is communicated with server.
Step 402, according to component type value, component is searched in preset assembly set as target element.
The specific processing of the step 402 and its brought technical effect can be with reference to the steps in the corresponding embodiment of Fig. 2Rapid 202, details are not described herein.
Step 403, the attribute and attribute value of corresponding component are worth according to component type, updates the respective attributes of target elementAnd attribute value.
Executing subject is after finding target element, according to the component type value pair in step 401 in JSON formatted dataThe attribute and attribute value for the component answered can update the respective attributes and attribute value of target element.It is understood that target groupThe attribute and attribute value of part can characterize the attribute such as label, title, movement, interface configuration of corresponding component.Still with above-mentionedFirst segment JSON formatted data for, after executing subject finds target element page, according to the corresponding component of the componentAttribute and attribute value " " title ": " this is title ", " subTitle ": " this is subtitle ", " body ": { " type ": "Form " } " have updated the target element." this is title " can be shown in the component that i.e. such offset is page and " this is secondary markThe text of topic ", and the component that component type value is form is also nested in the page component.With above-mentioned second segment JSONFor formatted data, after executing subject finds the component that component type value is " form ", according to the corresponding component category of the componentProperty and attribute value " " api ": " put:/api/customer " " have updated the attribute and attribute value of the form component, as shouldForm component Configuration one address for being communicated with server can specifically pass through application call interface apiIt is communicated with server.
In the present embodiment, the respective attributes of target element and attribute value are assigned to target element, have target elementThere is corresponding attribute.
Step 404, according to JSON formatted data, the routing information of securing component types value.
Executing subject can be according to above-mentioned JSON formatted data, the routing information of securing component types value.It is understood thatIt is that JSON formatted data itself can pass through component type value place in JSON formatted data there are multiple with identified nodeNode, the available routing information to corresponding assembly types value.For example, in first segment JSON formatted data, component classOffset " form " belongs to the part attribute value for the component that component type value is " page ", and the path of corresponding node is " page/body/0/form”。
Step 405, according to routing information, the function of target element and the position in target pages are determined, and is based onIdentified position generates target pages.
The routing information obtained by step 404, the relative positional relationship of available component.Still with first segment JSON latticeFormula data instance, node where component type value " page " are root node, and path is " page ".Therefore, corresponding componentPositioned at the bottom of target pages.And the path of component type value " form " is " page/body/0/form ", is believed by the pathBreath is it is found that form component is located in page component.That is, page component, which is equivalent to one, has the function for accommodating other assembliesThe container assemblies of energy, and the path just reflects the positional relationship of form component Yu page component.I.e. in target pages, formComponent is located in page component.
In the present embodiment, the component that executing subject is called all is packaged component, and component has been defined and is propped upThe component behavior held, and these encapsulation process are the well-known techniques studied and applied extensively at present, details are not described herein.
Based on the component behavior that component is supported, the configuration of component behavior can be carried out to component.Such as JSON formatted dataIn component type to be worth the attribute value of corresponding component may include the value configured to component behavior.By the attribute value assignmentTo corresponding target element, then the component in target pages generated can complete corresponding row during page operationFor.But even component type is worth identical component, in the attribute that different component types is worth corresponding component, functionIt can be not necessarily identical.By taking types value is the component of " text " as an example, being located in form component then has the function of input frame, and works asIt is located at outside form component, then has the function of textual presentation.It should be noted that these functions carry out in registration process in componentIt is associated with routing information, defines the corresponding function of component of different routing informations.Therefore, passage path information can be trueSet the goal the function of component.
Pass through the step, it is determined that the function of target element and the position in target pages, in the target pages of generationComponent be also provided with corresponding function.
Figure 4, it is seen that the method for generating the page compared with the corresponding embodiment of Fig. 2, in the present embodimentProcess 400 highlight based on target element generate target pages process.The scheme of the present embodiment description can be based on as a result,JSON formatted data generates the page, and the component property value in JSON formatted data is assigned to corresponding target element, and rootAccording to the routing information of JSON formatted data securing component types value, the function of target element and the position in target pages are determinedIt sets, simplifies page generating mode, and the target element in the page generated is the component with corresponding function.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides for generating the pageOne embodiment of device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied toIn various electronic equipments.
As shown in figure 5, the device 500 provided in this embodiment for generating the page includes acquiring unit 501, searching unit502, updating unit 503 and page generating unit 504.Wherein, acquiring unit 501 are configured to obtain for describing page objectThe JSON formatted data in face, wherein JSON formatted data includes the component type and component class of component included by target pagesOffset, component type are worth the attribute and attribute value of corresponding component;Searching unit 502, is configured to according to component type value,Component is searched in preset assembly set as target element, wherein the component in assembly set is the group registered in advancePart;Updating unit 503 is configured to be worth according to component type the attribute and attribute value of corresponding component, updates target elementRespective attributes and attribute value;Page generating unit 504 is configured to generate target pages based on updated target element.
In the present embodiment, in the device 500 for generating the page: acquiring unit 501, searching unit 502, updating unit503 and page generating unit 504 specific processing and its brought technical effect can be respectively with reference in Fig. 2 corresponding embodimentStep 201, step 202, the related description of step 203 and step 204, details are not described herein.
In some optional implementations of the present embodiment, above-mentioned page generating unit is further configured to basisJSON formatted data, the routing information of securing component types value;According to routing information, the function of target element is determined and in targetPosition in the page, and based on identified position, generate target pages.
In some optional implementations of the present embodiment, the attribute value that component type is worth corresponding component includes being used forThe value that component behavior is configured.
In some optional implementations of the present embodiment, component behavior includes at least one of the following: transmission request, bulletContent, reproducting content, page jump, submission form, update target element, closing prompting frame out.
In some optional implementations of the present embodiment, the attribute value that component type is worth corresponding component includes followingAt least one of: the jump address of the address and the page that are communicated with server.
The device provided by the above embodiment of the application, firstly, being obtained by acquiring unit 501 for describing target pagesJSON formatted data, the JSON formatted data include component included by target pages component type and component type value,Component type is worth the attribute and attribute value of corresponding component.Again by searching for unit 502 according to component type value, at preset groupComponent is searched in part set as target element, the component in the assembly set is the component registered in advance.Pass through laterUpdating unit 503 is worth the attribute and attribute value of corresponding component according to component type, updates the respective attributes and category of target elementProperty value.It is based on updated target element finally by page generating unit 504, generates target pages.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the electronic equipment for being suitable for being used to realize the embodiment of the present applicationStructural schematic diagram.Electronic equipment shown in Fig. 6 is only an example, function to the embodiment of the present application and should not use modelShroud carrys out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored inProgram in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 andExecute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and 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 alwaysLine 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathodeThe output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.;And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as becauseThe network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such asDisk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereonComputer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart descriptionSoftware program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable mediumOn computer program, which includes the program code for method shown in execution flow chart.In such realityIt applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processesAbove-mentioned function.
It should be noted that the computer-readable medium of the application can be computer-readable signal media or computerReadable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but it is unlimitedIn system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculatesThe more specific example of machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, portable of one or more conducting wiresFormula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory(EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device orThe above-mentioned any appropriate combination of person.In this application, computer readable storage medium can be it is any include or storage programTangible medium, which can be commanded execution system, device or device use or in connection.And in this ShenPlease in, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited toElectromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readableAny computer-readable medium other than storage medium, the computer-readable medium can send, propagate or transmit for byInstruction execution system, device or device use or program in connection.The journey for including on computer-readable mediumSequence code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentionedAny appropriate combination.
The calculating of the operation for executing the application can be write with one or more programming languages or combinations thereofMachine program code, the programming language include object-oriented programming language-such as Java, Smalltalk, C++,It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be withIt fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portionDivide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.?Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) orWide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet serviceIt is connected for quotient by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journeyThe architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generationA part of one module, program segment or code of table, a part of the module, program segment or code include one or more useThe executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in boxThe function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actuallyIt can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuseMeaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holdingThe dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instructionCombination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hardThe mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor, packetInclude acquiring unit, searching unit, updating unit, page generating unit.Wherein, the title of these units is not under certain conditionsThe restriction to the unit itself is constituted, for example, acquiring unit is also described as " unit that JSON formatted data obtains ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can beIncluded in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculatingMachine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that shouldDevice: the JSON formatted data for describing target pages is obtained, wherein JSON formatted data includes included by target pagesComponent type, component type value, the component type of component are worth the attribute and attribute value of corresponding component;According to component type value,Component is searched in preset assembly set as target element, wherein the component in assembly set is registered in advanceComponent;It is worth the attribute and attribute value of corresponding component according to component type, updates the respective attributes and attribute value of target element;BaseIn updated target element, target pages are generated.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the artMember is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristicScheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent featureAny combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed hereinCan technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

Translated fromChinese
1.一种用于生成页面的方法,包括:1. A method for generating a page comprising:获取用于描述目标页面的JSON格式数据,其中,所述JSON格式数据包括所述目标页面所包括的组件的组件类型、组件类型值、所述组件类型值对应的组件的属性和属性值;Obtaining data in JSON format for describing the target page, wherein the JSON format data includes the component type, component type value, attribute and attribute value of the component corresponding to the component type value included in the target page;根据所述组件类型值,在预设的组件集合中查找组件作为目标组件,其中,所述组件集合中的组件为预先进行注册的组件;According to the component type value, search for a component in a preset component set as a target component, wherein the components in the component set are pre-registered components;根据所述组件类型值对应的组件的属性和属性值,更新所述目标组件的相应属性和属性值;updating the corresponding attributes and attribute values of the target component according to the attributes and attribute values of the component corresponding to the component type value;基于更新后的目标组件,生成目标页面。Based on the updated target component, a target page is generated.2.根据权利要求1所述的方法,其中,所述基于更新后的目标组件,生成目标页面,包括:2. The method according to claim 1, wherein said generating a target page based on the updated target component comprises:根据所述JSON格式数据,获取组件类型值的路径信息;According to the JSON format data, obtain the path information of the component type value;根据所述路径信息,确定所述目标组件的功能和在目标页面中的位置,以及基于所确定的位置,生成目标页面。According to the path information, the function of the target component and the position on the target page are determined, and based on the determined position, a target page is generated.3.根据权利要求1所述的方法,其中,所述组件类型值对应的组件的属性值包括用于对组件行为进行配置的值。3. The method according to claim 1, wherein the attribute value of the component corresponding to the component type value includes a value for configuring the behavior of the component.4.根据权利要求3所述的方法,其中,所述组件行为包括以下至少一项:发送请求、弹出内容、复制内容、页面跳转、提交表单、更新目标组件、关闭提示框。4. The method according to claim 3, wherein the component behavior includes at least one of the following: sending a request, popping up content, copying content, page jump, submitting a form, updating a target component, and closing a prompt box.5.根据权利要求1-4之一所述的方法,其中,所述组件类型值对应的组件的属性值包括以下至少一项:与服务器进行通信的地址和页面的跳转地址。5. The method according to any one of claims 1-4, wherein the attribute value of the component corresponding to the component type value includes at least one of the following: an address for communicating with the server and a jump address of the page.6.一种用于生成页面的装置,包括:6. An apparatus for generating a page, comprising:获取单元,被配置成获取用于描述目标页面的JSON格式数据,其中,所述JSON格式数据包括所述目标页面所包括的组件的组件类型和组件类型值、所述组件类型值对应的组件的属性和属性值;An acquisition unit configured to acquire JSON format data used to describe the target page, wherein the JSON format data includes the component type and component type value of the component included in the target page, and the component type value corresponding to the component type value attributes and attribute values;查找单元,被配置成根据所述组件类型值,在预设的组件集合中查找组件作为目标组件,其中,所述组件集合中的组件为预先进行注册的组件;The search unit is configured to search for a component in a preset component set as a target component according to the component type value, wherein the components in the component set are pre-registered components;更新单元,被配置成根据所述组件类型值对应的组件的属性和属性值,更新所述目标组件的相应属性和属性值;An updating unit configured to update the corresponding attributes and attribute values of the target component according to the attributes and attribute values of the component corresponding to the component type value;页面生成单元,被配置成基于更新后的目标组件,生成目标页面。The page generation unit is configured to generate a target page based on the updated target component.7.根据权利要求6所述的装置,其中,所述页面生成单元进一步被配置成:7. The apparatus according to claim 6, wherein the page generating unit is further configured to:根据所述JSON格式数据,获取组件类型值的路径信息;According to the JSON format data, obtain the path information of the component type value;根据所述路径信息,确定所述目标组件的功能和在目标页面中的位置,以及基于所确定的位置,生成目标页面。According to the path information, the function of the target component and the position on the target page are determined, and based on the determined position, a target page is generated.8.根据权利要求6所述的装置,其中,所述组件类型值对应的组件的属性值包括用于对组件行为进行配置的值。8. The apparatus according to claim 6, wherein the attribute value of the component corresponding to the component type value includes a value for configuring the behavior of the component.9.根据权利要求8所述的装置,其中,所述组件行为包括以下至少一项:发送请求、弹出内容、复制内容、页面跳转、提交表单、更新目标组件、关闭提示框。9. The device according to claim 8, wherein the component behavior includes at least one of the following: sending a request, popping up content, copying content, page jump, submitting a form, updating a target component, and closing a prompt box.10.根据权利要求6-9之一所述的用于生成页面的装置,其中,所述组件类型值对应的组件的属性值包括以下至少一项:与服务器进行通信的地址和页面的跳转地址。10. The device for generating a page according to any one of claims 6-9, wherein the attribute value of the component corresponding to the component type value includes at least one of the following: an address for communicating with the server and a page jump address.11.一种电子设备,包括:11. An electronic device comprising:一个或多个处理器;one or more processors;存储装置,其上存储有一个或多个程序,a storage device on which one or more programs are stored,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-5中任一所述的方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to implement the method according to any one of claims 1-5.12.一种计算机可读介质,其上存储有计算机程序,其中,该计算机程序被处理器执行时实现如权利要求1-5中任一所述的方法。12. A computer-readable medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the method according to any one of claims 1-5 is realized.
CN201810865876.0A2018-08-012018-08-01Method and device for generating pageActiveCN109062563B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201810865876.0ACN109062563B (en)2018-08-012018-08-01Method and device for generating page

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201810865876.0ACN109062563B (en)2018-08-012018-08-01Method and device for generating page

Publications (2)

Publication NumberPublication Date
CN109062563Atrue CN109062563A (en)2018-12-21
CN109062563B CN109062563B (en)2022-06-07

Family

ID=64832462

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201810865876.0AActiveCN109062563B (en)2018-08-012018-08-01Method and device for generating page

Country Status (1)

CountryLink
CN (1)CN109062563B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109683939A (en)*2018-12-292019-04-26北京小米移动软件有限公司Component object update method, device and storage medium
CN109814865A (en)*2019-01-182019-05-28四川长虹电器股份有限公司A kind of mobile application page generation method based on json data format
CN110275754A (en)*2019-06-282019-09-24百度在线网络技术(北京)有限公司Exchange method, device, equipment and the storage medium presented for user interface
CN110780898A (en)*2019-10-082020-02-11北京字节跳动网络技术有限公司Page data upgrading method and device and electronic equipment
CN110825374A (en)*2019-11-042020-02-21泰康保险集团股份有限公司Page generation method and device based on component, electronic equipment and storage medium
CN111708536A (en)*2020-06-182020-09-25深圳前海微众银行股份有限公司 Method, device and readable storage medium for page building based on component configuration
CN111831263A (en)*2020-07-202020-10-27北京字节跳动网络技术有限公司Data processing method and device, electronic equipment and computer readable medium
CN112214218A (en)*2020-10-122021-01-12上海赛可出行科技服务有限公司High-performance and high-efficiency Sketch component library generation and management scheme and system
CN112433725A (en)*2020-11-262021-03-02泰康保险集团股份有限公司Interface generation method and device, electronic equipment and storage medium
CN113672304A (en)*2021-08-262021-11-19北京光启元数字科技有限公司Dynamic data acquisition method, device, equipment and readable medium
CN113760275A (en)*2020-09-162021-12-07北京京东尚科信息技术有限公司 A method and apparatus for generating a page
CN113868092A (en)*2021-10-112021-12-31维沃移动通信有限公司 Application determination method, application determination apparatus, electronic device and readable storage medium
CN114089982A (en)*2020-11-032022-02-25西安京迅递供应链科技有限公司Front-end page generation method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20150074561A1 (en)*2010-05-072015-03-12Google Inc.Customizable themes for browsers and web content
CN106294816A (en)*2016-08-162017-01-04腾讯科技(深圳)有限公司The treating method and apparatus of page info

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20150074561A1 (en)*2010-05-072015-03-12Google Inc.Customizable themes for browsers and web content
CN106294816A (en)*2016-08-162017-01-04腾讯科技(深圳)有限公司The treating method and apparatus of page info

Cited By (16)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109683939A (en)*2018-12-292019-04-26北京小米移动软件有限公司Component object update method, device and storage medium
CN109814865A (en)*2019-01-182019-05-28四川长虹电器股份有限公司A kind of mobile application page generation method based on json data format
CN110275754A (en)*2019-06-282019-09-24百度在线网络技术(北京)有限公司Exchange method, device, equipment and the storage medium presented for user interface
CN110780898A (en)*2019-10-082020-02-11北京字节跳动网络技术有限公司Page data upgrading method and device and electronic equipment
CN110825374A (en)*2019-11-042020-02-21泰康保险集团股份有限公司Page generation method and device based on component, electronic equipment and storage medium
CN111708536A (en)*2020-06-182020-09-25深圳前海微众银行股份有限公司 Method, device and readable storage medium for page building based on component configuration
CN111831263A (en)*2020-07-202020-10-27北京字节跳动网络技术有限公司Data processing method and device, electronic equipment and computer readable medium
CN111831263B (en)*2020-07-202023-04-25抖音视界有限公司Method, apparatus, electronic device and computer readable medium for data processing
CN113760275A (en)*2020-09-162021-12-07北京京东尚科信息技术有限公司 A method and apparatus for generating a page
CN112214218A (en)*2020-10-122021-01-12上海赛可出行科技服务有限公司High-performance and high-efficiency Sketch component library generation and management scheme and system
CN112214218B (en)*2020-10-122024-06-14上海赛可出行科技服务有限公司Sketch component library generation and management system
CN114089982A (en)*2020-11-032022-02-25西安京迅递供应链科技有限公司Front-end page generation method, device, equipment and medium
CN112433725A (en)*2020-11-262021-03-02泰康保险集团股份有限公司Interface generation method and device, electronic equipment and storage medium
CN113672304A (en)*2021-08-262021-11-19北京光启元数字科技有限公司Dynamic data acquisition method, device, equipment and readable medium
CN113868092A (en)*2021-10-112021-12-31维沃移动通信有限公司 Application determination method, application determination apparatus, electronic device and readable storage medium
CN113868092B (en)*2021-10-112024-06-21维沃移动通信有限公司Application determination method, application determination device, electronic device, and readable storage medium

Also Published As

Publication numberPublication date
CN109062563B (en)2022-06-07

Similar Documents

PublicationPublication DateTitle
CN109062563A (en)Method and apparatus for generating the page
CN109634598A (en)A kind of page display method, device, equipment and storage medium
CN107357914B (en)Information processing method and device
CN108614774A (en)Automated testing method and device
CN109325213A (en) Method and apparatus for labeling data
CN109446099A (en)Automatic test cases generation method, device, medium and electronic equipment
CN109522483A (en)Method and apparatus for pushed information
CN107729106A (en)It is a kind of that the method and apparatus quickly redirected are realized between application component
CN108962244A (en)Method and apparatus for sending information
CN109271403A (en)A kind of operating method of data query, device, medium and electronic equipment
CN109271556A (en)Method and apparatus for output information
CN109815105A (en)Applied program testing method and device based on Btrace
CN108494860A (en)WEB accesses system, WEB access methods and device for client
CN109447635A (en)Information storage means and device for block chain
CN110109983A (en)A kind of method and apparatus operating Redis database
CN109145014A (en)The method and apparatus for generating elastic searching request
CN108959294A (en)A kind of method and apparatus accessing search engine
CN110020358A (en)Method and apparatus for generating dynamic page
CN109271557A (en)Method and apparatus for output information
CN109359281A (en)Dynamic list generation method and device
CN109460652A (en)For marking the method, equipment and computer-readable medium of image pattern
CN109408748A (en)Method and apparatus for handling information
CN109062560A (en)Method and apparatus for generating information
CN110232920A (en)Method of speech processing and device
CN110070394A (en)Data processing method, system, medium and calculating equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp