CN110109670B - Method and device for processing view list data, electronic equipment and storage medium - Google Patents

Method and device for processing view list data, electronic equipment and storage medium Download PDF

Info

Publication number
CN110109670B
CN110109670B CN201910411428.8A CN201910411428A CN110109670B CN 110109670 B CN110109670 B CN 110109670B CN 201910411428 A CN201910411428 A CN 201910411428A CN 110109670 B CN110109670 B CN 110109670B
Authority
CN
China
Prior art keywords
data
list
list item
identifier
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.)
Active
Application number
CN201910411428.8A
Other languages
Chinese (zh)
Other versions
CN110109670A (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 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 CN201910411428.8A priority Critical patent/CN110109670B/en
Publication of CN110109670A publication Critical patent/CN110109670A/en
Application granted granted Critical
Publication of CN110109670B publication Critical patent/CN110109670B/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)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure provides a method, an apparatus, an electronic device and a storage medium for processing view list data, wherein the method comprises: acquiring view list data to be processed, wherein the view list data to be processed comprises interface type identifications of all list items in a target view list; determining a target binding relationship corresponding to each list item according to the interface type identifier of each list item; and performing corresponding data processing and rendering on each list item by adopting a corresponding data class and rendering mode according to the target binding relationship and the view list data to be processed. The type safety during data processing is effectively improved, the development efficiency can be improved, a user can set various binding relations according to actual requirements, and the flexibility and convenience of development are improved.

Description

Method and device for processing view list data, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for processing view list data, an electronic device, and a storage medium.
Background
With the rapid development of internet technology, browsing web pages through clients and shopping and entertainment through interaction with the clients become important ways in people's lives. A User Interface (UI) of a client is an object operated by a User when the User interacts with the client. The view displayed by the user interface requires the client to perform layout according to different layout logics.
In the prior art, the view layout of the user interface is usually implemented by using a control reclerview in combination with a data Adapter. In this way, when the client processes the view list data received from the server, each list Item needs to decide how to transform the data and render the interface according to the numeric style iterType.
However, the data processing method in the prior art is easy to cause errors when converting the view list data.
Disclosure of Invention
The present disclosure provides a method and an apparatus for processing view list data, an electronic device, and a storage medium, so as to solve the problem in the prior art that a data processing error is easily caused by a pattern type and a data type error.
A first aspect of the present disclosure provides a method for processing view list data, including:
acquiring view list data to be processed, wherein the view list data to be processed comprises interface type identifications of all list items in a target view list;
determining a target binding relationship corresponding to each list item according to the interface type identifier of each list item, wherein the target binding relationship comprises the corresponding relationship of the interface type identifier, the data type identifier and the rendering mode identifier;
and performing corresponding data processing and rendering on each list item by adopting a corresponding data class and rendering mode according to the target binding relationship and the view list data to be processed.
A second aspect of the present disclosure provides a device for processing view list data, including:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring to-be-processed view list data which comprises interface type identifiers of all list items in a target view list;
the determining module is used for determining a target binding relationship corresponding to each list item according to the interface type identifier of each list item, wherein the target binding relationship comprises the corresponding relationship of the interface type identifier, the data type identifier and the rendering mode identifier;
and the processing module is used for performing corresponding data processing and rendering on each list item by adopting a corresponding data class and rendering mode according to the target binding relationship and the view list data to be processed.
A third aspect of the present disclosure provides an electronic device, comprising: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the method provided by the first aspect.
A fourth aspect of the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed, implements the method provided by the first aspect.
According to the view list data processing method, the view list data processing device, the electronic equipment and the storage medium, the binding relationship among the interface type, the data type and the rendering mode is preset, when the view list data needs to be processed, the target binding relationship corresponding to each list item can be determined according to the interface type identification of each list item, corresponding data processing and rendering are carried out on each list item according to the target binding relationship and the view list data to be processed by adopting the corresponding data type and rendering mode, the type safety during data processing is effectively improved, the development efficiency can be improved, a user can set various binding relationships according to actual requirements, and the development flexibility and convenience are improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a processing method of view list data according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a processing method of view list data according to another embodiment of the present disclosure;
FIG. 3 is a diagram of a binding framework provided by an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a processing apparatus for view list data according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure;
fig. 6 is an exemplary structural schematic diagram of an electronic device according to an embodiment of the present disclosure.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. 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.
The nouns to which this disclosure relates will be explained first:
interface type: the CellType refers to a display type of a list item, for example, one interface type is a list item display five-figure carousel, another interface type is a list item display text, and yet another interface type is a list item display picture. The user can set different interface types according to different display modes of the list items, unique corresponding data types and rendering modes are bound for the interface types, interface type identifications can also be set for each interface type, when view list data received from the server side needs to be processed, the client side can automatically determine Model data types (also called data types) corresponding to the list items according to the interface types of the list items and the rendering modes corresponding to the list items, and data conversion and rendering are carried out on the list items by adopting the data types and the rendering modes corresponding to the list items, and display is carried out.
RecyclerView: the control is a control for large-volume data display, is a new component in a support-v7 package, and is a strong sliding component, and the RecyclerView encapsulates the recycle multiplexing of a viewer (provides an interface rendering mode), that is, the RecyclerView standardizes the viewer holder. The method provides plug-in experience, high decoupling and flexibility of abnormity, and extracts a corresponding class specially for the display RecycleView of a list Item to control the display of the Item, so that the expansibility of the Item is very strong. Setting a Layout Manager (Layout Manager) to control the Layout mode, the horizontal mode, the vertical mode and the waterfall flow mode of the Item; the interval style of the Item and the animation for controlling the Item to be added and deleted can be set; and so on. The Item may be provided with data by creating a data Adapter.
The method for processing the view list data, provided by the embodiment of the disclosure, is suitable for a scene in which the client processes the view list data for layout display. The user can set different interface types according to different display modes of the list items, unique corresponding data types and rendering modes are bound for the interface types, interface type identifications can also be set for each interface type, when view list data received from the server side needs to be processed, the client side can automatically determine Model data types (also called data types) corresponding to the list items according to the interface types of the list items and the rendering modes corresponding to the list items, and data conversion and rendering are carried out on the list items by adopting the data types and the rendering modes corresponding to the list items, and display is carried out. Specifically, a binding module can be added at the client, and when layout display is required, the data Adapter obtains the binding relationship of the list Item from the binding module, and provides data for the layout manager according to the binding relationship.
Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following examples, "plurality" means two or more unless specifically limited otherwise.
The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
An embodiment of the present disclosure provides a method for processing view list data, which is used for processing the view list data. The execution subject of the embodiment of the present disclosure is a processing apparatus of view list data, and the apparatus may be set in a client, and the client may be a PC, a notebook, a tablet, a mobile phone, or the like.
As shown in fig. 1, a schematic flowchart of a method for processing view list data according to an embodiment of the present disclosure is shown, where the method includes:
step 101, obtaining view list data to be processed, wherein the view list data to be processed comprises interface type identifiers of all list items in a target view list.
Specifically, when the interface is developed, a developer may specify an interface type of each list item, specifically, an interface type identifier corresponding to the list item may be set, and after receiving the to-be-processed view list data sent by the server, the client may analyze the to-be-processed view list data, and obtain the interface type identifier of each list item in the to-be-processed view list data.
The interface type identifier may be any type of identifier, as long as one interface type can be uniquely identified, for example, the interface type identifier may be an interface type ID, an interface type name, or the like. The setting may be specifically set according to actual requirements, and this embodiment is not limited.
And 102, determining a target binding relationship corresponding to each list item according to the interface type identifier of each list item.
The target binding relationship comprises the corresponding relationship of an interface type identifier, a data type identifier and a rendering mode identifier.
Specifically, after the view list data to be processed is acquired, the target binding relationship corresponding to each list item may be determined according to the interface type identifier of each list item, and for each list item, the corresponding target binding relationship includes the corresponding relationship between the interface type identifier of the list item and the data type identifier and the rendering mode identifier.
Each interface type identification corresponds to one interface type, each interface type corresponds to one data type ModelType and a rendering mode ViewHolder. The corresponding relationship between an interface type identifier, a data type identifier and a rendering mode identifier may be referred to as a binding relationship. Various binding relationships can be preset according to different interface types to be displayed. For example, one interface type is to display a five-figure carousel on a list item, another interface type is to display a text on a list item, and another interface type is to display a picture on a list item. For the interface type of the five-figure carousel, the bound data class may be a class used for performing data processing on view list data of the interface type of the five-figure carousel, such as acquiring 5 figures of the carousel, determining a carousel sequence, a carousel time, and the like, and the data class may only give corresponding variables, where the specific parameter is that the client is introduced from view list data to be processed acquired by the server. For example, a carousel time variable is defined in the class, and specific carousel time is obtained from the to-be-processed view list data, for example, each graph displays the next graph in carousel after 5 seconds. For the rendering mode ViewHolder corresponding to the interface type of the five-chart carousel, the ViewHolder can also be created according to actual requirements and bound with the interface type and the data class.
And 103, performing corresponding data processing and rendering on each list item by adopting a corresponding data class and rendering mode according to the target binding relationship and the view list data to be processed.
Specifically, after the target binding relationship corresponding to each list item is determined, corresponding data processing and rendering can be performed on each list item by adopting a corresponding data type and rendering mode according to the target binding relationship and the view list data to be processed. For example, attribute information of each list item in the view list data to be processed is transmitted into the data class as a parameter, the data class calls a corresponding function (or called method) to perform corresponding processing according to the transmitted parameter, a specific processing function of the data class may be set and implemented according to actual requirements, and the present embodiment is not limited. After the processing, the list items can be rendered by adopting the corresponding ViewHolder, corresponding displayable data is obtained, and the layout manager performs layout display.
According to the method for processing the view list data, the binding relationship among the interface type, the data type and the rendering mode is preset, when the view list data needs to be processed, the target binding relationship corresponding to each list item can be determined according to the interface type identification of each list item, corresponding data processing and rendering are performed on each list item according to the target binding relationship and the view list data to be processed by adopting the corresponding data type and the rendering mode, the type safety during data processing is effectively improved, the development efficiency can be improved, a user can set the binding relationship according to actual requirements, and the flexibility and convenience of development are improved.
The method provided by the above embodiment is further explained in an additional embodiment of the present disclosure.
Fig. 2 is a schematic flow chart of a method for processing view list data according to an embodiment of the present disclosure.
As a practical way, on the basis of the foregoing embodiment, optionally before step 101, the method may further include:
step 2011, obtaining a binding instruction of the user, where the binding instruction includes an interface type identifier to be bound, a data type identifier to be bound, and a rendering mode identifier to be bound.
Step 2012, establishing a corresponding binding relationship among the interface type identifier to be bound, the data class identifier to be bound and the rendering mode identifier to be bound according to the binding indication.
Optionally, before obtaining the binding indication of the user, the method further includes:
step 2021, acquiring a data class creation instruction of the user, where the data class creation instruction includes a data class identifier to be created and a corresponding data class;
step 2022, according to the data class creation instruction, storing the data class corresponding to the data class identifier.
Specifically, a developer (i.e., a user) can create any desired interface type and corresponding data class according to actual display requirements, and can create the interface type and the corresponding data class through a client, where the client can obtain a data class creation instruction of the user, and store the data class corresponding to the data class identifier according to the data class creation instruction.
After the data class of a certain interface type is created, the data class can be bound with the interface type and the rendering mode, and can be bound through a client. The client acquires a binding instruction of a user, and establishes a corresponding binding relationship among the interface type identifier to be bound, the data type identifier to be bound and the rendering mode identifier to be bound according to the binding instruction. And laying a foundation for subsequent view list data processing. It can be understood that the user can also create a corresponding rendering mode ViewHolder to bind with the interface type and the data class according to actual requirements.
Illustratively, as shown in fig. 3, a schematic diagram of a binding framework provided for an embodiment of the present disclosure is provided. The data set is a database in the memory, is an independent data set independent of the database, can temporarily cache list items which disappear from the display area during rolling, and is convenient for recycling and reusing the list items in the display list during rolling.
Specifically, through the binding framework, the interface type, the data class and the corresponding ViewHolder (rendering method) can be bound, and the corresponding methods can be mutually checked and sufficient data classes are provided, so that a universal Adapter implementation can be provided. The specific design structure is as follows:
1. interface type (CellType): the created CellType is used to provide a discriminating interface for data classes, which can be implemented to determine the data classes at compile time and cannot be run time extended (except for hackapi) at runtime to avoid unexpected errors, and the discriminating interface of CellType is to accept different types, rather than discriminating by uuid or an int value by default.
2. Data type (ModelType): users can freely create data classes, and the Entity level does not need to have heavy restriction, and only needs to have an interface layer or a type layer relation with the CellType. By adopting the mode, the data class can also improve the development efficiency by inheriting the common part of the base class.
3. Binding frames (Bindings): the CellType, the modetype, the related information and the additional data structure need to be stored in an additional Bindings module (binding module), the Bindings need to be capable of correctly binding the data class, in addition, the loaded CellType needs to be cached, the Bindings can be used as a pivot of the whole implementation scheme, and some methods are provided for initialization and mutual check.
4. Adapter frame (Adapter): the finally realized data Adapter is an application layer using the binding framework, can be realized by a base class Adapter Baseadapter of a type lock, and subclasses can automatically support type safety, and only need to perform type registration binding without specifically realizing complex and specific binding and mapping relations.
Illustratively, there is a list page displayed by an e-book, which includes several modules of VIP, category, new book shelf, pre-purchase, etc.:
1. first, a binding of interface type (CellType) is provided:
VIP(110),CATEGORY(111),NEW_BOOK_ON_SALE(112),PRE_SALE_BOOK(113)。
2. each data type (modetype) is provided and bound to an interface type.
3. Binding interface type, data type and filling binding frame (Bindings module)
4. By using the adapter, the corresponding binding relationship can be directly provided without writing extra code. For example, a great number of switch-case results do not need to be written, and data structure selection, type selection and interface rendering modes do not need to be written once according to different ItemTypes. The development efficiency of developers is effectively improved, and the user experience is improved.
Illustratively, the pseudo code implementation of the above example is as follows:
Figure BDA0002062922150000081
as another implementable manner, on the basis of the foregoing embodiment, optionally, the view list data to be processed further includes attribute information corresponding to each list item, and step 103 may specifically include:
and for each list item, performing data preprocessing on the list item by adopting the data class corresponding to the list item according to the attribute information corresponding to the list item, obtaining list item data of a data structure suitable for display, and rendering the list item by adopting a rendering mode corresponding to the list item.
Optionally, the attribute information includes at least one of identification information of the list item, display size information of the list item, display content related information, display time information, and display mode information. Some other relevant information may also be included.
As another implementable manner, on the basis of the foregoing embodiment, optionally, after performing corresponding data processing and rendering on each list item by using a corresponding data class and rendering manner according to the target binding relationship and the to-be-processed view list data, the method further includes:
and 104, displaying the rendered list data.
Specifically, rendered list data may be provided to the layout manager through the data Adapter, and the layout manager performs layout display. Or the Adapter provides the rendering mode of the list items for the layout manager. The specific manner of the layout display performed by the layout manager may be any implementable manner in the prior art, and is not described herein again.
It should be noted that, the modes that can be implemented in the embodiments of the present disclosure may be implemented individually, or may be implemented in combination in any combination without conflict and are not limited.
According to the method for processing the view list data, the binding relationship among the interface type, the data type and the rendering mode is preset, when the view list data needs to be processed, the target binding relationship corresponding to each list item can be determined according to the interface type identification of each list item, corresponding data processing and rendering are performed on each list item according to the target binding relationship and the view list data to be processed by adopting the corresponding data type and the rendering mode, the type safety during data processing is effectively improved, the development efficiency can be improved, a user can set various binding relationships according to actual requirements, and the flexibility and convenience of development are improved.
Still another embodiment of the present disclosure provides a device for processing view list data, configured to perform the method of the foregoing embodiment.
Fig. 4 is a schematic structural diagram of a processing apparatus for view list data according to an embodiment of the present disclosure. The processing means 30 of the view list data comprises an acquisition module 31, a determination module 32 and a processing module 33.
The system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring view list data to be processed, and the view list data to be processed comprises interface type identifiers of all list items in a target view list; the determining module is used for determining a target binding relationship corresponding to each list item according to the interface type identifier of each list item, wherein the target binding relationship comprises the corresponding relationship of the interface type identifier, the data type identifier and the rendering mode identifier; and the processing module is used for performing corresponding data processing and rendering on each list item by adopting a corresponding data class and rendering mode according to the target binding relationship and the view list data to be processed.
The specific manner in which the various modules perform operations with respect to the apparatus in the embodiments of the present disclosure has been described in detail in relation to the embodiments of the method, and will not be described in detail herein.
According to the processing device of the view list data, provided by the embodiment of the disclosure, by presetting the binding relationship among the interface type, the data type and the rendering mode, when the view list data needs to be processed, the target binding relationship corresponding to each list item can be determined according to the interface type identifier of each list item, and according to the target binding relationship and the view list data to be processed, corresponding data processing and rendering are performed on each list item by adopting the corresponding data type and the rendering mode, so that the type safety during data processing is effectively improved, the development efficiency can be improved, a user can set various binding relationships according to actual requirements, and the development flexibility and convenience are improved.
The present disclosure further provides a supplementary description of the apparatus provided in the above embodiments, so as to perform the method provided in the above embodiments.
As an implementable manner, on the basis of the above embodiment, optionally, the obtaining module is further configured to obtain a binding instruction of the user, where the binding instruction includes an identifier of a type of an interface to be bound, an identifier of a data class to be bound, and an identifier of a rendering manner to be bound;
and the processing module is also used for establishing the corresponding binding relationship among the interface type identifier to be bound, the data type identifier to be bound and the rendering mode identifier to be bound according to the binding indication.
Optionally, the obtaining module is further configured to obtain a data class creation instruction of the user, where the data class creation instruction includes a data class identifier to be created and a corresponding data class;
and the processing module is also used for storing the data class corresponding to the data class identification according to the data class creation instruction.
As another implementable manner, on the basis of the above embodiment, optionally, the view list data to be processed further includes attribute information corresponding to each list item;
the processing module is specifically configured to:
and for each list item, performing data preprocessing on the list item by adopting the data class corresponding to the list item according to the attribute information corresponding to the list item, obtaining list item data of a data structure suitable for display, and rendering the list item by adopting a rendering mode corresponding to the list item.
Optionally, the attribute information includes at least one of identification information of the list item, display size information of the list item, display content related information, display time information, and display mode information.
As another practicable manner, on the basis of the above embodiment, optionally, the apparatus may further include a display module.
And the display module is used for displaying the rendered list data.
The specific manner in which the various modules perform operations with respect to the apparatus in the embodiments of the present disclosure has been described in detail in relation to the embodiments of the method, and will not be described in detail herein.
It should be noted that, the modes that can be implemented in the embodiments of the present disclosure may be implemented individually, or may be implemented in combination in any combination without conflict and are not limited.
According to the processing device of the view list data, the binding relationship among the interface type, the data type and the rendering mode is preset, when the view list data needs to be processed, the target binding relationship corresponding to each list item can be determined according to the interface type identification of each list item, corresponding data processing and rendering are carried out on each list item according to the target binding relationship and the view list data to be processed by adopting the corresponding data type and the rendering mode, the type safety during data processing is effectively improved, the development efficiency can be improved, a user can set various binding relationships according to actual requirements, and the flexibility and convenience of development are improved.
Yet another embodiment of the present disclosure provides an electronic device for performing the method provided by the above embodiment. The electronic device may be a client device, such as a cell phone, tablet computer, or the like.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 50 includes: at least one processor 51 and memory 52;
the memory stores a computer program; at least one processor executes the computer program stored in the memory to implement the methods provided by the above-described embodiments.
According to the electronic equipment disclosed by the embodiment of the disclosure, by presetting the binding relationship among the interface type, the data type and the rendering mode, when the view list data needs to be processed, the target binding relationship corresponding to each list item can be determined according to the interface type identifier of each list item, and according to the target binding relationship and the view list data to be processed, corresponding data processing and rendering are performed on each list item by adopting the corresponding data type and rendering mode, so that the type safety during data processing is effectively improved, the development efficiency can be improved, a user can set various binding relationships according to actual requirements, and the development flexibility and convenience are improved.
As an exemplary embodiment, optionally, as shown in fig. 6, an exemplary structural diagram of an electronic device provided in the embodiment of the present disclosure is shown. The electronic device 800 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 6 illustrates an electronic device 800 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 through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, 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.
Yet another embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the method provided by any one of the above embodiments is implemented.
According to the computer-readable storage medium of the embodiment of the disclosure, by presetting the binding relationship among the interface type, the data type and the rendering mode, when the view list data needs to be processed, the target binding relationship corresponding to each list item can be determined according to the interface type identifier of each list item, and according to the target binding relationship and the view list data to be processed, corresponding data processing and rendering are performed on each list item by adopting the corresponding data type and rendering mode, so that the type safety during data processing is effectively improved, the development efficiency can be improved, a user can set various binding relationships according to actual requirements, and the flexibility and convenience of development are improved.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present disclosure.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (10)

1. A method for processing view list data, comprising:
acquiring view list data to be processed, wherein the view list data to be processed comprises interface type identifications of all list items in a target view list;
determining a target binding relationship corresponding to each list item according to the interface type identifier of each list item, wherein the target binding relationship comprises the corresponding relationship of the interface type identifier, the data type identifier and the rendering mode identifier;
according to the target binding relationship and the view list data to be processed, corresponding data processing and rendering are carried out on all list items by adopting corresponding data classes and rendering modes;
before obtaining the view list data to be processed, the method further comprises:
acquiring a binding instruction of a user, wherein the binding instruction comprises an interface type identifier to be bound, a data type identifier to be bound and a rendering mode identifier to be bound; establishing a corresponding binding relation among the interface type identifier to be bound, the data type identifier to be bound and the rendering mode identifier to be bound according to the binding indication;
before obtaining the binding indication of the user, the method further includes: acquiring a data class creating instruction of a user, wherein the data class creating instruction comprises a data class identifier to be created and a corresponding data class; and storing the data class corresponding to the data class identification according to the data class creation instruction.
2. The method according to claim 1, wherein the view list data to be processed further includes attribute information corresponding to each list item;
and performing corresponding data processing and rendering on each list item by adopting a corresponding data class and rendering mode according to the target binding relationship and the view list data to be processed, including:
and for each list item, performing data preprocessing on the list item by adopting the data class corresponding to the list item according to the attribute information corresponding to the list item to obtain list item data of a data structure suitable for display, and rendering the list item by adopting a rendering mode corresponding to the list item.
3. The method of claim 2, wherein the attribute information comprises at least one of identification information of the list item, presentation size information of the list item, presentation content related information, presentation time information, and presentation manner information.
4. The method according to any one of claims 1 to 3, wherein after performing corresponding data processing and rendering on each list item by using a corresponding data class and rendering manner according to the target binding relationship and the to-be-processed view list data, the method further comprises:
and displaying the rendered list data.
5. An apparatus for processing view list data, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring to-be-processed view list data which comprises interface type identifiers of all list items in a target view list;
the determining module is used for determining a target binding relationship corresponding to each list item according to the interface type identifier of each list item, wherein the target binding relationship comprises the corresponding relationship of the interface type identifier, the data type identifier and the rendering mode identifier;
the processing module is used for performing corresponding data processing and rendering on each list item by adopting a corresponding data class and rendering mode according to the target binding relation and the view list data to be processed;
the obtaining module is further configured to obtain a binding indication of a user, where the binding indication includes an identifier of a type of an interface to be bound, an identifier of a data class to be bound, and an identifier of a rendering mode to be bound;
the processing module is further used for establishing a corresponding binding relationship among the interface type identifier to be bound, the data type identifier to be bound and the rendering mode identifier to be bound according to the binding indication;
the acquisition module is further configured to acquire a data class creation instruction of a user, where the data class creation instruction includes a data class identifier to be created and a corresponding data class;
and the processing module is further used for storing the data class corresponding to the data class identifier according to the data class creation instruction.
6. The apparatus according to claim 5, wherein the view list data to be processed further includes attribute information corresponding to each list item;
the processing module is specifically configured to:
and for each list item, performing data preprocessing on the list item by adopting the data class corresponding to the list item according to the attribute information corresponding to the list item to obtain list item data of a data structure suitable for display, and rendering the list item by adopting a rendering mode corresponding to the list item.
7. The apparatus of claim 6, wherein the attribute information comprises at least one of identification information of the list item, presentation size information of the list item, presentation content related information, presentation time information, and presentation manner information.
8. The apparatus of any one of claims 5-7, further comprising:
and the display module is used for displaying the rendered list data.
9. An electronic device, comprising: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the memory-stored computer program to implement the method of any of claims 1-4.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when executed, implements the method of any of claims 1-4.
CN201910411428.8A 2019-05-16 2019-05-16 Method and device for processing view list data, electronic equipment and storage medium Active CN110109670B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910411428.8A CN110109670B (en) 2019-05-16 2019-05-16 Method and device for processing view list data, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910411428.8A CN110109670B (en) 2019-05-16 2019-05-16 Method and device for processing view list data, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110109670A CN110109670A (en) 2019-08-09
CN110109670B true CN110109670B (en) 2020-06-23

Family

ID=67490588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910411428.8A Active CN110109670B (en) 2019-05-16 2019-05-16 Method and device for processing view list data, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110109670B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026956B (en) * 2019-11-20 2021-03-23 拉扎斯网络科技(上海)有限公司 Data list processing method and device, electronic equipment and computer storage medium
CN111126027A (en) * 2019-12-25 2020-05-08 北京锐安科技有限公司 List generation method, device, equipment and medium
CN113971060B (en) * 2020-07-23 2023-10-27 抖音视界有限公司 Interface display method, device, electronic equipment and medium
CN111857718B (en) * 2020-07-29 2024-04-09 网易(杭州)网络有限公司 List editing method, device, equipment and storage medium
CN112182453A (en) * 2020-09-30 2021-01-05 北京字节跳动网络技术有限公司 Data loading method and device, computer equipment and storage medium
CN112364276A (en) * 2020-11-13 2021-02-12 四川长虹电器股份有限公司 Method for optimizing use performance of RecyclerView control
CN112882708A (en) * 2021-03-10 2021-06-01 中国民航信息网络股份有限公司 List interface implementation method and device, electronic equipment and storage medium
CN113468400B (en) * 2021-07-23 2023-11-28 平安国际智慧城市科技股份有限公司 List rendering method, device and equipment for visual webpage and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108428112A (en) * 2018-03-12 2018-08-21 武汉斗鱼网络科技有限公司 A kind of generation method of list, device, computer and storage medium
CN108664296A (en) * 2017-03-31 2018-10-16 阿里巴巴集团控股有限公司 A kind of page rendering method and apparatus, a kind of page processing method and device
CN109542878A (en) * 2018-11-21 2019-03-29 广州华多网络科技有限公司 A kind of list creation techniques and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10539936B2 (en) * 2016-10-17 2020-01-21 Fisher-Rosemount Systems, Inc. Methods and apparatus for configuring remote access of process control data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664296A (en) * 2017-03-31 2018-10-16 阿里巴巴集团控股有限公司 A kind of page rendering method and apparatus, a kind of page processing method and device
CN108428112A (en) * 2018-03-12 2018-08-21 武汉斗鱼网络科技有限公司 A kind of generation method of list, device, computer and storage medium
CN109542878A (en) * 2018-11-21 2019-03-29 广州华多网络科技有限公司 A kind of list creation techniques and device

Also Published As

Publication number Publication date
CN110109670A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
CN110109670B (en) Method and device for processing view list data, electronic equipment and storage medium
US9665841B2 (en) Cross-platform application framework
US10194288B2 (en) Sticker distribution system for messaging apps
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
US11586772B2 (en) Method and device for displaying information
US9892141B2 (en) Extensibility of collectable data structures
US20130036196A1 (en) Method and system for publishing template-based content
CN109471626B (en) Page logic structure, page generation method, page data processing method and device
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
US10719498B2 (en) Enhanced management capabilities for collectable data structures
WO2023040443A1 (en) Method and device for drawing canvas
CN107908608B (en) Method, storage medium and device for converting and displaying manuscript in three-dimensional space
CN111506300A (en) Applet generation method, device, equipment and storage medium
CA2983248C (en) Rendering graphical assets natively on multiple screens of electronic devices
CN107463406A (en) Issue the method and electronic equipment of Mobile solution
CN113010582A (en) Data processing method and device, computer readable medium and electronic equipment
CN112492399A (en) Information display method and device and electronic equipment
CN109634827A (en) Method and apparatus for generating information
CN113535304B (en) Method and device for inserting, displaying and editing third-party model in design software
CN110620805B (en) Method and apparatus for generating information
CN112306485A (en) Method and apparatus for processing stencil
CN117492757A (en) Digital twin system generation method and device, medium and electronic equipment
US10719794B2 (en) Operation support apparatus, operation support method, and non-transitory computer readable medium storing program
CN117649459A (en) Image drawing method, data generating method and device
CN118113282A (en) Page generation method, component configuration method, page display method and page display device

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