CN110609728A - Page generation method and device and electronic equipment - Google Patents

Page generation method and device and electronic equipment Download PDF

Info

Publication number
CN110609728A
CN110609728A CN201910908437.8A CN201910908437A CN110609728A CN 110609728 A CN110609728 A CN 110609728A CN 201910908437 A CN201910908437 A CN 201910908437A CN 110609728 A CN110609728 A CN 110609728A
Authority
CN
China
Prior art keywords
view
page
controller
model
sub
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
CN201910908437.8A
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910908437.8A priority Critical patent/CN110609728A/en
Publication of CN110609728A publication Critical patent/CN110609728A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The embodiment of the disclosure provides a page generation method, a page generation device and electronic equipment, belonging to the technical field of information, wherein the method comprises the following steps: acquiring the content type of a page to be generated; determining a view sub-controller and a view sub-model of the page to be generated in an inheritance way based on the content type; and generating the page to be generated based on the view sub-controller and the view sub-model. The scheme of the disclosure can improve the efficiency of page generation.

Description

Page generation method and device and electronic equipment
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a page generation method and apparatus, and an electronic device.
Background
With the rapid development of the mobile internet, a large amount of mobile products are emerging from each large application market every day, and the mobile products mainly refer to application programs (apps) on mobile devices such as android and iOS. The mobile market plays an increasingly important role in the development of internet enterprises, the content of mobile products becomes more and more complex, the forms of mobile end products become more and more abundant, and various subject matters ranging from long images and texts, long videos to short videos and the like are endlessly developed.
Aiming at the polymorphic content detail page, a development mode of a single Viewcontroller and a single Viewmodel can be adopted, a large amount of If-else judgment is filled in the page, and the page is abnormal and complex in logic and inconvenient to maintain; meanwhile, different service forms are all stacked together, so that the ViewController and the ViewModel are too bloated, and the code readability is poor.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a page generation method, a page generation apparatus, and an electronic device, which at least partially solve the problems in the prior art.
In a first aspect, an embodiment of the present disclosure provides a page generation method, including:
acquiring the content type of a page to be generated;
determining a view sub-controller and a view sub-model of the page to be generated in an inheritance way based on the content type;
and generating the page to be generated based on the view sub-controller and the view sub-model.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining the content type of the page to be generated includes:
acquiring the issued content aiming at the page to be generated from a server;
and determining the content type of the page to be generated based on the issued content.
According to a specific implementation manner of the embodiment of the present disclosure, the determining, in an inheritance manner, the view sub-controller and the view sub-model of the page to be generated includes:
acquiring a view mother controller and a view mother model corresponding to the page to be generated;
and generating a view sub-controller and a view sub-model corresponding to the content type based on the view parent controller and the view parent model respectively.
According to a specific implementation manner of the embodiment of the present disclosure, the generating the page to be generated based on the view sub-controller and the view sub-model includes:
binding the view sub-controllers and the view sub-models with the same content type;
controlling the view sub-model to generate view content by using the bound view sub-controller;
and generating the page to be generated based on the view content generated by the view sub-model.
According to a specific implementation manner of the embodiment of the present disclosure, the generating a view sub-controller and a view sub-model corresponding to the content type based on the view parent controller and the view parent model respectively includes:
generating all different types of view sub-controllers in the page to be generated based on the same view parent controller;
generating all different types of view sub-models in the page to be generated based on the same view mother model;
the view master controller and the view master model come from a previous-level page of the page to be generated.
According to a specific implementation manner of the embodiment of the present disclosure, the generating a view sub-controller and a view sub-model corresponding to the content type based on the view parent controller and the view parent model respectively includes:
and combining and setting other view submodels different from the view submodels in the view submodels, wherein the view submodels and the other view submodels are inherited from the view mother model.
According to a specific implementation manner of the embodiment of the present disclosure, before determining the view sub-controller and the view sub-model of the page to be generated in an inheritance manner, the method further includes:
setting a view mother controller and a view mother model corresponding to the view sub-controller and the view sub-model;
controlling the view sub-controller not to generate view sub-model member variables while holding the view parent model in the view parent controller.
According to a specific implementation manner of the embodiment of the present disclosure, the generating the page to be generated based on the view sub-controller and the view sub-model includes:
setting a view related to the comment in the page to be generated as an independent comment view component;
utilizing a comment ID as a key value to cache a height of a comment in the comment view component.
In a second aspect, an embodiment of the present disclosure provides a page generating apparatus, including:
the acquisition module is used for acquiring the content type of the page to be generated;
the ground determining module is used for determining a view sub-controller and a view sub-model of the page to be generated in an inheritance mode based on the content type;
and the generating module is used for generating the page to be generated based on the view sub-controller and the view sub-model.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the page generation method of any one of the first aspects or any implementation manner of the first aspect.
In a fourth aspect, the disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the page generation method in the first aspect or any implementation manner of the first aspect.
In a fifth aspect, the disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the page generation method in the first aspect or any implementation manner of the first aspect.
The page generation scheme in the embodiment of the disclosure comprises the steps of obtaining the content type of a page to be generated; determining a view sub-controller and a view sub-model of the page to be generated in an inheritance way based on the content type; and generating the page to be generated based on the view sub-controller and the view sub-model. By the scheme, the view sub-controller and the view sub-model can be generated in an inheritance mode, and the generation efficiency of the view page is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a page generation flow provided by the embodiment of the present disclosure;
fig. 2 is a schematic diagram of a page generation process provided by the embodiment of the present disclosure;
fig. 3 is a schematic diagram of another page generation flow provided by the embodiment of the present disclosure;
fig. 4 is a schematic diagram of another page generation flow provided by the embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a page generation apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, and the type, amount and ratio of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides a page generation method. The page generation method provided by the embodiment can be executed by a computing device, the computing device can be implemented as software, or implemented as a combination of software and hardware, and the computing device can be integrated in a server, a terminal device and the like.
Referring to fig. 1 and fig. 2, a page generation method provided by the embodiment of the present disclosure includes the following steps:
s101, acquiring the content type of the page to be generated.
The to-be-generated page is a new page generated by interactive operations such as clicking and the like of a user, and the to-be-generated page contains preset content. Referring to fig. 2, as an application scenario, before viewing a detail page, a user typically enters an interactive page (page on the left side of fig. 2) containing a plurality of detail page lists, and the user enters the detail page (page to be generated) by clicking the interactive page, and the user can view more detailed contents through the detail page.
The pages to be generated typically contain various types of content, which may include, for example, text, pictures, tables, videos, content reviews, and so forth. Different types of content need to be exposed through different view controls. For this reason, before generating the page to be generated, the content type of the page to be generated needs to be acquired.
Specifically, the content type (ItemType) of the page to be generated can be obtained by querying a server that generates the content of the page to be generated, and the view control required by the page to be generated is determined according to the content type.
S102, determining a view sub-controller and a view sub-model of the page to be generated in an inheritance mode based on the content type.
Conventionally, for a page (content detail page) to be generated with multiple content types, an architecture mode of an MVVM (Model-View-ViewModel) can be adopted for design and development, a development mode of a single-View controller (ViewController) and a single-View Model (ViewModel) is adopted, a large amount of If-else judgment is filled in the interior, the logic is abnormal and complex, and the maintenance is inconvenient; meanwhile, different service forms are all stacked together, so that the ViewController and the ViewModel are too bloated, and the code readability is poor.
In order to overcome the problems and improve the generation efficiency of the page to be generated, the view sub-controller and the view sub-model of the page to be generated can be generated in an inheritance mode.
Specifically, the view sub-controllers corresponding to different content types on the page to be generated may all inherit a view parent controller (BaseController), and the view parent controller may be a preset view controller. In this way, different view sub-controllers can be generated for different content types, respectively. In the process of generating the view sub-controllers, each view sub-controller can be provided with a view sub-model corresponding to the view sub-controller, and different view sub-models inherit the same view mother model, so that all the view sub-controllers and the view sub-models on all the pages to be generated can be controlled through one view mother controller and one view mother model, and the development process of the view models is simplified.
As a case may be, other view submodels may be combined inside the view submodel, which may be e.g. a comment view submodel or various operation class view submodels.
S103, generating the page to be generated based on the view sub-controller and the view sub-model.
By binding the view sub-controllers and the view sub-models one to one, the views can be filled in for different contents, and thus a page to be generated (for example, a detail page) is generated.
By the scheme in the embodiment, views in different forms can all come from a common mother controller, common attributes are efficiently converged, and common service logic is processed; different forms of contents are loaded by adopting independent sub-controllers, so that the difference is effectively isolated, and each controller can be more concentrated on the unique logic function of the controller. The generation efficiency of the view is improved.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining the content type of the page to be generated includes: acquiring the issued content aiming at the page to be generated from a server; and determining the content type of the page to be generated based on the issued content. By the method, the content type of the page to be generated can be quickly known.
Referring to fig. 3, according to a specific implementation manner of the embodiment of the present disclosure, the determining, in an inheritance manner, a view sub-controller and a view sub-model of the page to be generated includes:
s301, obtaining the view mother controller and the view mother model corresponding to the page to be generated.
View sub-controllers corresponding to different content types on a page to be generated can all inherit a view parent controller (BaseController), and the view parent controller can be a preset view controller. The view master model may be a preset one of the view models.
S302, generating a view sub-controller and a view sub-model corresponding to the content type based on the view mother controller and the view mother model respectively.
Different view sub-controllers may be generated according to different content types, respectively. In the process of generating the view sub-controllers, each view sub-controller can be provided with a view sub-model corresponding to the view sub-controller, and different view sub-models inherit the same view mother model, so that all the view sub-controllers and view sub-models on all the pages to be generated can be controlled through one view mother controller and one view mother model, and the development process of the view models is simplified
By the method, the generation process of the view sub-controller and the view sub-model can be simplified, and the generation efficiency of the view is improved.
Referring to fig. 4, according to a specific implementation manner of the embodiment of the present disclosure, the generating the page to be generated based on the view sub-controller and the view sub-model includes:
s401, binding the view sub-controllers and the view sub-models with the same content type.
In order to enable the view sub-controllers and the view sub-models to be in one-to-one correspondence, the view sub-controllers and the view sub-models can be bound, so that the same type of content can be generated through the pair of bound view sub-controllers and view sub-models, and the generation efficiency of the view is improved.
And S402, controlling the view sub-model to generate view content by using the bound view sub-controller.
And S403, generating the page to be generated based on the view content generated by the view sub-model.
All the contents of the page to be generated are formed by combining the views corresponding to different types of contents. By the method, the page to be generated can be generated quickly.
According to a specific implementation manner of the embodiment of the present disclosure, the generating a view sub-controller and a view sub-model corresponding to the content type based on the view parent controller and the view parent model respectively includes: generating all different types of view sub-controllers in the page to be generated based on the same view parent controller; generating all different types of view sub-models in the page to be generated based on the same view mother model; the view master controller and the view master model come from a previous-level page of the page to be generated. By the method, the page to be generated can be generated quickly.
According to a specific implementation manner of the embodiment of the present disclosure, the generating a view sub-controller and a view sub-model corresponding to the content type based on the view parent controller and the view parent model respectively includes: and combining and setting other view submodels different from the view submodels in the view submodels, wherein the view submodels and the other view submodels are inherited from the view mother model. By the method, the generation efficiency of the view submodel can be improved.
According to a specific implementation manner of the embodiment of the present disclosure, before determining the view sub-controller and the view sub-model of the page to be generated in an inheritance manner, the method further includes: setting a view mother controller and a view mother model corresponding to the view sub-controller and the view sub-model; controlling the view sub-controller not to generate view sub-model member variables while holding the view parent model in the view parent controller. By the method, the generation process of the view sub-model can be effectively controlled.
According to a specific implementation manner of the embodiment of the present disclosure, the generating the page to be generated based on the view sub-controller and the view sub-model includes: setting a view related to the comment in the page to be generated as an independent comment view component; utilizing a comment ID as a key value to cache a height of a comment in the comment view component. For example, each line reviews a Cell as the UITableView, the UITableView queries the height of each line of cells many times during layout, and dynamically calculating the height of the cells is a time-consuming operation, so that caching the height can effectively improve the performance of the page. The comment heights are cached according to each CommentId as Key. Meanwhile, comments are taken as basic functions, service codes are not coupled, so that the comments are sunk and decoupled with the services, the comments can be conveniently applied to more service scenes, the comment module can be sunk, the comment module is independent of the services, the reusability is strong, the comments can be published in feedback by one line of codes, the productivity is fully liberated, and the comment unit (Cell) is highly cached, so that the page slides smoothly like a silk.
Corresponding to the above method embodiment, referring to fig. 5, the present disclosure also provides a page generating apparatus 50, including:
the obtaining module 501 is configured to obtain a content type of a page to be generated.
The to-be-generated page is a new page generated by interactive operations such as clicking and the like of a user, and the to-be-generated page contains preset content. Referring to fig. 2, as an application scenario, before viewing a detail page, a user typically enters an interactive page (page on the left side of fig. 2) containing a plurality of detail page lists, and the user enters the detail page (page to be generated) by clicking the interactive page, and the user can view more detailed contents through the detail page.
The pages to be generated typically contain various types of content, which may include, for example, text, pictures, tables, videos, content reviews, and so forth. Different types of content need to be exposed through different view controls. For this reason, before generating the page to be generated, the content type of the page to be generated needs to be acquired.
Specifically, the content type (ItemType) of the page to be generated can be obtained by querying a server that generates the content of the page to be generated, and the view control required by the page to be generated is determined according to the content type.
A determining module 502, configured to determine, based on the content type, a view sub-controller and a view sub-model of the page to be generated in an inheritance manner.
Conventionally, for a page (content detail page) to be generated with multiple content types, an architecture mode of an MVVM (Model-View-ViewModel) can be adopted for design and development, a development mode of a single-View controller (ViewController) and a single-View Model (ViewModel) is adopted, a large amount of If-else judgment is filled in the interior, the logic is abnormal and complex, and the maintenance is inconvenient; meanwhile, different service forms are all stacked together, so that the ViewController and the ViewModel are too bloated, and the code readability is poor.
In order to overcome the problems and improve the generation efficiency of the page to be generated, the view sub-controller and the view sub-model of the page to be generated can be generated in an inheritance mode.
Specifically, the view sub-controllers corresponding to different content types on the page to be generated may all inherit a view parent controller (BaseController), and the view parent controller may be a preset view controller. In this way, different view sub-controllers can be generated for different content types, respectively. In the process of generating the view sub-controllers, each view sub-controller can be provided with a view sub-model corresponding to the view sub-controller, and different view sub-models inherit the same view mother model, so that all the view sub-controllers and the view sub-models on all the pages to be generated can be controlled through one view mother controller and one view mother model, and the development process of the view models is simplified.
As a case may be, other view submodels may be combined inside the view submodel, which may be e.g. a comment view submodel or various operation class view submodels.
A generating module 503, configured to generate the page to be generated based on the view sub-controller and the view sub-model.
By binding the view sub-controllers and the view sub-models one to one, the views can be filled in for different contents, and thus a page to be generated (for example, a detail page) is generated.
By the scheme in the embodiment, views in different forms can all come from a common mother controller, common attributes are efficiently converged, and common service logic is processed; different forms of contents are loaded by adopting independent sub-controllers, so that the difference is effectively isolated, and each controller can be more concentrated on the unique logic function of the controller. The generation efficiency of the view is improved.
The apparatus shown in fig. 5 may correspondingly execute the content in the above method embodiment, and details of the part not described in detail in this embodiment refer to the content described in the above method embodiment, which is not described again here.
Referring to fig. 6, an embodiment of the present disclosure also provides an electronic device 60, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of page generation in the above method embodiments.
The disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the foregoing method embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the page generation method in the aforementioned method embodiments.
Referring now to FIG. 6, a schematic diagram of an electronic device 60 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 60 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. While the figures illustrate an electronic device 60 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present disclosure should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (11)

1. A page generation method is characterized by comprising the following steps:
acquiring the content type of a page to be generated;
determining a view sub-controller and a view sub-model of the page to be generated in an inheritance way based on the content type;
and generating the page to be generated based on the view sub-controller and the view sub-model.
2. The method according to claim 1, wherein the obtaining the content type of the page to be generated comprises:
acquiring the issued content aiming at the page to be generated from a server;
and determining the content type of the page to be generated based on the issued content.
3. The method of claim 1, wherein the determining the view sub-controller and the view sub-model of the page to be generated by means of inheritance comprises:
acquiring a view mother controller and a view mother model corresponding to the page to be generated;
and generating a view sub-controller and a view sub-model corresponding to the content type based on the view parent controller and the view parent model respectively.
4. The method of claim 1, wherein generating the page to be generated based on the view sub-controller and the view sub-model comprises:
binding the view sub-controllers and the view sub-models with the same content type;
controlling the view sub-model to generate view content by using the bound view sub-controller;
and generating the page to be generated based on the view content generated by the view sub-model.
5. The method of claim 3, wherein generating a view sub-controller and a view sub-model corresponding to the content type based on the view parent controller and the view parent model, respectively, comprises:
generating all different types of view sub-controllers in the page to be generated based on the same view parent controller;
generating all different types of view sub-models in the page to be generated based on the same view mother model;
the view master controller and the view master model come from a previous-level page of the page to be generated.
6. The method of claim 3, wherein generating a view sub-controller and a view sub-model corresponding to the content type based on the view parent controller and the view parent model, respectively, comprises:
and combining and setting other view submodels different from the view submodels in the view submodels, wherein the view submodels and the other view submodels are inherited from the view mother model.
7. The method according to any of claims 1-6, wherein before determining the view sub-controller and view sub-model of the page to be generated by means of inheritance, the method further comprises:
setting a view mother controller and a view mother model corresponding to the view sub-controller and the view sub-model;
controlling the view sub-controller not to generate view sub-model member variables while holding the view parent model in the view parent controller.
8. The method according to any of claims 1-6, wherein the generating the page to be generated based on the view sub-controller and the view sub-model comprises:
setting a view related to the comment in the page to be generated as an independent comment view component;
utilizing a comment ID as a key value to cache a height of a comment in the comment view component.
9. A page generating apparatus, comprising:
the acquisition module is used for acquiring the content type of the page to be generated;
the ground determining module is used for determining a view sub-controller and a view sub-model of the page to be generated in an inheritance mode based on the content type;
and the generating module is used for generating the page to be generated based on the view sub-controller and the view sub-model.
10. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the page generation method of any one of claims 1 to 8.
11. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the page generation method of any preceding claim 1-8.
CN201910908437.8A 2019-09-25 2019-09-25 Page generation method and device and electronic equipment Pending CN110609728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910908437.8A CN110609728A (en) 2019-09-25 2019-09-25 Page generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910908437.8A CN110609728A (en) 2019-09-25 2019-09-25 Page generation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN110609728A true CN110609728A (en) 2019-12-24

Family

ID=68893044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910908437.8A Pending CN110609728A (en) 2019-09-25 2019-09-25 Page generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110609728A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434173A (en) * 2021-06-24 2021-09-24 青岛海尔科技有限公司 Data processing method, data processing device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140207742A1 (en) * 2013-01-22 2014-07-24 Alibaba Group Holding Limited Method and device for generating special topic pages
CN106560787A (en) * 2016-12-29 2017-04-12 武汉斗鱼网络科技有限公司 MVVM-framework-based view page displaying method and apparatus
CN106815015A (en) * 2016-12-21 2017-06-09 武汉斗鱼网络科技有限公司 View method for organizing and system in a kind of IOS
CN107038245A (en) * 2017-04-25 2017-08-11 努比亚技术有限公司 Page switching method, mobile terminal and storage medium
CN110209967A (en) * 2019-04-17 2019-09-06 北京奇艺世纪科技有限公司 Page loading method, device, terminal device and computer-readable medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140207742A1 (en) * 2013-01-22 2014-07-24 Alibaba Group Holding Limited Method and device for generating special topic pages
CN106815015A (en) * 2016-12-21 2017-06-09 武汉斗鱼网络科技有限公司 View method for organizing and system in a kind of IOS
CN106560787A (en) * 2016-12-29 2017-04-12 武汉斗鱼网络科技有限公司 MVVM-framework-based view page displaying method and apparatus
CN107038245A (en) * 2017-04-25 2017-08-11 努比亚技术有限公司 Page switching method, mobile terminal and storage medium
CN110209967A (en) * 2019-04-17 2019-09-06 北京奇艺世纪科技有限公司 Page loading method, device, terminal device and computer-readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LISIBEN: "iOS架构心得体会", pages 1, Retrieved from the Internet <URL:https://blog.csdn.net/lisiben/article/details/84719175> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434173A (en) * 2021-06-24 2021-09-24 青岛海尔科技有限公司 Data processing method, data processing device, storage medium and electronic equipment
CN113434173B (en) * 2021-06-24 2023-06-09 青岛海尔科技有限公司 Data processing method, device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
WO2020119485A1 (en) Page display method and device, apparatus, and storage medium
CN107273083B (en) Interaction method, device, equipment and storage medium between terminal equipment
CN107341016B (en) Focus state implementation method and device under split screen mechanism, terminal and storage medium
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN109492208B (en) Document editing method and device, equipment and storage medium thereof
CN109491646B (en) Message entry method and device, electronic equipment and readable medium
CN111309228A (en) Multimedia processing method and device and electronic equipment
CN110333843B (en) Method and device for realizing high-precision timer of virtual machine and electronic equipment
CN110908752A (en) Control setting method and device, electronic equipment and interaction system
CN110609728A (en) Page generation method and device and electronic equipment
CN109614089B (en) Automatic generation method, device, equipment and storage medium of data access code
CN111309406A (en) Event processing method and device of application program and electronic equipment
CN114422436B (en) Gateway, gateway control method, gateway control device, electronic equipment and storage medium
CN111324835A (en) Method and device for rendering user interface component, electronic equipment and storage medium
CN111290861A (en) Message processing method and device and electronic equipment
CN113391882B (en) Virtual machine memory management method and device, storage medium and electronic equipment
CN114611483A (en) Method and device for automatically upgrading nuclear power DCS control logic diagram and function diagram association
CN112688793B (en) Data packet obtaining method and device and electronic equipment
CN111199519B (en) Method and device for generating special effect package
CN111625326A (en) Task pipeline execution method and device and electronic equipment
CN112416189A (en) Cross-page focus searching method and device and electronic equipment
CN111343468A (en) Message processing method and device and electronic equipment
CN112688863B (en) Gateway data processing method and device and electronic equipment
CN110807164A (en) Automatic image area adjusting method and device, electronic equipment and computer readable storage medium

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