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

Method and apparatus for generating the page Download PDF

Info

Publication number
CN110413920A
CN110413920A CN201810380514.2A CN201810380514A CN110413920A CN 110413920 A CN110413920 A CN 110413920A CN 201810380514 A CN201810380514 A CN 201810380514A CN 110413920 A CN110413920 A CN 110413920A
Authority
CN
China
Prior art keywords
view
model
data
model object
page
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
CN201810380514.2A
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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810380514.2A priority Critical patent/CN110413920A/en
Publication of CN110413920A publication Critical patent/CN110413920A/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

Abstract

The embodiment of the present application discloses the method and apparatus for generating the page.One specific embodiment of the above method includes: reception and the data that analysis service end is sent, and data include view object mark and data to be displayed;According to view object mark, preset first map listing and data to be displayed, model object is created, wherein the first map listing includes that view object mark and view object identify corresponding model object mark, model object title;According to the model object and preset second map listing created, view object is created, wherein the second map listing includes that model object mark and model object identify corresponding view object title;The view object created is laid out, the page is generated.This embodiment improves the formation speed of the page, Caton phenomenon when generating the page or refresh page is avoided.

Description

Method and apparatus for generating the page
Technical field
The invention relates to Internet technical fields, more particularly, to generate the method and apparatus of the page.
Background technique
Currently, page development generally uses setting for MVC (Model-View-Controller, model-view-controller) Meter mode, M refer to that data model, V refer to user interface, and C refers to controller.It the use of MVC is by data model and user interface Code dehind is realized, to make the same program that the different forms of expression can be used.For example a collection of statistical data can be distinguished It is indicated with histogram and cake chart.Purpose existing for controller is then to ensure that data model is synchronous with user interface, once Data model changes, and user interface should synchronized update.
Summary of the invention
The embodiment of the present application proposes the method and apparatus for generating the page.
In a first aspect, the embodiment of the present application provides a kind of method for generating the page, comprising: receive and parsing takes The data that business end is sent, above-mentioned data include view object mark and data to be displayed;According to above-mentioned view object mark, in advance If the first map listing and above-mentioned data to be displayed, create model object, wherein above-mentioned first map listing includes view Object identity and view object identify corresponding model object mark, model object title;According to the model object created And preset second map listing, create view object, wherein above-mentioned second map listing include model object mark and Model object identifies corresponding view object title;The view object created is laid out, the page is generated.
In some embodiments, above-mentioned according to view object mark, preset first map listing and above-mentioned to be shown Data create model object, comprising: according to preset first map listing, determine model pair corresponding with view object mark As mark and model object title;According to identified model object title, preset object generating function, generation pair are called As;Identified model object is identified and above-mentioned data to be displayed is encapsulated in object generated, obtains model object.
In some embodiments, above-mentioned according to the model object created and preset second map listing, creation view Figure object, comprising: the created model object of parsing obtains model object mark;According to above-mentioned second map listing, solution is determined It analyses obtained model object and identifies corresponding view object title;According to identified view object title, it is preset right to call As generating function, view object is generated.
In some embodiments, before the data that above-mentioned reception and analysis service end return, the above method further include: In response to detecting that the page of user's triggering generates operation, data acquisition request is sent to server-side.
In some embodiments, the above method further include: in response to detecting the view handover operation of user's triggering, call Layout function corresponding with above-mentioned view handover operation is to change the layout of created view object;According to the view created Layout after object change, obtains the page of switch view.
Second aspect, the embodiment of the present application provide a kind of for generating the device of the page, comprising: data receipt unit, The data received and analysis service end is sent are configured to, above-mentioned data include view object mark and data to be displayed; Model object creating unit is configured to be identified according to above-mentioned view object, preset first map listing and above-mentioned to aobvious Registration evidence creates model object, wherein above-mentioned first map listing includes that view object mark and view object mark correspond to Model object mark, model object title;View object creating unit, be configured to according to the model object created and Preset second map listing creates view object, wherein above-mentioned second map listing includes model object mark and model The corresponding view object title of object identity;Page generating unit is configured to be laid out the view object created, raw At the page.
In some embodiments, above-mentioned model object creating unit is further configured to: according to preset first mapping List determines model object mark corresponding with view object mark and model object title;According to identified model pair As title, preset object generating function is called, generates object;Identified model object is identified and above-mentioned number to be shown According to being encapsulated in object generated, model object is obtained.
In some embodiments, above-mentioned view object creating unit is further configured to: the created model pair of parsing As obtaining model object mark;According to above-mentioned second map listing, determine that the model object that parsing obtains identifies corresponding view Object oriented;According to identified view object title, preset object generating function is called, generates view object.
In some embodiments, above-mentioned apparatus further include: request transmitting unit is configured in above-mentioned data receipt unit Before the data that reception and analysis service end return, in response to detecting that the page of user's triggering generates operation, to server-side Send data acquisition request.
In some embodiments, above-mentioned apparatus further includes view switch unit, is configured to: in response to detecting that user touches The view handover operation of hair calls layout function corresponding with above-mentioned view handover operation to change created view object Layout;According to the layout after the view object change created, the page of switch view is obtained.
The third aspect, the embodiment of the present application provide a kind of terminal, comprising: one or more processors;Storage device is used In storing one or more programs, when said one or multiple programs are executed by said one or multiple processors, so that above-mentioned One or more processors realize method described in any of the above-described embodiment.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should Method described in any of the above-described embodiment is realized when program is executed by processor.
The method and apparatus provided by the above embodiment for generating the page of the application, receive and parse through server-side first The data of transmission, above-mentioned data include view object mark and data to be displayed, are then identified according to above-mentioned view object, is pre- If the first map listing and above-mentioned data to be displayed, create model object, then according to the model object created and Preset second map listing creates view object, is finally laid out to the view object created, generates the page.This reality The method and apparatus for applying example can generate view according to the data of update when the data that server-side is sent are the data updated Then object generates the new page according to view object generated, to improve the formation speed of the page, avoid generation The Caton phenomenon when page or refresh page.
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 other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures 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 application;
Fig. 4 is the structural schematic diagram according to one embodiment of the device for generating the page of the application;
Fig. 5 is adapted for the structural schematic diagram for the computer system for realizing the terminal device 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 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 Convenient 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 phase Mutually 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 be using the method for generating the page of the application or the implementation of the device for generating the page The exemplary system architecture 100 of example.
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 with Including 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 out Send data etc..Various telecommunication customer end applications can be installed, such as web browser is answered on terminal device 101,102,103 With, shopping class application, searching class application, instant messaging tools, mailbox client, social platform software etc..
101,102,103 hardware of terminal device, is also possible to software.It, can when terminal device 101,102,103 is hardware To be the various electronic equipments with display screen and supported web page browsing, including but not limited to smart phone, tablet computer, electricity (Moving Picture Experts Group Audio Layer III, dynamic image are special for philosophical works reader, MP3 player Family's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image Expert's compression standard audio level 4) player, pocket computer on knee and desktop computer etc..When terminal device 101, 102,103 when being software, may be mounted in above-mentioned cited electronic equipment.Multiple softwares or software mould may be implemented into it Block (such as providing Distributed Services), also may be implemented into single software or software module.It is not specifically limited herein.
Server 105 can be to provide the server of various services, such as to showing on terminal device 101,102,103 Webpage provides the backstage web page server supported.Backstage web page server can to the data such as the data acquisition request received into The processing such as row analysis, and processing result (such as data to be displayed and view object identify) is fed back into terminal device.
It should be noted that provided by the embodiment of the present application for generate the method for the page generally by terminal device 101, 102, it 103 executes, correspondingly, the device for generating the page is generally positioned in terminal device 101,102,103.
It should be noted that server can be hardware, it is also possible to software.When server is hardware, may be implemented At the distributed server cluster that multiple servers form, individual server also may be implemented into.It, can when server is software To be implemented as multiple softwares or software module (such as providing Distributed Services), single software or software also may be implemented into Module.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 need It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, it illustrates the processes according to one embodiment of the method for generating the page of the application 200.The method for generating the page of the present embodiment, comprising the following steps:
Step 201, the data that reception and analysis service end are sent.
In the present embodiment, the method for generating the page runs executing subject (such as terminal shown in FIG. 1 thereon Equipment) data can be received from server-side by wired connection mode or radio connection.Executing subject can service The data stored in end receive above-mentioned data when updating, can also receive after sending request of data to server-side State data.Executing subject can parse above-mentioned data after the data for receiving server-side transmission.
In this design pattern of MVC, by creation model object come the number of package application program in model (Model) According to the data of application program are shown in view (View) by creation view object, pass through control in controller (Controller) Device object processed serves as the medium of model object and view object, for example, view object, which passes through controller object, understands model pair The change of elephant.Model is responsible for interacting with server-side, to access data in server-side.In the present embodiment, above-mentioned data may include View object mark and data to be displayed.View object mark is the mark for the view object that view (View) is created, on Stating mark can be number or character string.Above-mentioned data to be displayed is the data in application program, for example, above-mentioned number to be shown It according to the contact information that can be address book weight, or is the merchandise news in application program.In some implementations, above-mentioned It may include view object identification list in data from server-side, include multiple views pair in the view object identification list As mark.
It should be pointed out that above-mentioned radio connection can include but is not limited to 3G/4G connection, WiFi connection, bluetooth Connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection and other currently known or exploitations in the future Radio connection.
Step 202, according to view object mark, preset first map listing and data to be displayed, model pair is created As.
Executing subject can identify, preset first mapping is arranged after obtaining above-mentioned data according to above-mentioned view object Table and above-mentioned data to be displayed create model object.It include view object mark and view in above-mentioned first map listing The corresponding model object mark of object identity, model object title.Model object mark is the mould that model (Model) is created The identification information of type object, model object title are the title of above-mentioned model object.
In the present embodiment, the corresponding model object mark of a view object mark, while a corresponding model object Title.Model object mark can be identical as view object mark, for example, model object mark and view object mark all use number Word indicates, and model object ident value is equal with view object ident value.Model object mark can be identified with view object Not identical, for example, model object is identified as A11, corresponding view object is identified as B12.Model object title can be with character String is to indicate.Executing subject can create object according to preset template and model object title, then will be identified Model object mark and data to be displayed are encapsulated in created object, obtain model object.
It is understood that when in the data from server-side including multiple view identifications, correspondingly, executing subject meeting Create multiple model objects.
In some optional implementations of the present embodiment, above-mentioned steps 202 specifically can be by unshowned in Fig. 2 Following steps are realized: firstly, determining model object mark corresponding with view object mark according to preset first map listing Knowledge and model object title.Then, according to identified model object title, preset object generating function is called, is generated Object.Finally, identified model object is identified and data to be displayed is encapsulated in object generated, model pair is obtained As.
In this implementation, executing subject can search view object mark in above-mentioned first map listing first, so Determine that view object identifies corresponding model object mark and model object title afterwards.Then according to identified model object name Claim, call preset object generating function, generates object.Above-mentioned object generating function can be NSClassFormString, should Function is in iOS system for creating the function of class and object.By calling the function, executing subject can be according to model object Title creates an object.Then by identified model object identify and above-mentioned data to be displayed be encapsulated in it is generated right As in, model object is obtained.
It should be noted that the object created can be added when the model object of executing subject creation has multiple Array obtains model object array.
Step 203, according to the model object and preset second map listing created, view object is created.
After creating model object, executing subject can create view object in conjunction with preset second map listing.On State in the second map listing may include that model object mark and model object identify corresponding view object title.For example, It may include multiple key-value pairs (key-value) in above-mentioned second map listing, key value indicates model object mark, value value It can be view object title.Executing subject can identify after creating model object according to the model object in model object And above-mentioned second map listing, it determines view object title, then creates view object.
In some optional implementations of the present embodiment, above-mentioned steps 203 specifically can be by unshowned in Fig. 2 Following steps are realized: firstly, the model object that parsing is created, obtains model object mark.Then, it is arranged according to the second mapping Table determines that the model object that parsing obtains identifies corresponding view object title.Finally, according to identified view object name Claim, call preset object generating function, generates view object.
In this implementation, executing subject can parse created model object first, obtain model object mark.So Afterwards according to the second map listing, determine that above-mentioned model object identifies corresponding view object title.Finally according to above-mentioned view pair As title, object generating function is called, generates view object.Above-mentioned object generating function can be NSClassFormString. View object generated can show the data from model object.
It should be noted that when executing subject creates multiple model objects, it can be before creating view object, first An array is established, above-mentioned array then is added in the view object created.
Step 204, the view object created is laid out, generates the page.
Executing subject can be laid out above-mentioned view object after creating view object, generate the page.To view pair As be laid out may include adjust each view object in the page occupied height, to the picture or text shown in view object The mode of word is adjusted (such as picture is shown in left side, text is shown on right side).
Executing subject, for an application program, can run multiple threads when executing the method for the present embodiment to hold Row above steps, for example, controller, model and view are separately operable in different threads.In addition, can be in the present embodiment In the design pattern of MVC, increase model management module and view management module.Likewise, above-mentioned model management module and view Figure management module is separately operable in different threads.
Above-mentioned model management module can read the first map listing, then in conjunction with the view object mark from server-side Know, determine model object mark and model object title, then model identified according to above-mentioned model object, model object title with And data to be displayed, create model object.In some implementations, above-mentioned model management module can establish an array, Above-mentioned array can be added in the model object created by model.
The model object that above-mentioned view management module is available and analytic modell analytical model is created obtains model object mark, Then the second map listing is read, view object title is obtained.View creates view object according to obtained view object title. In some implementations, view management module can establish an array, and view the view object created can be added Above-mentioned array.
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 embodiment Figure.In the application scenarios of Fig. 3, server 301 sends data to terminal 302, and terminal parses after receiving above-mentioned data It is identified to view object.Then, in conjunction with the first map listing, model object mark and model object title are obtained.Then, it creates Model object.Analytic modell analytical model object obtains model object mark again, in conjunction with the second map listing, obtains view object title.So After create view object, finally the object of creation is laid out, finally obtains the page as shown in 3021 shown in terminal 302 Face.
The method provided by the above embodiment for generating the page of the application receives and parses through server-side transmission first Data, above-mentioned data include view object mark and data to be displayed, then according to above-mentioned view object mark, preset the One map listing and above-mentioned data to be displayed create model object, then according to the model object that is created and preset Second map listing creates view object, is finally laid out to the view object created, generates the page.The present embodiment Method can generate view object according to the data of update, then basis when the data that server-side is sent are the data updated View object generated generates the new page, to improve the formation speed of the page, avoids and generates the page or refresh page Caton phenomenon when face.
In some optional implementations of the present embodiment, before step 201, the above method can also include Fig. 2 In unshowned following steps: in response to detect user triggering the page generate operation, to server-side send data acquisition ask It asks.
In this implementation, executing subject be terminal when, terminal can detecte the operation of user, when detect user trigger The page generate operation when, can to server-side send data acquisition request.It may include user couple that the above-mentioned page, which generates operation, It has generated the refresh operation of the page, clicking operation of application etc. is generated to the page installed in terminal.Above-mentioned refresh operation can be with Including to the page slide downward, to clicking operation of refresh button etc., above-mentioned clicking operation may include to the page generation answer With the single-click operation of icon, double click operation etc..
In some optional implementations of the present embodiment, the above method can also include unshowned following in Fig. 2 Step: firstly, the view handover operation in response to detecting user's triggering, calls layout function corresponding with view handover operation To change the layout of created view object.Then, according to the layout after the view object change created, switching view is obtained The page of figure.
In this implementation, executing subject can be terminal device, can detecte the view handover operation of user.It is above-mentioned View handover operation can be user to the clicking operation of view switching push button, or the slide etc. to the page.Execute master Body can call layout function corresponding with view handover operation to be created to change after detecting above-mentioned view handover operation View object layout.Then according to the layout after change, the page of switch view is obtained.For example, user is by clicking page View switching push button in face can be switched to Verbose Listing mode by big chart-pattern.
With further reference to Fig. 4, as the realization to method shown in above-mentioned each figure, this application provides one kind for generating page One embodiment of the device in face, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically answer For in various electronic equipments.
As shown in figure 4, the present embodiment includes: data receipt unit 401, model pair for generating the device 400 of the page As creating unit 402, view object creating unit 403 and page generating unit 404.
Wherein, data receipt unit 401 are configured to the data received and analysis service end is sent, above-mentioned data packet Include view object mark and data to be displayed.
Model object creating unit 402, be configured to according to view object identify, preset first map listing and to It shows data, creates model object.
Wherein, the first map listing include view object mark and view object identify corresponding model object mark, Model object title.
View object creating unit 403 is configured to according to the model object and preset second mapping column created Table creates view object.
Wherein, the second map listing includes that model object mark and model object identify corresponding view object title.
Page generating unit 404 is configured to be laid out the view object created, generates the page.
In some optional implementations of the present embodiment, above-mentioned model object creating unit 402 can further by It is configured to: according to preset first map listing, determining model object mark corresponding with view object mark and model pair As title;According to identified model object title, preset object generating function is called, generates object;By identified mould Type object identity and data to be displayed are encapsulated in object generated, obtain model object.
In some optional implementations of the present embodiment, above-mentioned view object creating unit 403 can further by Be configured to: the created model object of parsing obtains model object mark;According to the second map listing, determine what parsing obtained Model object identifies corresponding view object title;According to identified view object title, preset object is called to generate letter Number generates view object.
In some optional implementations of the present embodiment, above-mentioned apparatus can further include in Fig. 4 and be not shown Request transmitting unit, be configured to data receipt unit receive and analysis service end return data before, in response to It detects that the page of user's triggering generates operation, sends data acquisition request to server-side.
In some optional implementations of the present embodiment, above-mentioned apparatus can further include in Fig. 4 and be not shown View switch unit, be configured to: in response to detect user triggering view handover operation, call with above-mentioned view switch Corresponding layout function is operated to change the layout of created view object;According to the cloth after the view object change created Office, obtains the page of switch view.
The application's is provided by the above embodiment for generating the device of the page, receives and parses through server-side transmission first Data, above-mentioned data include view object mark and data to be displayed, then according to above-mentioned view object mark, preset the One map listing and above-mentioned data to be displayed create model object, then according to the model object that is created and preset Second map listing creates view object, is finally laid out to the view object created, generates the page.The present embodiment Device can generate view object according to the data of update, then basis when the data that server-side is sent are the data updated View object generated generates the new page, to improve the formation speed of the page, avoids and generates the page or refresh page Caton phenomenon when face.
It should be appreciated that for generating the unit 401 recorded in the device 400 of the page to unit 404 respectively and in reference Fig. 2 Each step in the method for description is corresponding.As a result, above with respect to the operation and feature of the method description for generating the page It is equally applicable to device 400 and unit wherein included, details are not described herein.
Below with reference to Fig. 5, it illustrates the computer systems 500 for the terminal device for being suitable for being used to realize the embodiment of the present application Structural schematic diagram.Terminal device shown in Fig. 5 is only an example, function to the embodiment of the present application and should not use model Shroud carrys out any restrictions.
As shown in figure 5, computer system 500 includes central processing unit (CPU) 501, it can be read-only according to being stored in Program in memory (ROM) 502 or be loaded into the program in random access storage device (RAM) 503 from storage section 508 and Execute various movements appropriate and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data. CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to always Line 504.
I/O interface 505 is connected to lower component: the importation 506 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 508 including hard disk etc.; And the communications portion 509 of the network interface card including LAN card, modem etc..Communications portion 509 via such as because The network of spy's net executes communication process.Driver 510 is also connected to I/O interface 505 as needed.Detachable media 511, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 510, in order to read from thereon Computer program be mounted into storage section 508 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 description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising carrying is on a machine-readable medium Computer program, which includes the program code for method shown in execution flow chart.In such implementation In example, which can be downloaded and installed from network by communications portion 509, and/or from detachable media 511 It is mounted.When the computer program is executed by central processing unit (CPU) 501, limited in execution the present processes upper State function.
It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- but Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination. The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires electrical connection, Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use In by the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc., Huo Zheshang Any appropriate combination stated.
The calculating of the operation for executing the application can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package, Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part. In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN) Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service Provider is connected 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 journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It 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 infuse Meaning, 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 holding The dedicated hardware based system of functions or operations 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 also can be set in the processor, for example, can be described as: a kind of processor packet Include data receipt unit, model object creating unit, view object creating unit and page generating unit.Wherein, these units Title do not constitute the restriction to the unit itself under certain conditions, for example, data receipt unit is also described as " units of the data of reception and the transmission of analysis service end ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should The data that device: receiving and analysis service end is sent, above-mentioned data include view object mark and data to be displayed;According to Above-mentioned view object mark, preset first map listing and above-mentioned data to be displayed, create model object, wherein above-mentioned First map listing includes that view object mark and view object identify corresponding model object mark, model object title; According to the model object and preset second map listing created, view object is created, wherein above-mentioned second map listing Corresponding view object title is identified including model object mark and model object;Cloth is carried out to the view object created Office generates the page.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member 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 characteristic Scheme, 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 feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of method for generating the page, comprising:
It receives and the data of analysis service end transmission, the data includes view object mark and data to be displayed;
According to view object mark, preset first map listing and the data to be displayed, model object is created, In, first map listing includes that view object mark and view object identify corresponding model object mark, model pair As title;
According to the model object and preset second map listing created, view object is created, wherein second mapping List includes that model object mark and model object identify corresponding view object title;
The view object created is laid out, the page is generated.
2. according to the method described in claim 1, wherein, it is described according to view object mark, preset first map listing with And the data to be displayed, create model object, comprising:
According to preset first map listing, model object mark corresponding with view object mark and model object name are determined Claim;
According to identified model object title, preset object generating function is called, generates object;
Identified model object is identified and the data to be displayed is encapsulated in object generated, obtains model pair As.
It is described according to the model object created and preset second mapping 3. according to the method described in claim 1, wherein List creates view object, comprising:
Created model object is parsed, model object mark is obtained;
According to second map listing, determine that the model object that parsing obtains identifies corresponding view object title;
According to identified view object title, preset object generating function is called, generates view object.
4. according to the method described in claim 1, wherein, before the data that the reception and analysis service end return, institute State method further include:
In response to detecting that the page of user's triggering generates operation, data acquisition request is sent to server-side.
5. according to the method described in claim 1, wherein, the method also includes:
In response to detecting the view handover operation of user's triggering, call corresponding with view handover operation layout function with Change the layout of created view object;
According to the layout after the view object change created, the page of switch view is obtained.
6. a kind of for generating the device of the page, comprising:
Data receipt unit is configured to the data received and analysis service end is sent, and the data include view object mark Knowledge and data to be displayed;
Model object creating unit is configured to be identified according to the view object, preset first map listing and described Data to be displayed creates model object, wherein first map listing includes view object mark and view object mark Corresponding model object mark, model object title;
View object creating unit is configured to according to the model object and preset second map listing created, creation View object, wherein second map listing includes that model object mark and model object identify corresponding view object Title;
Page generating unit is configured to be laid out the view object created, generates the page.
7. device according to claim 6, wherein the model object creating unit is further configured to:
According to preset first map listing, model object mark corresponding with view object mark and model object name are determined Claim;
According to identified model object title, preset object generating function is called, generates object;
Identified model object is identified and the data to be displayed is encapsulated in object generated, obtains model pair As.
8. device according to claim 6, wherein the view object creating unit is further configured to:
Created model object is parsed, model object mark is obtained;
According to second map listing, determine that the model object that parsing obtains identifies corresponding view object title;
According to identified view object title, preset object generating function is called, generates view object.
9. device according to claim 6, wherein described device further include:
Request transmitting unit is configured to before the data that the data receipt unit receives and analysis service end returns, In response to detecting that the page of user's triggering generates operation, data acquisition request is sent to server-side.
10. device according to claim 6, wherein described device further includes view switch unit, is configured to:
In response to detecting the view handover operation of user's triggering, call corresponding with view handover operation layout function with Change the layout of created view object;
According to the layout after the view object change created, the page of switch view is obtained.
11. a kind of terminal, comprising:
One or more processors;
Storage device is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Such as method as claimed in any one of claims 1 to 5.
CN201810380514.2A 2018-04-25 2018-04-25 Method and apparatus for generating the page Pending CN110413920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810380514.2A CN110413920A (en) 2018-04-25 2018-04-25 Method and apparatus for generating the page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810380514.2A CN110413920A (en) 2018-04-25 2018-04-25 Method and apparatus for generating the page

Publications (1)

Publication Number Publication Date
CN110413920A true CN110413920A (en) 2019-11-05

Family

ID=68345489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810380514.2A Pending CN110413920A (en) 2018-04-25 2018-04-25 Method and apparatus for generating the page

Country Status (1)

Country Link
CN (1) CN110413920A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614927A (en) * 2004-11-18 2005-05-11 北京锐安科技有限公司 Method for realizing tree-shaped structure in B/S structure
CN1749995A (en) * 2004-09-15 2006-03-22 微软公司 Creation and management of content-related objects
US20080201339A1 (en) * 2007-02-21 2008-08-21 Mcgrew Robert J Providing unique views of data based on changes or rules
US8966356B1 (en) * 2012-07-19 2015-02-24 Google Inc. Providing views of three-dimensional (3D) object data models
CN106126249A (en) * 2016-06-29 2016-11-16 武汉斗鱼网络科技有限公司 A kind of method and system realizing behavior, data, view linkage in front end
CN106446292A (en) * 2016-11-16 2017-02-22 北京集奥聚合科技有限公司 Front-end data two-way binding achieving method and device
CN106528601A (en) * 2016-09-23 2017-03-22 北京五八信息技术有限公司 Method and device for dynamically configuring module
CN106874471A (en) * 2017-02-16 2017-06-20 北京百度网讯科技有限公司 Information-pushing method and device
CN107391736A (en) * 2017-08-07 2017-11-24 玫瑰视界(北京)网络科技有限公司 A kind of page display method and device
CN107609199A (en) * 2017-10-24 2018-01-19 网易无尾熊(杭州)科技有限公司 A kind of method, equipment and storage medium for handling and recovering the page
EP3282679A1 (en) * 2015-04-27 2018-02-14 Huawei Technologies Co. Ltd. Method for displaying view and terminal device
CN107766428A (en) * 2017-09-15 2018-03-06 北京大学 A kind of automatic method and system for realizing data visualization

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1749995A (en) * 2004-09-15 2006-03-22 微软公司 Creation and management of content-related objects
CN1614927A (en) * 2004-11-18 2005-05-11 北京锐安科技有限公司 Method for realizing tree-shaped structure in B/S structure
US20080201339A1 (en) * 2007-02-21 2008-08-21 Mcgrew Robert J Providing unique views of data based on changes or rules
US8966356B1 (en) * 2012-07-19 2015-02-24 Google Inc. Providing views of three-dimensional (3D) object data models
EP3282679A1 (en) * 2015-04-27 2018-02-14 Huawei Technologies Co. Ltd. Method for displaying view and terminal device
CN106126249A (en) * 2016-06-29 2016-11-16 武汉斗鱼网络科技有限公司 A kind of method and system realizing behavior, data, view linkage in front end
CN106528601A (en) * 2016-09-23 2017-03-22 北京五八信息技术有限公司 Method and device for dynamically configuring module
CN106446292A (en) * 2016-11-16 2017-02-22 北京集奥聚合科技有限公司 Front-end data two-way binding achieving method and device
CN106874471A (en) * 2017-02-16 2017-06-20 北京百度网讯科技有限公司 Information-pushing method and device
CN107391736A (en) * 2017-08-07 2017-11-24 玫瑰视界(北京)网络科技有限公司 A kind of page display method and device
CN107766428A (en) * 2017-09-15 2018-03-06 北京大学 A kind of automatic method and system for realizing data visualization
CN107609199A (en) * 2017-10-24 2018-01-19 网易无尾熊(杭州)科技有限公司 A kind of method, equipment and storage medium for handling and recovering the page

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
JOE CONWAY 等: "《IOS编程 第3版》", 31 March 2013, 华中科技大学出版社, pages: 8 - 11 *
乔淑夷: "基于MVC模式的Web前端框架关键技术研究与实现", 中国优秀硕士学位论文全文数据库 *
科尔 等: "《iOS编程》", 31 January 2015, 华中科技大学出版社, pages: 3 - 5 *
陆惠恩 等: "《软件工程》", 31 August 2016, 上海交通大学出版社, pages: 284 - 288 *

Similar Documents

Publication Publication Date Title
CN109697075A (en) File updating method, system and device
CN109739478A (en) Front end project automated construction method, device, storage medium and electronic equipment
CN109684578A (en) Method and apparatus for showing information
CN109325213A (en) Method and apparatus for labeled data
CN107491382B (en) Log output method and device
CN109213486A (en) Method and apparatus for generating customized visualization component
CN109981322A (en) The method and apparatus of cloud resource management based on label
WO2023040443A1 (en) Method and device for drawing canvas
CN109582317A (en) Method and apparatus for debugging boarding application
CN109669596A (en) Method and apparatus for showing chat message
CN109783197A (en) Dispatching method and device for program runtime environment
CN108132945A (en) For generating the method and apparatus of report
CN110019263A (en) Information storage means and device
CN109389182A (en) Method and apparatus for generating information
CN109635223A (en) Page display method and device
CN105589631B (en) Information displaying method and device
CN109408748A (en) Method and apparatus for handling information
CN109614549B (en) Method and apparatus for pushed information
CN109218041A (en) Request processing method and device for server system
CN109409419A (en) Method and apparatus for handling data
CN109101294A (en) Collecting method and plug-in unit, electronic equipment and storage medium
CN108763881A (en) Method and apparatus for controlling user right
CN108667915A (en) Information transmission system, method and apparatus
CN109150928A (en) Method and apparatus for handling request
CN108959294A (en) A kind of method and apparatus accessing search engine

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