CN111338626A - Interface rendering method and device, electronic equipment and medium - Google Patents

Interface rendering method and device, electronic equipment and medium Download PDF

Info

Publication number
CN111338626A
CN111338626A CN202010143427.2A CN202010143427A CN111338626A CN 111338626 A CN111338626 A CN 111338626A CN 202010143427 A CN202010143427 A CN 202010143427A CN 111338626 A CN111338626 A CN 111338626A
Authority
CN
China
Prior art keywords
function
component
functions
interface
rendering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010143427.2A
Other languages
Chinese (zh)
Other versions
CN111338626B (en
Inventor
李明忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010143427.2A priority Critical patent/CN111338626B/en
Publication of CN111338626A publication Critical patent/CN111338626A/en
Application granted granted Critical
Publication of CN111338626B publication Critical patent/CN111338626B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides an interface rendering method, an interface rendering device, electronic equipment and a medium, relates to the technical field of computers, and can reduce the coupling between codes corresponding to components. The technical scheme of the embodiment of the invention comprises the following steps: when an interface display instruction is detected, analyzing codes of an interface, and generating a component tree corresponding to the interface, wherein the codes corresponding to components in the component tree are composite functions, the composite functions are functions obtained by performing function combination on a plurality of function functions by using a combination function, and the function functions are function type codes used for representing functions of the components. And then, rendering an interface according to the incidence relation among the components included in the component tree and the return value of the compound function corresponding to each component.

Description

Interface rendering method and device, electronic equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an interface rendering method and apparatus, an electronic device, and a medium.
Background
When a developer designs an interface, the developer usually abstracts a design interface into a component tree, the component tree includes a plurality of components, a parent component in the component tree may include a plurality of child components, and the child components may also include grandchild components. When the device performs page rendering, starting from a root component of the component tree, the component tree is deeply traversed to render an interface in a mode of transferring attributes from a parent component to a child component.
When a new sub-component needs to be added to a parent component of the component tree, the step of implementing the function of the parent component changes due to the addition of the sub-component to the parent component, so that the code corresponding to the parent component needs to be modified, so that the code corresponding to the parent component can refer to the new component when being executed.
It can be seen that the coupling of the code corresponding to the component is high, so that the complexity of adding a new component to the interface is high.
Disclosure of Invention
The embodiment of the invention aims to provide a page rendering method, a page rendering device, electronic equipment and a page rendering medium, so as to reduce the coupling between codes corresponding to components. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an interface rendering method, where the method includes:
when an interface display instruction is detected, analyzing codes of the interface to generate a component tree corresponding to the interface, wherein the codes corresponding to all components in the component tree are composite functions, the composite functions are functions obtained by performing function combination on a plurality of function functions by using a combination function, and the function functions are function type codes for representing functions of the components;
and rendering the interface according to the incidence relation among the components included in the component tree and the return value of the compound function corresponding to each component.
Optionally, the rendering the interface according to the association relationship between the components included in the component tree and the return value of the complex function corresponding to each component includes:
sequentially determining the return value of the compound function corresponding to each component from the root component to the leaf component in the component tree;
and rendering the interface according to the return value of the compound function corresponding to each component in the component tree.
Optionally, the function corresponding to each composite function includes a state function, a rendering function, and a hook function;
wherein the state function is used for describing the state included by the component; the rendering function is used for describing mapping between the state of the component and the view; the hook function is used to describe the operations that the component performs when it is created or destroyed, respectively.
Optionally, the function corresponding to each composite function further includes an event function and/or a subcomponent function;
the event function is used for informing whether the state of the component to which the parent component belongs changes; the subcomponent functions are used to describe the subcomponents that the component comprises.
Optionally, the compound function is G (consistent), where consistent represents a mapping between a state of a component and a view, and G is compound (f)1,compose(f2,…compose(fn-1,fn))),f1、f2…fn-1And fnFor each function corresponding to a complex function, the complex (·,) is the composition function.
Optionally, the function functions corresponding to each composite function satisfy a mapping association law.
In a second aspect, an embodiment of the present invention provides an interface rendering apparatus, where the apparatus includes:
the generating module is used for analyzing codes of the interface and generating a component tree corresponding to the interface when an interface display instruction is detected, wherein the codes corresponding to the components in the component tree are composite functions, the composite functions are functions obtained by performing function combination on a plurality of function functions by using a combination function, and the function functions are function type codes used for representing functions of the components;
and the rendering module is used for rendering the interface according to the incidence relation among the components included in the component tree generated by the generating module and the return value of the composite function corresponding to each component.
Optionally, the rendering module is specifically configured to:
sequentially determining the return value of the compound function corresponding to each component from the root component to the leaf component in the component tree;
and rendering the interface according to the return value of the compound function corresponding to each component in the component tree.
Optionally, the function corresponding to each composite function includes a state function, a rendering function, and a hook function;
wherein the state function is used for describing the state included by the component; the rendering function is used for describing mapping between the state of the component and the view; the hook function is used to describe the operations that the component performs when it is created or destroyed, respectively.
Optionally, the function corresponding to each composite function further includes an event function and/or a subcomponent function;
the event function is used for informing whether the state of the component to which the parent component belongs changes; the subcomponent functions are used to describe the subcomponents that the component comprises.
Optionally, the compound function is G (consistent), where consistent represents a mapping between a state of a component and a view, and G is compound (f)1,compose(f2,…compose(fn-1,fn))),f1、f2…fn-1And fnFor each function corresponding to a complex function, the complex (·,) is the composition function.
Optionally, the function functions corresponding to each composite function satisfy a mapping association law.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of any interface rendering method when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of any one of the interface rendering methods described above.
In a fifth aspect, embodiments of the present invention further provide a computer program product including instructions, which when run on a computer, cause the computer to perform any one of the above interface rendering methods.
The interface rendering method, the interface rendering device, the electronic equipment and the medium provided by the embodiment of the invention can be used for analyzing the codes of the interface and generating the component tree corresponding to the interface when the interface display instruction is detected. And then, rendering an interface according to the incidence relation among the components included in the component tree and the return value of the compound function corresponding to each component. Because the codes corresponding to the components in the component tree are composite functions, when the sub-components are added to the components, new function functions can be added to the components, and the new function functions and the composite functions originally corresponding to the components are subjected to function combination, so that the codes originally corresponding to the components do not need to be modified when the function functions are added to the components. Therefore, the embodiment of the invention reduces the coupling of the codes corresponding to the components and reduces the complexity of adding new components to the interface.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of an interface rendering method according to an embodiment of the present invention;
FIG. 2 is an exemplary diagram of a function composition process provided by an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an interface rendering apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In order to reduce the coupling of codes corresponding to components, an embodiment of the present invention provides an interface rendering method. The interface may be a display interface of an application program or a display interface of a web page, which is not specifically limited in this embodiment of the present invention. The method can be applied to an electronic device, wherein the electronic device can be a mobile phone, a tablet computer, a computer or the like which can render a display interface.
Referring to fig. 1, an interface rendering method provided by an embodiment of the present invention may include the following steps.
Step 101, when an interface display instruction is detected, analyzing a code of an interface, and generating a component tree corresponding to the interface.
The code corresponding to each component in the component tree is a composite function, the composite function is a function obtained by performing function combination on a plurality of function functions by using a combination function, and the function is a functional code for representing the function of the component.
And 102, rendering an interface according to the incidence relation among the components included in the component tree and the return value of the compound function corresponding to each component.
According to the interface rendering method provided by the embodiment of the invention, when the interface display instruction is detected, the code of the interface can be analyzed, and the component tree corresponding to the interface is generated. And then, rendering an interface according to the incidence relation among the components included in the component tree and the return value of the compound function corresponding to each component. Because the codes corresponding to the components in the component tree are composite functions, when the sub-components are added to the components, new function functions can be added to the components, and the new function functions and the composite functions originally corresponding to the components are subjected to function combination, so that the codes originally corresponding to the components do not need to be modified when the function functions are added to the components. Therefore, the embodiment of the invention reduces the coupling of the codes corresponding to the components and reduces the complexity of adding new components to the interface.
Optionally, the manner of rendering the interface in step 102 may include the following two steps.
And step one, starting from a root component in the component tree, and sequentially determining the return value of the compound function corresponding to each component according to the sequence from the root component to a leaf component.
Optionally, the composite function corresponding to the component may be g (connectnt), where the connectnt represents a mapping between the state of the component and the view.
It can be understood that a top-down manner may be adopted to decompose the code corresponding to the interface into a plurality of components, and there is an association relationship between the components. The component functions of each component may be abstracted as a state machine (StateMachines), where the state machine represents an interactive action according to a user's execution, exposing a view corresponding to the interactive action. For example, the interactive action may be an input or click action. Equation (1) is connected, that is, equation (1) may represent a mapping relationship between the collection status (State) and the collection View (View).
Figure BDA0002399888110000051
And step two, rendering an interface according to the return value of the compound function corresponding to each component in the component tree.
It can be understood that the return values corresponding to the components may describe positions, styles, and the like of elements in the interface, and the return values of the component pairs are obtained, that is, the interface may be displayed according to the positions and styles of the elements in the interface represented by the return values.
In the related art, when the functions of the components are modified, the codes corresponding to the components need to be modified, and with the increase of the modification of the codes corresponding to the components, due to the fact that the codes corresponding to the components are seriously coupled, the complexity of the codes corresponding to the components is high, and finally, code reconstruction needs to be performed, namely, the components need to be manually split, so that the maintenance cost of the codes corresponding to the components is high.
In the embodiment of the invention, when the functions of the components are modified, the function functions can be added to the components without modifying the original corresponding composite functions of the components, so that the coupling of the codes corresponding to the components is low, and the maintenance cost of the codes corresponding to the components is reduced.
It will be appreciated that the code corresponding to each component needs to include descriptions of three aspects of the component, namely the state, rendering, and lifecycle of the component. Therefore, the function corresponding to each composite function includes: a State (State) function, a Render (Render) function, and a Hook (Hook) function.
Wherein, the state function is used for describing the state included by the component; the rendering function is used for describing mapping between the state of the component and the view; hook functions are used to describe operations that a component performs when it is created or destroyed, respectively.
Alternatively, each component may include zero to multiple states, and the states included by the component may be considered as state nodes in a state machine. The state of the component may be changed according to the user's operation.
For example, one component corresponds to a hyperlink in the interface that displays blue when the mouse cursor is not placed over the hyperlink and red when the user is detected to place the mouse cursor over the hyperlink. The color of the hyperlink is the state of the component.
Alternatively, each component may include two hook functions. One of the hook functions is used for operations executed by the component at the time of creation, such as describing memory allocated by the component at the time of creation and initializing an execution environment. Another hook function is used to describe operations performed by the component when the component is destroyed, such as describing a memory released by the component when the component is destroyed and eliminating an execution environment.
Optionally, the code corresponding to each component may further include descriptions of events and sub-components of the component. The function corresponding to each composite function may further include an Event function (Event) and/or a subcomponent (Component) function.
The event function is used for informing whether the state of the component to which the parent component belongs changes; subcomponent functions are used to describe the subcomponents that the component comprises.
Alternatively, each component may include zero to multiple events. For example, the parent component of component a is component B, and the event function of component a can notify component B whether the state of component a has changed.
Alternatively, a component may not include a subcomponent, and may include one or more subcomponents. The component and sub-component rendered views are different.
Optionally, the function of the component may be added, modified or deleted by adding a function to the component. Since the component may include five function functions, the function of the component may be modified by using the five function functions to modify the five aspects of the component. The five function functions are respectively a state function (FState), a rendering function (Freder), an event function (event), a hook function (Fhook) and a subcomponent (Fcomponent) function.
FState may be used to add, modify or delete states included by a component.
The rendering function of the component can be modified using Frender.
Events for components can be added, modified, or deleted using the febent.
The process of the component at creation or destruction can be added or modified using Fhook.
Subcomponents included by a component may be added, modified or deleted using Fcomponent.
The technical scheme of the embodiment of the invention can also bring the following beneficial effects: the embodiment of the invention can divide the function into five functions, so that the modification of each aspect of the component can be realized by one function, and the codes corresponding to the component can be more conveniently multiplexed and managed.
Optionally, the functions of the components may be added, modified or deleted by adding the function functions. The added function can be abstracted as a mapping to Component mapping, i.e. can be abstracted as a mapping to View. The composite function corresponding to the component can be expressed as equation (2).
fn(…f2(f1(Component(State)))) (2)
Wherein f is1、f2…fnRepresenting the function added to Component.
Optionally, the compound function may be g (Component), and the g (Component) may be called to implement the function of the Component, and the function included in the ComponentThe energy function comprises a state function, a rendering function and a hook function, and can also comprise an event function and a subcomponent function, and the five function functions can be all used as fiAnd (4) showing.
Therefore, the code corresponding to the component in the embodiment of the present invention may be composed of each function, and each function may be functionally combined by a combination (compound) function. The composite function obtained after combining the function functions is formula (3).
G=compose(f1,compose(f2,…compose(fn-1,fn))) (3)
Wherein f is1、f2…fn-1And fnFor each function corresponding to a component, compound (,) is a composition function.
And the functions combined by the combined functions meet the mapping combination law. For example: a composition (f, composition (g, h)) is described.
Therefore, the functional functions corresponding to the components satisfy the mapping combination law, that is, when the positions of the functional functions included in the composite function are not changed, the operation sequence of the functional functions has no influence on the operation result. Therefore, when determining the return value of the complex function in the first step of step 102, the return values of the function functions may be determined in an arbitrary order.
The technical scheme of the embodiment of the invention can also bring the following beneficial effects: by abstracting the function code of the component into the function and combining the functions, the function of the component can be added, modified or deleted on the premise of not changing the original function of the component, and the complexity of adding, modifying or deleting the function of the component is simplified.
An exemplary process for functionally compounding components is shown in fig. 2. Assume that a component possesses function 1, function 2, and function 3. Wherein, the function 1 comprises the following function functions: function of state f1And a rendering function f2(ii) a The function 2 includes the following function functions: event function f3And hook function f4(ii) a The function 3 includes the following function functions: hook function f5Sum subcomponent function f6
The assembly being functionally combined, i.e. combination f1、f2、f3、f4、f5And f6Obtaining G ═ complex (f)1,compose(f2,compose(f3,compose(f4,compose(f5,f6))))). When the component is rendered, G (component) can be called to obtain the component with the compounded function.
Corresponding to the above method embodiment, an embodiment of the present invention provides an interface rendering apparatus, as shown in fig. 3, the apparatus including: a generation module 301 and a rendering module 302;
a generating module 301, configured to, when an interface display instruction is detected, analyze a code of an interface, and generate a component tree corresponding to the interface, where the code corresponding to each component in the component tree is a composite function, the composite function is a function obtained by performing function combination on a plurality of function functions by using a combination function, and the function is a functional code used for representing a function of the component;
a rendering module 302, configured to render an interface according to the association relationship between the components included in the component tree generated by the generating module 301 and the return value of the complex function corresponding to each component.
Optionally, the rendering module 302 is specifically configured to:
sequentially determining the return value of the compound function corresponding to each component from the root component to the leaf component in the component tree;
and rendering the interface according to the return value of the compound function corresponding to each component in the component tree.
Optionally, the function corresponding to each composite function includes a state function, a rendering function, and a hook function;
wherein, the state function is used for describing the state included by the component; the rendering function is used for describing mapping between the state of the component and the view; hook functions are used to describe operations that a component performs when it is created or destroyed, respectively.
Optionally, the function corresponding to each composite function further includes an event function and/or a subcomponent function;
the event function is used for informing whether the state of the component to which the parent component belongs changes; subcomponent functions are used to describe the subcomponents that the component comprises.
Optionally, the compound function is g (collocation), where collocation represents the mapping between the state of the component to the view,
Figure BDA0002399888110000091
f1、f2…fn-1and fnFor each function corresponding to a complex function, the complex (·, · °) is a composition function.
Optionally, the function functions corresponding to each composite function satisfy a mapping association law.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401 is configured to implement the steps executed by the electronic device in the above method embodiment when executing the program stored in the memory 403.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the integrated circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to execute the interface rendering method described in any one of the above embodiments.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer, causes the computer to perform the interface rendering method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. An interface rendering method, the method comprising:
when an interface display instruction is detected, analyzing codes of the interface to generate a component tree corresponding to the interface, wherein the codes corresponding to all components in the component tree are composite functions, the composite functions are functions obtained by performing function combination on a plurality of function functions by using a combination function, and the function functions are function type codes for representing functions of the components;
and rendering the interface according to the incidence relation among the components included in the component tree and the return value of the compound function corresponding to each component.
2. The method according to claim 1, wherein the rendering the interface according to the association relationship between the components included in the component tree and the return value of the complex function corresponding to each component comprises:
sequentially determining the return value of the compound function corresponding to each component from the root component to the leaf component in the component tree;
and rendering the interface according to the return value of the compound function corresponding to each component in the component tree.
3. The method of claim 2, wherein the function corresponding to each composite function comprises a state function, a rendering function, and a hook function;
wherein the state function is used for describing the state included by the component; the rendering function is used for describing mapping between the state of the component and the view; the hook function is used to describe the operations that the component performs when it is created or destroyed, respectively.
4. The method according to claim 3, wherein the function corresponding to each composite function further comprises an event function and/or a subcomponent function;
the event function is used for informing whether the state of the component to which the parent component belongs changes; the subcomponent functions are used to describe the subcomponents that the component comprises.
5. The method of claim 1, wherein the composition function is G (coupon), wherein coupon represents a mapping between the state of the component and the view, and G ═ composition (f)1,compose(f2,…compose(fn-1,fn))),f1、f2…fn-1And fnFor each function corresponding to a complex function, the complex (·,) is the composition function.
6. The method of claim 5, wherein a mapping association law is satisfied between the functional functions corresponding to each composite function.
7. An interface rendering apparatus, the apparatus comprising:
the generating module is used for analyzing codes of the interface and generating a component tree corresponding to the interface when an interface display instruction is detected, wherein the codes corresponding to the components in the component tree are composite functions, the composite functions are functions obtained by performing function combination on a plurality of function functions by using a combination function, and the function functions are function type codes used for representing functions of the components;
and the rendering module is used for rendering the interface according to the incidence relation among the components included in the component tree generated by the generating module and the return value of the composite function corresponding to each component.
8. The apparatus of claim 7, wherein the rendering module is specifically configured to:
sequentially determining the return value of the compound function corresponding to each component from the root component to the leaf component in the component tree;
and rendering the interface according to the return value of the compound function corresponding to each component in the component tree.
9. The apparatus of claim 8, wherein the function corresponding to each composite function comprises a state function, a rendering function, and a hook function;
wherein the state function is used for describing the state included by the component; the rendering function is used for describing mapping between the state of the component and the view; the hook function is used to describe the operations that the component performs when it is created or destroyed, respectively.
10. The apparatus according to claim 9, wherein the function corresponding to each composite function further comprises an event function and/or a subcomponent function;
the event function is used for informing whether the state of the component to which the parent component belongs changes; the subcomponent functions are used to describe the subcomponents that the component comprises.
11. The apparatus of claim 7, wherein the composition function is G (coupon), and wherein coupon represents a mapping between a state of a component to a view, and G ═ composition (f)1,compose(f2,…compose(fn-1,fn))),f1、f2…fn-1And fnFor each function corresponding to a complex function, the complex (·,) is the composition function.
12. The apparatus according to claim 11, wherein a mapping association law is satisfied between the functional functions corresponding to each composite function.
13. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202010143427.2A 2020-03-04 2020-03-04 Interface rendering method and device, electronic equipment and medium Active CN111338626B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010143427.2A CN111338626B (en) 2020-03-04 2020-03-04 Interface rendering method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010143427.2A CN111338626B (en) 2020-03-04 2020-03-04 Interface rendering method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN111338626A true CN111338626A (en) 2020-06-26
CN111338626B CN111338626B (en) 2023-09-05

Family

ID=71183913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010143427.2A Active CN111338626B (en) 2020-03-04 2020-03-04 Interface rendering method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN111338626B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535169A (en) * 2021-07-13 2021-10-22 杭州安恒信息技术股份有限公司 Scene rendering method, device and equipment and readable storage medium
CN113722538A (en) * 2021-09-08 2021-11-30 北京奇艺世纪科技有限公司 Interface dynamic rendering method and device
CN115525852A (en) * 2021-10-28 2022-12-27 北京字节跳动网络技术有限公司 Webpage rendering method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101980154A (en) * 2010-11-02 2011-02-23 深圳市融创天下科技发展有限公司 Method and system for creating and drawing interface control tree and mobile terminal
US20140184618A1 (en) * 2012-12-28 2014-07-03 Scott A. Krig Generating canonical imaging functions
CN104731584A (en) * 2015-02-26 2015-06-24 武汉爱科唯自动化科技有限公司 Human-machine interface customizable configuration design method for open type numerical control system
CN105354013A (en) * 2014-08-18 2016-02-24 阿里巴巴集团控股有限公司 Application interface rendering method and apparatus
CN106681770A (en) * 2016-12-29 2017-05-17 金蝶软件(中国)有限公司 Method and device for dynamically correcting attributes of secondary modules in composite modules
CN108897538A (en) * 2018-06-08 2018-11-27 泰康保险集团股份有限公司 Page view display methods and device, storage medium and electric terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101980154A (en) * 2010-11-02 2011-02-23 深圳市融创天下科技发展有限公司 Method and system for creating and drawing interface control tree and mobile terminal
US20140184618A1 (en) * 2012-12-28 2014-07-03 Scott A. Krig Generating canonical imaging functions
CN105354013A (en) * 2014-08-18 2016-02-24 阿里巴巴集团控股有限公司 Application interface rendering method and apparatus
CN104731584A (en) * 2015-02-26 2015-06-24 武汉爱科唯自动化科技有限公司 Human-machine interface customizable configuration design method for open type numerical control system
CN106681770A (en) * 2016-12-29 2017-05-17 金蝶软件(中国)有限公司 Method and device for dynamically correcting attributes of secondary modules in composite modules
CN108897538A (en) * 2018-06-08 2018-11-27 泰康保险集团股份有限公司 Page view display methods and device, storage medium and electric terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535169A (en) * 2021-07-13 2021-10-22 杭州安恒信息技术股份有限公司 Scene rendering method, device and equipment and readable storage medium
CN113722538A (en) * 2021-09-08 2021-11-30 北京奇艺世纪科技有限公司 Interface dynamic rendering method and device
CN113722538B (en) * 2021-09-08 2023-09-05 北京奇艺世纪科技有限公司 Interface dynamic rendering method and device
CN115525852A (en) * 2021-10-28 2022-12-27 北京字节跳动网络技术有限公司 Webpage rendering method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111338626B (en) 2023-09-05

Similar Documents

Publication Publication Date Title
US10169034B2 (en) Verification of backward compatibility of software components
WO2021184725A1 (en) User interface test method and apparatus, storage medium, and computer device
US10423396B1 (en) Transforming non-apex code to apex code
CN111338626A (en) Interface rendering method and device, electronic equipment and medium
CN107291449B (en) Page rendering method, device and equipment
CN112988123B (en) DDD-oriented software design method and system
CN112817657A (en) Application program starting item loading method, device and system and storage medium
Ma et al. Aladdin: Automating release of deep-link APIs on Android
CN115794202A (en) Data configuration method and engine, file system and computer storage medium
CN111880785A (en) Program code conversion method and device and electronic equipment
CN115048104A (en) Code generation method and device based on syntax tree and electronic equipment
CN112231197A (en) Page testing method and device and storage medium
WO2021129812A1 (en) Method and system for running artificial intelligence application, and device
US9361210B2 (en) Capturing domain validations and domain element initializations
CN116258124A (en) Data reference method, device, electronic equipment and storage medium
CN107506299B (en) Code analysis method and terminal equipment
CN114780330A (en) Code monitoring method and device
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
CN112948264A (en) Test task execution method, device, system, storage medium and electronic device
US20170161359A1 (en) Pattern-driven data generator
CN112667141A (en) Input revocation method, device, electronic equipment and computer-readable storage medium
CN112445499A (en) Derived variable determination method, device, equipment and storage medium
Lyu et al. Analyzing Ethereum Smart Contract Vulnerabilities at Scale Based on Inter-Contract Dependency.
CN117688308B (en) Intelligent cleaning method and system for heterogeneous data
WO2024139849A1 (en) Platform for generating vulnerability mining model, and related method

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
GR01 Patent grant
GR01 Patent grant