CN107301220B - Method, device and equipment for data driving view and storage medium - Google Patents

Method, device and equipment for data driving view and storage medium Download PDF

Info

Publication number
CN107301220B
CN107301220B CN201710458443.9A CN201710458443A CN107301220B CN 107301220 B CN107301220 B CN 107301220B CN 201710458443 A CN201710458443 A CN 201710458443A CN 107301220 B CN107301220 B CN 107301220B
Authority
CN
China
Prior art keywords
view
attribute
rendering
view component
data
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.)
Active
Application number
CN201710458443.9A
Other languages
Chinese (zh)
Other versions
CN107301220A (en
Inventor
殷勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201710458443.9A priority Critical patent/CN107301220B/en
Publication of CN107301220A publication Critical patent/CN107301220A/en
Application granted granted Critical
Publication of CN107301220B publication Critical patent/CN107301220B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for driving a view by data. The data-driven view method comprises the following steps: monitoring the change of the attribute value corresponding to each view component in the view; and when the change of the value of the first attribute is monitored, re-rendering the view component corresponding to the first attribute in the view. The embodiment of the invention monitors the change of the attribute value corresponding to each view component in the view; and only re-rendering the view component corresponding to the changed attribute in the view can simplify the view rendering development process, reduce the development cost and improve the development efficiency.

Description

Method, device and equipment for data driving view and storage medium
Technical Field
The embodiment of the invention relates to the technical field of internet application, in particular to a method, a device, equipment and a storage medium for driving a view by data.
Background
An application program with a visual human-computer interaction interface generally has the requirement that data and views are mutually synchronous. With the continuous improvement of the complexity of modern application, the synchronization logic of data and views is increasingly complex, and according to incomplete statistics, after the first delivery test of the visual application, the proportion of software defects caused by the asynchronism of the views and the data is found to be more than 50%.
Currently, in order to pursue higher view update performance, a user needs to manually write a Hook API corresponding to each view component, and the Hook API determines whether to re-render the view according to the difference between the original incoming data and the updated incoming data.
On the one hand, the Hook API is often cumbersome and difficult to implement, and may require extremely complex logic decisions, particularly for applications with complex multi-level structured data sources. More repetitive decision logic is also brought if there are more levels of JSX tags.
On the other hand, re-rendering a view from the root to the leaves would likely prevent the view from responding to the data changes unexpectedly, and if the variable data hierarchy deepens, this logic would be extremely redundant and inefficient.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for driving a view by data, which can simplify a view rendering development process, reduce development cost, and improve development efficiency.
In a first aspect, an embodiment of the present invention provides a method for driving a view by data, where the method includes:
monitoring the change of the attribute value corresponding to each view component in the view;
and when the change of the value of the first attribute is monitored, re-rendering the view component corresponding to the first attribute in the view.
In a second aspect, an embodiment of the present invention further provides an apparatus for driving views by data, where the apparatus includes:
the monitoring module is used for monitoring the change of the attribute value corresponding to each view component in the view;
and the rendering module is used for re-rendering the view component corresponding to the first attribute in the view when the change of the value of the first attribute is monitored.
In a third aspect, an embodiment of the present invention further provides an apparatus, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for data-driven viewing according to any of the embodiments of the present invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for data-driven view according to any one of the embodiments of the present invention.
The embodiment of the invention monitors the change of the attribute value corresponding to each view component in the view; and only re-rendering the view component corresponding to the changed attribute in the view can simplify the view rendering development process, reduce the development cost and improve the development efficiency.
Drawings
FIG. 1A is a flow chart of a method for driving views according to an embodiment of the present invention;
fig. 1B is a schematic diagram illustrating correspondence between view components and attributes of view splitting in a method for driving a view according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for driving views according to a second embodiment of the present invention;
FIG. 3A is a flowchart of a method for driving views according to a third embodiment of the present invention;
fig. 3B is a schematic diagram of the correspondence between the object and the view component in the data-driven view method according to the third embodiment of the present invention;
FIG. 4 is a block diagram of an apparatus for driving views according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in further detail below with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention.
It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1A is a flowchart of a method for driving a view by data according to an embodiment of the present invention, where the method is applicable to a case of rendering a view, and the method may be executed by an apparatus for driving a view by data according to an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be integrated in a terminal device or an application end of the terminal device. The terminal device may be, but is not limited to, a mobile terminal (tablet computer or smartphone).
The application end can be a plug-in of a certain client end embedded in the terminal equipment or a plug-in of an operating system of the terminal equipment, and is matched with a data drive view application program in a data drive view client end embedded in the terminal equipment or the operating system of the terminal equipment for use; the application end may also be an independent client end capable of providing a data-driven view in the terminal device, which is not limited in this embodiment.
As shown in fig. 1A, the method of this embodiment specifically includes:
s101, monitoring the change of the attribute value corresponding to each view component in the view.
Wherein, the attribute is a display item in the view and is presented in the form of pictures, characters, videos or numbers. One view contains at least one attribute.
Specifically, the view may be split into at least one view component in advance according to the data attribute contained in the view, and a corresponding relationship between the attribute and the view component is established. Taking the reading software view as an example, the view may include attributes such as a user name, an age, and a book to be read, where the book to be read may include attributes such as a book name. The user name and age in the view, and the book and book name to be read can be extracted to form a view component separately, and the corresponding relationship between the attribute and the view component is established to obtain the corresponding relationship shown in fig. 1B.
S102, when the change of the value of the first attribute is monitored, re-rendering the view component corresponding to the first attribute in the view.
Wherein the view component is opposite to the display position of the value of the attribute in the view.
Optionally, when it is monitored that the value of the first attribute changes, first determining a position in the view where the first attribute is used; rendering the position using the changed value of the first attribute.
Taking fig. 1B as an example, if it is monitored that data corresponding to the book name changes, only data at the position where the book name is located in the view is re-rendered.
In the embodiment, the change of the attribute value corresponding to each view component in the view is monitored; and only re-rendering the view component corresponding to the changed attribute in the view can simplify the view rendering development process, reduce the development cost and improve the development efficiency.
Example two
Fig. 2 is a flowchart of a method for driving views according to a second embodiment of the present invention. In this embodiment, the change of the attribute value corresponding to each view component in the step monitoring view is further optimized as follows: defining an Application Programming Interface (API) for wrapping attributes corresponding to each view component in the view, so as to wrap each attribute as an access accessor; monitoring the operation of the access accessor determines the attribute with changed value.
Correspondingly, the method of the embodiment specifically includes:
s201, defining an application programming interface API used for packaging attributes corresponding to each view component in the view, and packaging each attribute into an access accessor.
S202, monitoring the operation of the access accessor to determine the attribute with changed value.
Specifically, the changed attribute can be known by monitoring the read operation of the access accessor through the API.
For simplicity, the implementation principles are presented in JavaScript coding language, extensible to any other coding language. Data structures for driving the exemplary views are defined, and as an example in FIG. 1B, they are made up of a number of members:
Figure BDA0001324252570000061
the views used for presentation are:
Figure BDA0001324252570000062
the data is then recursively wrapped using an API of JavaScript, namely "object. For simplicity, considering only null, undefined, string, boroean, number, array, and object data types here, the function "pack" is now defined as follows:
Figure BDA0001324252570000071
Figure BDA0001324252570000081
the "pack" function packages each attribute of the data as an "access accessor" and is designed to be notified when a particular attribute is dereferenced (i.e., fetched) and changed.
S203, when the change of the value of the first attribute is monitored, re-rendering the view component corresponding to the first attribute in the view.
In the embodiment, the change of the attribute value corresponding to each view component in the view is monitored; and only re-rendering the view component corresponding to the changed attribute in the view can simplify the view rendering development process, reduce the development cost and improve the development efficiency.
EXAMPLE III
Fig. 3A is a flowchart of a method for driving views according to a third embodiment of the present invention. The present embodiment is optimized based on the above embodiment, and in the present embodiment, the method further includes the following steps: creating an object, and mounting the attribute corresponding to each view component in the view under the object; defining a rendering function for each attribute of the object, the rendering function being used for rendering the view component associated with the attribute; correspondingly, the re-rendering of the view component corresponding to the first attribute in the view comprises: and calling the rendering function corresponding to the first attribute to operate again, and re-rendering the view component corresponding to the first attribute.
Correspondingly, the method of the embodiment specifically includes:
s301, monitoring the change of the attribute value corresponding to each view component in the view.
S302, creating an object, and mounting the attribute corresponding to each view component in the view under the object.
Taking fig. 1B as an example, for example, a "store" object is created, and the attributes corresponding to the view components are all mounted below the "store" object, as shown in fig. 3B.
S303, respectively defining a rendering function for each attribute of the object, wherein the rendering function is used for rendering the view component associated with the attribute.
Specifically, after the rendering function and the "store" object are defined, it is necessary to know which attributes of the "store" are used in which rendering functions, that is, which view components use which attributes, and then, the following functions are defined for encapsulating the rendering function render:
Figure BDA0001324252570000091
Figure BDA0001324252570000101
thus, when the respective attributes of data are used inside a render, it is possible to know in which render it is currently running. To achieve this, at least once for all view components, the render is run, and the attribute information used by each view component may be recorded when the view is first rendered.
S304, when the change of the value of the first attribute is monitored, calling the rendering function corresponding to the first attribute to operate again, and re-rendering the view component corresponding to the first attribute.
Taking step 303 as an example, after the value of the attribute is modified, the re-run of all render methods applied to it is automatically triggered, i.e. the view dependent on this data is rendered again. This is very easy to implement, and it only needs to record the corresponding relationship from the data attribute to the render when all render views are first rendered, and then actively call these renderers when the value is modified, which can be implemented by the following functions:
Figure BDA0001324252570000102
Figure BDA0001324252570000111
Figure BDA0001324252570000121
if the views are updated in batches by properly controlling the timing and frequency of render, better re-rendering performance can be obtained.
According to the method, the traditional algorithm for manually comparing data difference and the rendering direction from top to bottom is abandoned, the accurate relation between the maintenance attribute and the view is selected, and the re-rendering of the view in the limited range is accurately driven when the attribute value changes.
Example four
Fig. 4 is a structural diagram of a data driving view apparatus according to a fourth embodiment of the present invention. The embodiment is applicable to the case of rendering a view, and the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be integrated in a terminal device or an application end of the terminal device. The terminal device may be, but is not limited to, a mobile terminal (tablet computer or smartphone).
The application end can be a plug-in of a certain client end embedded in the terminal equipment or a plug-in of an operating system of the terminal equipment, and is matched with a data drive view application program in a data drive view client end embedded in the terminal equipment or the operating system of the terminal equipment for use; the application end may also be an independent client end capable of providing a data-driven view in the terminal device, which is not limited in this embodiment.
As shown in fig. 4, the apparatus includes: a monitoring module 401 and a rendering module 402, wherein:
the monitoring module 401 is configured to monitor a change in a value of an attribute corresponding to each view component in the view;
the rendering module 402 is configured to re-render a view component corresponding to the first attribute in the view when it is monitored that the value of the first attribute changes.
The data-driven view device of this embodiment is used for executing the method for data-driven view of the above embodiments, and the technical principle and the generated technical effect are similar, and are not described herein again.
On the basis of the above embodiments, the apparatus further includes: a component splitting module 403;
the component splitting module 403 is configured to split the view into at least one view component according to the data attribute included in the view, and establish a corresponding relationship between the attribute and the view component.
On the basis of the foregoing embodiments, the rendering module 402 is specifically configured to:
determining a location in the view to use the first attribute; rendering the position using the changed value of the first attribute.
On the basis of the foregoing embodiments, the monitoring module 401 is specifically configured to:
defining an Application Programming Interface (API) for packaging attributes corresponding to each view component in the view so as to package each attribute as an access accessor; monitoring the operation of the access accessor determines the attribute with changed value.
On the basis of the above embodiments, the apparatus further includes: an object creation module 404;
the object creating module 404 is configured to create an object, and mount the attribute corresponding to each view component in the view under the object; defining a rendering function for each attribute of the object, the rendering function being used for rendering the view component associated with the attribute;
correspondingly, the rendering module 402 is specifically configured to:
and calling the rendering function corresponding to the first attribute to operate again, and re-rendering the view component corresponding to the first attribute.
The device for data-driven views provided by the above embodiments can execute the method for data-driven views provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method for data-driven views.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 5 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 5, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown in FIG. 5, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, such as implementing the method of data-driven views provided by embodiments of the present invention:
monitoring the change of the attribute value corresponding to each view component in the view;
and when the change of the value of the first attribute is monitored, re-rendering the view component corresponding to the first attribute in the view.
Further, the method further comprises:
and splitting the view into at least one view component according to the data attributes contained in the view, and establishing the corresponding relation between the attributes and the view components.
Further, the re-rendering the view component corresponding to the first attribute in the view comprises:
determining a location in the view to use the first attribute;
rendering the position using the changed value of the first attribute.
Further, the monitoring the change of the value of the attribute corresponding to each view component in the view includes:
defining an Application Programming Interface (API) for packaging attributes corresponding to each view component in the view so as to package each attribute as an access accessor;
monitoring the operation of the access accessor determines the attribute with changed value.
Further, the method further comprises:
creating an object, and mounting the attribute corresponding to each view component in the view under the object;
defining a rendering function for each attribute of the object, the rendering function being used for rendering the view component associated with the attribute;
correspondingly, the re-rendering of the view component corresponding to the first attribute in the view comprises:
and calling the rendering function corresponding to the first attribute to operate again, and re-rendering the view component corresponding to the first attribute.
EXAMPLE six
Embodiment 6 of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for driving views by data as provided in all inventive embodiments of this application:
monitoring the change of the attribute value corresponding to each view component in the view;
and when the change of the value of the first attribute is monitored, re-rendering the view component corresponding to the first attribute in the view.
Further, the method further comprises:
and splitting the view into at least one view component according to the data attributes contained in the view, and establishing the corresponding relation between the attributes and the view components.
Further, the re-rendering the view component corresponding to the first attribute in the view comprises:
determining a location in the view to use the first attribute;
rendering the position using the changed value of the first attribute.
Further, the monitoring the change of the value of the attribute corresponding to each view component in the view includes:
defining an Application Programming Interface (API) for packaging attributes corresponding to each view component in the view so as to package each attribute as an access accessor;
monitoring the operation of the access accessor determines the attribute with changed value.
Further, the method further comprises:
creating an object, and mounting the attribute corresponding to each view component in the view under the object;
defining a rendering function for each attribute of the object, the rendering function being used for rendering the view component associated with the attribute;
correspondingly, the re-rendering of the view component corresponding to the first attribute in the view comprises:
and calling the rendering function corresponding to the first attribute to operate again, and re-rendering the view component corresponding to the first attribute.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 (a non-exhaustive list) of the computer readable storage medium would include the following: 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 context of this document, 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, 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 wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like 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).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for data-driven viewing, comprising:
monitoring the change of the attribute value corresponding to each view component in the view;
when the change of the value of the first attribute is monitored, re-rendering a view component corresponding to the first attribute in the view;
the re-rendering of the view component in the view corresponding to the first attribute comprises:
calling the rendering function corresponding to the first attribute to operate again, and re-rendering the view component corresponding to the first attribute;
the monitoring the change of the value of the attribute corresponding to each view component in the view comprises:
defining an Application Programming Interface (API) for packaging attributes corresponding to each view component in the view so as to package each attribute as an access accessor;
monitoring the operation of the access accessor determines the attribute with changed value.
2. The method of claim 1, further comprising:
and splitting the view into at least one view component according to the data attributes contained in the view, and establishing the corresponding relation between the attributes and the view components.
3. The method of claim 1, wherein re-rendering the view component of the view corresponding to the first attribute comprises:
determining a location in the view to use the first attribute;
rendering the position using the changed value of the first attribute.
4. The method of claim 1, further comprising:
creating an object, and mounting the attribute corresponding to each view component in the view under the object;
a rendering function is defined separately for each attribute of the object, the rendering function for rendering the view component associated with the attribute.
5. An apparatus for data-driven viewing, comprising:
the monitoring module is used for monitoring the change of the attribute value corresponding to each view component in the view;
the rendering module is used for re-rendering the view component corresponding to the first attribute in the view when the change of the value of the first attribute is monitored;
the rendering module is specifically configured to:
calling the rendering function corresponding to the first attribute to operate again, and re-rendering the view component corresponding to the first attribute;
the monitoring module is specifically configured to:
defining an Application Programming Interface (API) for packaging attributes corresponding to each view component in the view so as to package each attribute as an access accessor; monitoring the operation of the access accessor determines the attribute with changed value.
6. The apparatus of claim 5, further comprising:
and the component splitting module is used for splitting the view into at least one view component according to the data attributes contained in the view and establishing the corresponding relation between the attributes and the view components.
7. The apparatus of claim 5, wherein the rendering module is specifically configured to:
determining a location in the view to use the first attribute; rendering the position using the changed value of the first attribute.
8. The apparatus of claim 5, further comprising:
the object creating module is used for creating an object and mounting the attribute corresponding to each view component in the view under the object; a rendering function is defined separately for each attribute of the object, the rendering function for rendering the view component associated with the attribute.
9. A computer device, the device comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of data-driven viewing according to any of claims 1-4.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of data-driven viewing according to any one of claims 1-4.
CN201710458443.9A 2017-06-16 2017-06-16 Method, device and equipment for data driving view and storage medium Active CN107301220B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710458443.9A CN107301220B (en) 2017-06-16 2017-06-16 Method, device and equipment for data driving view and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710458443.9A CN107301220B (en) 2017-06-16 2017-06-16 Method, device and equipment for data driving view and storage medium

Publications (2)

Publication Number Publication Date
CN107301220A CN107301220A (en) 2017-10-27
CN107301220B true CN107301220B (en) 2020-12-11

Family

ID=60136383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710458443.9A Active CN107301220B (en) 2017-06-16 2017-06-16 Method, device and equipment for data driving view and storage medium

Country Status (1)

Country Link
CN (1) CN107301220B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108023960B (en) * 2017-12-08 2019-05-21 百度在线网络技术(北京)有限公司 The method for constructing the device and the push of Feed stream information of Feed stream application
CN110362371B (en) * 2019-06-19 2022-07-22 北京百度网讯科技有限公司 View level control method, device and system, computer equipment and medium
CN112035105A (en) * 2020-09-16 2020-12-04 北京思明启创科技有限公司 Rendering method, device and equipment of visualization area and storage medium
CN113268223A (en) * 2021-07-20 2021-08-17 广州市玄武无线科技股份有限公司 Responsive object creating method, system, medium and building method of framework thereof

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141511A (en) * 2007-05-18 2008-03-12 中兴通讯股份有限公司 Interface view data filtering distribution device and network alarm management system
CN103390018A (en) * 2013-04-28 2013-11-13 浙江工业大学 Web service data modeling and searching method based on SDD (service data description)
CN104615647A (en) * 2014-12-25 2015-05-13 百度在线网络技术(北京)有限公司 View model requesting and issuing method and device
CN105160042A (en) * 2015-10-21 2015-12-16 浪潮(北京)电子信息产业有限公司 Method and device for keeping user view data and data model data consistent
CN105183301A (en) * 2015-10-21 2015-12-23 浪潮(北京)电子信息产业有限公司 User view attribute modifying method and device
CN105723341A (en) * 2013-06-06 2016-06-29 微软技术许可有限责任公司 Interface for representing bindings between objects in a web browser's layout engine memory space and objects in a scripting engine memory space
CN106126249A (en) * 2016-06-29 2016-11-16 武汉斗鱼网络科技有限公司 A kind of method and system realizing behavior, data, view linkage in front end
CN106326400A (en) * 2016-08-23 2017-01-11 成都卡莱博尔信息技术股份有限公司 Multi-dimension data set-based data processing system
CN106569900A (en) * 2016-10-28 2017-04-19 腾讯科技(深圳)有限公司 Application processing method and device
CN106598655A (en) * 2016-12-05 2017-04-26 腾讯科技(深圳)有限公司 Application page processing method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8881101B2 (en) * 2011-05-24 2014-11-04 Microsoft Corporation Binding between a layout engine and a scripting engine

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141511A (en) * 2007-05-18 2008-03-12 中兴通讯股份有限公司 Interface view data filtering distribution device and network alarm management system
CN103390018A (en) * 2013-04-28 2013-11-13 浙江工业大学 Web service data modeling and searching method based on SDD (service data description)
CN105723341A (en) * 2013-06-06 2016-06-29 微软技术许可有限责任公司 Interface for representing bindings between objects in a web browser's layout engine memory space and objects in a scripting engine memory space
CN104615647A (en) * 2014-12-25 2015-05-13 百度在线网络技术(北京)有限公司 View model requesting and issuing method and device
CN105160042A (en) * 2015-10-21 2015-12-16 浪潮(北京)电子信息产业有限公司 Method and device for keeping user view data and data model data consistent
CN105183301A (en) * 2015-10-21 2015-12-23 浪潮(北京)电子信息产业有限公司 User view attribute modifying method and device
CN106126249A (en) * 2016-06-29 2016-11-16 武汉斗鱼网络科技有限公司 A kind of method and system realizing behavior, data, view linkage in front end
CN106326400A (en) * 2016-08-23 2017-01-11 成都卡莱博尔信息技术股份有限公司 Multi-dimension data set-based data processing system
CN106569900A (en) * 2016-10-28 2017-04-19 腾讯科技(深圳)有限公司 Application processing method and device
CN106598655A (en) * 2016-12-05 2017-04-26 腾讯科技(深圳)有限公司 Application page processing method and apparatus

Also Published As

Publication number Publication date
CN107301220A (en) 2017-10-27

Similar Documents

Publication Publication Date Title
CN107301220B (en) Method, device and equipment for data driving view and storage medium
US8675000B2 (en) Command buffers for web-based graphics rendering
CN110865888A (en) Resource loading method and device, server and storage medium
CN109558323B (en) System, method and apparatus for debugging pages
CN109582317B (en) Method and apparatus for debugging hosted applications
CN111813465B (en) Information acquisition method, device, medium and equipment
CN113032083A (en) Data display method, device, electronic equipment and medium
CN115731313A (en) SVG format picture processing method, device, equipment, medium and product
CN113453073B (en) Image rendering method and device, electronic equipment and storage medium
CN107862035B (en) Network reading method and device for conference record, intelligent tablet and storage medium
CN109660581B (en) Physical machine management method, device and system
US8726230B1 (en) Generating a user interface for sending data among resources
US20210185109A1 (en) Page presentation method and system, computer system, and computer readable medium
US20230116940A1 (en) Multimedia resource processing
CN110825802A (en) Multi-type database data backup method, device, equipment and storage medium
CN112367295B (en) Plug-in display method and device, storage medium and electronic equipment
CN113836455A (en) Special effect rendering method, device, equipment, storage medium and computer program product
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN113221097A (en) Code execution method and device, electronic terminal and storage medium
US8395641B1 (en) Method for inserting graphic elements
CN111083552A (en) Thumbnail generation method, device, equipment and medium
CN113495651A (en) Window control method and device
CN112988276B (en) Resource package generation method and device, electronic equipment and storage medium
CN112306339B (en) Method and apparatus for displaying image
CN116185412B (en) Data management method and device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant