CN115129198B - Data acquisition method and device, electronic equipment and storage medium - Google Patents

Data acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115129198B
CN115129198B CN202210660915.XA CN202210660915A CN115129198B CN 115129198 B CN115129198 B CN 115129198B CN 202210660915 A CN202210660915 A CN 202210660915A CN 115129198 B CN115129198 B CN 115129198B
Authority
CN
China
Prior art keywords
node
view
sub
target
linked list
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
CN202210660915.XA
Other languages
Chinese (zh)
Other versions
CN115129198A (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.)
China Mobile Communications Group Co Ltd
China Mobile Internet Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Internet 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 China Mobile Communications Group Co Ltd, China Mobile Internet Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210660915.XA priority Critical patent/CN115129198B/en
Publication of CN115129198A publication Critical patent/CN115129198A/en
Application granted granted Critical
Publication of CN115129198B publication Critical patent/CN115129198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons

Abstract

The application discloses a data acquisition method, a device, electronic equipment and a storage medium, belonging to the field of mobile application, wherein the method comprises the following steps: acquiring first position information of a target sub-view in a list view; determining a first target node corresponding to the target sub-view in a first linked list according to the first position information and the number of sub-views corresponding to each first node in the preset first linked list, wherein the number of sub-views corresponding to the first node is stored in advance in each first node; and according to the first target nodes, acquiring second target nodes corresponding to the first target nodes from a second preset linked list, and acquiring content data corresponding to the target sub-view from the second target nodes, wherein the second linked list is provided with the second nodes corresponding to each first node and is used for storing the content data corresponding to the sub-view.

Description

Data acquisition method and device, electronic equipment and storage medium
Technical Field
The application belongs to the field of mobile application, and particularly relates to a data acquisition method, a data acquisition device, electronic equipment and a storage medium.
Background
The list view is one of the most common container components of the mobile terminal application, and the style of the list view for showing the service is gradually enriched with the expansion of one application function. Such as a first page of social software, containing various functional content such as advertising regions, picture content, video content, search boxes, etc., interspersed with a sliding list view. In the list views commonly used at present, the types of data sources corresponding to different types of views are often inconsistent, which makes the adapter code of the multi-type list view huge. On the other hand, in product design, there is often a higher requirement on the container, for example, there is a display limitation on some special types of views of the container, mutual exclusion display of two types of views, or priority of display among several types of views, and when it is required to dynamically mask or display the content of one type of view in the list, synchronous change of the visual states of other types of views is required.
Therefore, in the conventional list view, when the view types are increased and the relationships among the view types are complex, the logic of invoking the sub-view data by the list view also generates a complex and chaotic problem.
Disclosure of Invention
The embodiment of the application provides a data acquisition method, a device, electronic equipment and a storage medium, which can solve the problem that when the types of views are increased, the logic of calling sub-view data by a list view is complicated and disordered, and can improve the efficiency of view data acquisition, management and maintenance.
In a first aspect, an embodiment of the present application provides a data acquisition method, including: acquiring first position information of a target sub-view in a list view, wherein the first position information is an arrangement position of the target sub-view in the list view; determining a first target node corresponding to the target sub-view in the first linked list according to the first position information and the number of sub-views corresponding to each first node in the preset first linked list, wherein the number of sub-views corresponding to the first node is pre-stored in each first node, the arrangement position of any sub-view in the list view is the same as the arrangement position of the sub-view in all the first nodes, the arrangement position of the sub-view in the first linked list is the sum of the arrangement number of the sub-view in the node and the number of sub-views corresponding to all the first nodes before the node of the sub-view, the first node is a visible node, the view type corresponding to the first node is a visible view type, the sub-view corresponding to the first node is a visible sub-view, and the visible sub-view can be displayed in the list view; and according to the first target nodes, acquiring second target nodes corresponding to the first target nodes from a second preset linked list, and acquiring content data corresponding to the target sub-view from the second target nodes, wherein the second linked list is provided with the second nodes corresponding to each first node and is used for storing the content data corresponding to the sub-view.
In a second aspect, an embodiment of the present application provides a data acquisition apparatus, including: the first acquisition module is used for acquiring first position information of a target sub-view in a list view, wherein the first position information is an arrangement position of the target sub-view in the list view; the determining module is configured to determine, according to the first location information and the number of sub-views corresponding to each first node in a preset first linked list, a first target node corresponding to the target sub-view in the first linked list, where each first node stores in advance the number of sub-views corresponding to the first node, an arrangement position of any sub-view in all the first nodes is the same as an arrangement position of the sub-view in the first linked list, the arrangement position of the sub-view in the first linked list is a sum value of the number of the sub-views in the node and the number of sub-views corresponding to all the first nodes before the node where the sub-view is located, the first node is a visible node, a view type corresponding to the first node is a visible view type, the sub-view corresponding to the first node is a visible sub-view, and the visible sub-view can be displayed in the list view; the second acquisition module is used for acquiring a second target node corresponding to the first target node from a second preset linked list according to the first target node, and acquiring content data corresponding to the target sub-view from the second target node, wherein the second linked list is provided with a second node corresponding to each first node and is used for storing the content data corresponding to the sub-view.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction implementing the steps of the method according to the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor perform the steps of the method according to the first aspect.
In the embodiment of the application, the first position information of the target sub-view in the list view is obtained, wherein the first position information is the arrangement position of the target sub-view in the list view; determining a first target node corresponding to a target sub-view in a first linked list according to first position information and the number of sub-views corresponding to each first node in the preset first linked list, wherein the number of sub-views corresponding to the first node is pre-stored in each first node, the arrangement position of any sub-view in the list view is the same as the arrangement position of the sub-view in the first linked list, the arrangement position of the sub-view in the first linked list is the sum value of the number of the sub-view in the node and the number of sub-views corresponding to all first nodes before the node where the sub-view is located, the first node is a visible node, the view type corresponding to the first node is a visible view type, the sub-view corresponding to the first node is a visible sub-view, and the visible sub-view can be displayed in the list view; according to the first target node, a second target node corresponding to the first target node is obtained from a second preset linked list, and content data corresponding to target sub-views are obtained from the second target node, wherein the second linked list is provided with the second node corresponding to each first node and is used for storing the content data corresponding to the sub-views, so that compatibility of multiple types of data sources with a single adapter is realized, the content data corresponding to the sub-views in the list view can be obtained from the same data source, the problem of logic complexity and confusion of calling the sub-view data by the list view can be solved, and the efficiency of view data acquisition, management and maintenance can be improved.
Drawings
Fig. 1 is a schematic flow chart of a data acquisition method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a view type node data structure according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a first linked list according to an embodiment of the present application;
FIG. 4 is a flowchart of another data acquisition method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a second linked list according to an embodiment of the present application;
FIG. 6 is a flowchart of another data acquisition method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a third linked list according to an embodiment of the present application;
FIG. 8 is a flowchart of another data acquisition method according to an embodiment of the present application;
FIG. 9 is a flowchart of another data acquisition method according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a data acquisition device according to an embodiment of the present application;
fig. 11 is a schematic structural view of an electronic device according to another embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type, and are not limited to the number of objects, such as the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The method, the device, the electronic equipment and the storage medium for acquiring data provided by the embodiment of the application are described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
The list view is one of the most commonly used container components of the mobile terminal application, is a displayed scrollable list, such as a first page of a social application, and comprises different functional contents such as advertisement areas, picture contents, video contents, search boxes and the like, which are interspersed in a sliding list view, currently, the most commonly used list view of an Android system is a multiplexing view (RecyclerView), the RecyclerView uses view types (ViewType) to distinguish different views, and the types of data sources corresponding to the views of the different view types are often inconsistent, so that the adapter code amount of the multi-type view list is huge, logic is complex, and later maintenance is difficult.
Fig. 1 illustrates a data acquisition method provided by an embodiment of the present invention, which may be performed by an electronic device, which may include: a server and/or a terminal device, wherein the terminal device may be, for example, a vehicle terminal or a mobile phone terminal, etc. In other words, the method may be performed by software or hardware installed on a television apparatus, the method comprising the steps of:
step 102: and acquiring first position information of the target sub-view in the list view.
Wherein the first position information is an arrangement position of the target sub-view in the list view
Specifically, in the list view, when the target sub-view appears in the window, the list view may determine, according to an anchor point preset in the target sub-view or an offset of the target sub-view, first location information of the target sub-view in the list view.
In this way, by acquiring the first position information of the target sub-view in the list view, the content data corresponding to the target sub-view can be acquired according to the first position information of the target sub-view in the list view.
Step 104: and determining a first target node corresponding to the target sub-view in the first linked list according to the first position information and the number of sub-views corresponding to each first node in the preset first linked list.
The method comprises the steps that each first node stores the number of sub-views corresponding to the first node in advance, the arrangement position of any sub-view in the list view is the same as the arrangement position of the sub-view in the first node in the first linked list, the arrangement position of the sub-view in the first linked list is the sum of the arrangement number of the sub-view in the node and the number of sub-views corresponding to all first nodes before the node where the sub-view is located, the first node is a visible node, the view type corresponding to the first node is a visible view type, the sub-view corresponding to the first node is a visible sub-view, and the visible sub-view can be displayed in the list view.
As an example, the sub-view type node data structure shown in fig. 2 is a schematic design diagram, where the structure has a linked list node property and is used for bearing relationship attribute preset of sub-view types, and the sub-view node may be encapsulated through a view node (view node) data structure shown in fig. 2, for example: advertisement view node (AdViewnode), system notification view node (Notifynode) and user recommended content view node (CommonViewnode), wherein each view node comprises the view type, the number of nodes corresponding to the view type and the weight of the entire list view occupied by the view type.
For example, as shown in fig. 3, a first linked list may be determined according to the child view type node data structure shown in fig. 2, where the first linked list is a permutation chain of view types included in the list view.
The adapter can be used for searching a first target node corresponding to the target sub-view and view types corresponding to the target sub-view in the first linked list.
As an example, for example, in fig. 4, the first linked list is an arrangement order list of sub-view types included in the list view, where the first linked list includes visible nodes and/or invisible nodes, the visible nodes are first nodes, and the first target nodes corresponding to the target sub-views in the first linked list may be searched through the adapter, and may start from a root node of the first linked list, and obtain the first target nodes corresponding to the target sub-views in the first linked list through the following steps.
1) And judging whether the current node is empty or not.
2) If the current node is empty, the returned target sub-view type is empty, and if the current node is not empty, whether the current node is visible or not is judged, namely whether the current node is a first node or not is judged.
3) If the current node is not visible, the current node is the next node in the first linked list, and the step 1) is executed in a return mode, if the current node is visible, namely, the current node is the first node, the number of sub views corresponding to the current node is obtained, and the size between the first position information and the number of sub views corresponding to the current node is compared.
4) If the first position information is smaller than the number of sub-views corresponding to the current node, the current node is the first target node corresponding to the target sub-view, if the first position information is larger than the number of sub-views corresponding to the current node, the first position information is converted into a value obtained by subtracting the number of sub-views corresponding to the current node from the first position information, the current node is the next node in the first linked list, and the step 1) is executed in a returning manner.
In this way, according to the first position information and the number of sub-views corresponding to each first node in the preset first linked list, the first target node corresponding to the target sub-view in the first linked list can be determined.
Step 106: and according to the first target node, acquiring a second target node corresponding to the first target node from a preset second linked list, and acquiring content data corresponding to the target sub-view from the second target node.
And the second linked list is provided with a second node corresponding to each first node and is used for storing content data corresponding to the sub-view.
Specifically, for example, as shown in fig. 5, a mode of combining a linked list and an array is adopted to store and define multiple types of sub-view content data sources, in a second linked list, the data source corresponding to each view type is stored in the second linked list as a node in an array mode, a second node corresponding to each first node is arranged in the second linked list, according to the first target node, the second target node corresponding to the first target node can be obtained from the second linked list, and the content data corresponding to the target sub-view can be obtained from the second target node.
In this way, the multi-type sub-view content data source is stored and defined in a mode of combining the linked list and the array, the second target node corresponding to the first target node can be directly obtained from the second linked list which is preset according to the first target node, the content data corresponding to the target sub-view can be obtained from the second target node, the content data corresponding to the sub-view can be directly changed in the second, the maintenance of the list view and the investigation of the problem of the list view are facilitated, the multi-type data source is compatible with a single adapter, the content data corresponding to the sub-view in the list view can be obtained from the same data source, the problem of logic complexity confusion of invoking the sub-view data by the list view can be solved, the efficiency of view data acquisition, management and maintenance can be improved, and the expansibility of the multi-type content data is improved.
In one implementation manner, after the obtaining the content data corresponding to the target sub-view from the second target node, the method further includes:
and returning the content data corresponding to the target sub-view to the list view.
Specifically, the content data corresponding to the target sub-view is returned to the list view, and the content data corresponding to the target sub-view can be displayed in the list view.
In one implementation manner, as shown in fig. 6, each first node stores in advance a view type corresponding to the first node, each first node corresponds to only one view type, and different first nodes correspond to different view types, and according to the first target node, a second target node corresponding to the first target node is obtained from a second preset linked list, and content data corresponding to the target sub-view is obtained from the second target node, including the following steps:
step 602: and determining a target view type and second position information corresponding to the target sub-view according to the first target node.
And acquiring the child view type of the designated position from the first linked list through the adapter, triggering the linked list to start recursive calculation from the root node, and returning the view type and the second position information of the target child view in the array data source in the corresponding node in the second linked list when the view type is matched with the corresponding view type.
Wherein the second position information is an order of arrangement of the target sub-views in the first target node.
As an example, as shown in fig. 4, for example, the first linked list is an arrangement order list of sub-view types included in the list view, where the first linked list includes visible nodes and/or invisible nodes, the visible nodes are first nodes, and the first target nodes corresponding to the target sub-views in the first linked list may be searched through the adapter, and the target view types and the second position information corresponding to the target sub-views may be determined from the root node of the first linked list through the following steps.
1) And judging whether the current node is empty or not.
2) If the current node is empty, the returned second position information is empty, and if the current node is not empty, whether the current node is visible or not is judged, namely whether the current node is the first node or not is judged.
3) If the current node is not visible, the current node is the next node in the first linked list, and the step 1) is executed in a return mode, if the current node is visible, namely, the current node is the first node, the number of sub views corresponding to the current node is obtained, and the size between the first position information and the number of sub views corresponding to the current node is compared.
4) If the first position information is smaller than the number of sub-views corresponding to the current node, the current node is a first target node corresponding to the target sub-view, the view type corresponding to the current node is the target view type, the first position information at the moment is the second position information, the target view type and the second position information are returned, if the first position information is larger than the number of sub-views corresponding to the current node, the first position information is converted into a value of subtracting the number of sub-views corresponding to the current node from the first position information, the current node is the next node in the first linked list, and the step 1) is executed in a returning mode.
Step 604: and acquiring the second target node from the second linked list according to the target view type.
Each second node in the second linked list stores the view type corresponding to the second node in advance, each second node only corresponds to one view type, and different second nodes correspond to different view types.
Specifically, the second linked list is directly traversed, and the second target node is obtained from the second linked list according to the type of the target view.
Step 606: and acquiring content data corresponding to the target sub-view from the second target node according to the second position information.
The arrangement order of the target sub-views in the first target node and the second target node is the same, and the second target node stores content data of sub-views with target number in advance, wherein the target number is the number of sub-views corresponding to the first target node.
Specifically, in the second linked list, content data corresponding to sub-views of the same view type are stored in the same node in the form of an array, and after the second target node is determined, the content data corresponding to the second position information is directly searched in the content data array corresponding to the sub-views in the second node according to the second position information.
In this way, the target view type and the second position information corresponding to the target sub-view are determined according to the first target node, the second target node is acquired from the second linked list according to the target view type, and the content data corresponding to the target sub-view is acquired from the second target node according to the second position information, so that the content data of sub-views with different view types can be acquired in one data source linked list, the problem that when the view types are increased, the logic of invoking the sub-view data by the list view is complex and disordered can be solved, and the efficiency of acquiring, managing and maintaining the view data can be improved.
In one implementation, the method further comprises:
when the list view is loaded or updated for the first time, according to a preset rule, determining the visibility of each third node, the visibility of the view type corresponding to each third node and the visibility of the sub-view corresponding to each third node according to attribute information of the view type corresponding to each third node in a third linked list, wherein nodes corresponding to each third node are arranged in the first linked list, the visibility of the nodes in the first linked list is the same as the visibility of the corresponding third nodes, and the attribute information comprises the weight of the view type corresponding to each third node in the list view.
For example, as shown in fig. 7, a third linked list may be determined according to the child view type node data structure shown in fig. 2, where the third linked list is a weighted sequential chain of view types included in the list view.
Specifically, when the list view is initially loaded or updated, the initialization may be performed through the adapter or the observer monitoring may be triggered, and as an example, as shown in fig. 8, when the list view is initially loaded or updated, starting from the root node of the third linked list, the preset rule may be customized according to the requirement, and expanding the preset rule, for example: the method comprises the steps of determining the visibility of each third node according to the attribute information of the view type corresponding to each third node in a third linked list, wherein the visibility comprises the following steps of:
1) Judging whether the current third node is empty or not, if so, ending the flow, and if not, judging whether the current third node accords with rules preset by all types of nodes of the list view, for example, the weight value occupied by the current third node is smaller than or equal to the residual weight value;
2) If the current third node is judged not to accord with the preset rule of each type of node of the list view, the current third node is set as an invisible node, namely the visibility of the view type corresponding to the current third node is set as invisible, the visibility of the sub view corresponding to the current third node is invisible, the residual weight value is obtained by converting the current state into the residual weight value and subtracting the weight value of the current third node, the current third node is the next third node in the third linked list, and the step 1) is executed in a return manner; if the current third node accords with the preset rule of each type of node of the list view, the current third node is set as a visible node, namely the visibility of the view type corresponding to the current third node is set as visible, the visibility of the sub view corresponding to the current third node is set as visible, the residual weight value is obtained by subtracting the weight value of the current third node from the current residual weight value, the current third node is the next third node in the third linked list, and the step 1 is executed in a return mode.
In this way, the visibility of each sub-view can be set directly through a third linked list through the preset rule, so that the setting logic is simple and effective, the maintenance efficiency and the management efficiency of the view list are improved, and the calling of the content data of the sub-view corresponding to the list view is facilitated.
In one implementation, the method further comprises:
receiving request information which is sent by the list view and used for obtaining the number of the visible sub-views; responding to the request information, and counting the total number of sub-views corresponding to the first node in the first linked list; and sending the total number of sub-views corresponding to the first node in the first linked list to the list view.
Specifically, as one, for example, as shown in fig. 9, from the root node of the first linked list, counting the total number of sub-views corresponding to the view types with visible visibility in the first linked list, that is, the total number of sub-views corresponding to the first node, includes the following steps:
1) And judging whether the current node is empty, if so, returning the total number of the visible child views, and if not, judging whether the current node is visible.
2) If the current node is visible, the number of sub-views of the current node is obtained, the total number of visible sub-views is converted into the total number of visible sub-views plus the number of sub-views of the current node, the current node is converted into the next node in the first linked list, and the step 1) is executed in a return mode, and if the current node is not visible, the current node is converted into the next node in the first linked list, and the step 1) is executed in a return mode.
Thus, the request information for acquiring the number of the visible sub-views is sent by receiving the list view; responding to the request information, and counting the total number of sub-views corresponding to the first node in the first linked list; the total number of the sub-views corresponding to the first node in the first linked list is sent to the list view, so that the number of the sub-views can be seen, and the maintenance and management of the subsequent corresponding list view are facilitated.
It should be noted that, in the data acquisition method provided in the embodiment of the present application, the execution body may be a data acquisition device, or a control module in the data acquisition device for executing the data acquisition method. In the embodiment of the present application, a method for executing data acquisition by a data acquisition device is taken as an example, and the data acquisition device provided in the embodiment of the present application is described.
Fig. 10 is a schematic structural view of a data acquisition device according to an embodiment of the present application. As shown in fig. 1000, the data acquisition apparatus 1000 includes: a first acquisition module 1010, a determination module 1020, and a second acquisition module 1030.
A first obtaining module 1010, configured to obtain first location information of a target sub-view in a list view, where the first location information is an arrangement location of the target sub-view in the list view; a determining module 1020, configured to determine, according to the first location information and the number of sub-views corresponding to each first node in a preset first linked list, a first target node corresponding to the target sub-view in the first linked list, where each first node stores in advance the number of sub-views corresponding to the first node, an arrangement position of any sub-view in the list view is the same as an arrangement position of the sub-view in all the first nodes, the arrangement position of the sub-view in the first linked list is a sum value of the number of the sub-views in the node and the number of sub-views corresponding to all the first nodes before the node where the sub-view is located, the first node is a visible node, a view type corresponding to the first node is a visible view type, the sub-view corresponding to the first node is a visible sub-view, and the visible sub-view can be displayed in the list view; the second obtaining module 1030 is configured to obtain, according to the first target nodes, a second target node corresponding to the first target node from a second preset linked list, and obtain content data corresponding to the target sub-view from the second target node, where the second linked list is provided with a second node corresponding to each first node, and is configured to store content data corresponding to the sub-view.
In one implementation, the apparatus 1000 further includes: and the sending module 1040 is configured to return content data corresponding to the target sub-view to the list view.
In one implementation, the second obtaining module 1030 is configured to: the obtaining, according to the first target node, a second target node corresponding to the first target node from a second preset linked list, and obtaining content data corresponding to the target sub-view from the second target node includes: determining a target view type and second position information corresponding to the target sub-view according to the first target node, wherein the second position information is the arrangement order of the target sub-view in the first target node; according to the target view types, acquiring the second target nodes from the second linked list, wherein each second node in the second linked list stores the view type corresponding to the second node in advance, each second node only corresponds to one view type, and different second nodes correspond to different view types; and acquiring content data corresponding to the target sub-views from the second target node according to the second position information, wherein the arrangement order of the target sub-views in the first target node and the second target node is the same, and the second target node stores content data of sub-views with target number in advance, wherein the target number is the number of sub-views corresponding to the first target node.
In one implementation, the apparatus 1000 further includes: the setting module 1050 is configured to determine, according to a preset rule, visibility of each third node, visibility of a view type corresponding to each third node, and visibility of a sub-view corresponding to each third node when the list view is initially loaded or updated, where a node corresponding to each third node is set in the first linked list, visibility of a node in the first linked list is the same as visibility of the corresponding third node, and the attribute information includes a weight of a view type corresponding to each third node in the list view.
In one implementation, the apparatus 1000 further includes: a statistics module 1060, configured to receive the request information for obtaining the number of visible sub-views sent by the list view; responding to the request information, and counting the total number of sub-views corresponding to the view types with visible visibility in the first linked list; and sending the total number of sub-views corresponding to the view types with visible visibility in the first linked list to the list view.
The data acquisition device in the embodiment of the application can be a device, and can also be a component, an integrated circuit or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a cell phone, tablet computer, notebook computer, palm computer, vehicle mounted electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device may be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and embodiments of the present application are not limited in particular.
The data acquisition device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, and the embodiment of the present application is not limited specifically.
The data acquisition device provided in the embodiment of the present application can implement each process implemented in the method embodiments of fig. 1 to 9, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 11, an electronic device 1100 is further provided according to an embodiment of the present application, including a processor 1101 and a memory 1102, where the memory 1102 stores a program or instructions executable on the processor 1101, and the program or instructions are implemented when executed by the processor 1101: acquiring first position information of a target sub-view in a list view, wherein the first position information is an arrangement position of the target sub-view in the list view; determining a first target node corresponding to the target sub-view in the first linked list according to the first position information and the number of sub-views corresponding to each first node in the preset first linked list, wherein the number of sub-views corresponding to the first node is pre-stored in each first node, the arrangement position of any sub-view in the list view is the same as the arrangement position of the sub-view in all the first nodes, the arrangement position of the sub-view in the first linked list is the sum of the arrangement number of the sub-view in the node and the number of sub-views corresponding to all the first nodes before the node of the sub-view, the first node is a visible node, the view type corresponding to the first node is a visible view type, the sub-view corresponding to the first node is a visible sub-view, and the visible sub-view can be displayed in the list view; and according to the first target nodes, acquiring second target nodes corresponding to the first target nodes from a second preset linked list, and acquiring content data corresponding to the target sub-view from the second target nodes, wherein the second linked list is provided with the second nodes corresponding to each first node and is used for storing the content data corresponding to the sub-view.
In one implementation, the content data corresponding to the target sub-view is returned to the list view.
In one implementation manner, each first node stores in advance a view type corresponding to the first node, each first node only corresponds to one view type, and different first nodes correspond to different view types; determining a target view type and second position information corresponding to the target sub-view according to the first target node, wherein the second position information is the arrangement order of the target sub-view in the first target node; according to the target view types, acquiring the second target nodes from the second linked list, wherein each second node in the second linked list stores the view type corresponding to the second node in advance, each second node only corresponds to one view type, and different second nodes correspond to different view types; and acquiring content data corresponding to the target sub-views from the second target node according to the second position information, wherein the arrangement order of the target sub-views in the first target node and the second target node is the same, and the second target node stores content data of sub-views with target number in advance, wherein the target number is the number of sub-views corresponding to the first target node.
In one implementation manner, when the list view is initially loaded or updated, according to a preset rule, determining the visibility of each third node, the visibility of the view type corresponding to each third node and the visibility of the sub-view corresponding to each third node according to attribute information of the view type corresponding to each third node in a third linked list, wherein nodes corresponding to each third node are arranged in the first linked list, the visibility of the nodes in the first linked list is the same as the visibility of the corresponding third nodes, and the attribute information comprises the weight of the view type corresponding to each third node in the list view.
In one implementation, receiving request information for obtaining the number of visible sub-views sent by the list view; responding to the request information, and counting the total number of sub-views corresponding to the view types with visible visibility in the first linked list; and sending the total number of sub-views corresponding to the view types with visible visibility in the first linked list to the list view.
The specific implementation steps can refer to the steps of the above data acquisition method embodiment, and the same technical effects can be achieved, so that repetition is avoided and no further description is provided here.
It should be noted that, the electronic device in the embodiment of the present application includes: a server, a terminal, or other devices besides a terminal.
The above electronic device structure does not constitute a limitation of the electronic device, and the electronic device may include more or less components than illustrated, or may combine some components, or may be different in arrangement of components, for example, an input unit, may include a graphics processor (Graphics Processing Unit, GPU) and a microphone, and a display unit may configure a display panel in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit includes at least one of a touch panel and other input devices. Touch panels are also known as touch screens. Other input devices may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory may be used to store software programs as well as various data. The memory may mainly include a first memory area storing programs or instructions and a second memory area storing data, wherein the first memory area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory may include volatile memory or nonvolatile memory, or the memory may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (ProgrammableROM, PROM), an erasable programmable Read-only memory (ErasablePROM, EPROM), an electrically erasable programmable Read-only memory (ElectricallyEPROM, EEPROM), or a flash memory, among others. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM).
The processor may include one or more processing units; optionally, the processor integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, and the like, and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor.
The embodiment of the application also provides a readable storage medium, on which a program or an instruction is stored, which when executed by a processor, implements each process of the above-mentioned data acquisition method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the description is omitted here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage medium such as ROM, RAM, magnetic disk or optical disk.
The embodiment of the application further provides a chip, which comprises a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used for running programs or instructions to realize the processes of the data acquisition method embodiment, and can achieve the same technical effects, so that repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (10)

1. A method of data acquisition, comprising:
acquiring first position information of a target sub-view in a list view, wherein the first position information is an arrangement position of the target sub-view in the list view;
determining a first target node corresponding to the target sub-view in the first linked list according to the first position information and the number of sub-views corresponding to each first node in the preset first linked list, wherein the number of sub-views corresponding to the first node is pre-stored in each first node, the arrangement position of any sub-view in the list view is the same as the arrangement position of the sub-view in all the first nodes, the arrangement position of the sub-view in the first linked list is the sum of the arrangement number of the sub-view in the node and the number of sub-views corresponding to all the first nodes before the node of the sub-view, the first node is a visible node, the view type corresponding to the first node is a visible view type, the sub-view corresponding to the first node is a visible sub-view, and the visible sub-view can be displayed in the list view;
According to the first target node, a second target node corresponding to the first target node is obtained from a second preset linked list, and content data corresponding to the target sub-view is obtained from the second target node, wherein the second linked list is provided with a second node corresponding to each first node and is used for storing the content data corresponding to the sub-view;
the determining the first target node corresponding to the target sub-view in the first linked list includes:
judging whether the current node is empty or not;
if the current node is empty, the returned target sub-view type is empty, and if the current node is not empty, judging whether the current node is visible or not;
if the current node is invisible, the current node is the next node in the first linked list, whether the current node is empty is continuously judged, if the current node is visible, namely, the current node is the first node, the number of sub views corresponding to the current node is obtained, and the size between the first position information and the number of the sub views corresponding to the current node is compared;
if the first position information is smaller than the number of sub-views corresponding to the current node, the current node is the first target node corresponding to the target sub-views, if the first position information is larger than the number of sub-views corresponding to the current node, the first position information is converted into a value obtained by subtracting the number of sub-views corresponding to the current node from the first position information, the current node is the next node in the first linked list, and whether the current node is empty is continuously judged.
2. The method according to claim 1, wherein after the obtaining the content data corresponding to the target sub-view from the second target node, the method further comprises:
and returning the content data corresponding to the target sub-view to the list view.
3. The method according to claim 1, wherein each first node has a view type corresponding to the first node stored in advance, and each first node corresponds to only one view type, and different first nodes correspond to different view types;
the obtaining, according to the first target node, a second target node corresponding to the first target node from a second preset linked list, and obtaining content data corresponding to the target sub-view from the second target node includes:
determining a target view type and second position information corresponding to the target sub-view according to the first target node, wherein the second position information is the arrangement order of the target sub-view in the first target node;
according to the target view types, acquiring the second target nodes from the second linked list, wherein each second node in the second linked list stores the view type corresponding to the second node in advance, each second node only corresponds to one view type, and different second nodes correspond to different view types;
And acquiring content data corresponding to the target sub-views from the second target node according to the second position information, wherein the arrangement order of the target sub-views in the first target node and the second target node is the same, and the second target node stores content data of sub-views with target number in advance, wherein the target number is the number of sub-views corresponding to the first target node.
4. The method according to claim 1, wherein the method further comprises:
when the list view is loaded or updated for the first time, according to a preset rule, determining the visibility of each third node, the visibility of the view type corresponding to each third node and the visibility of the sub-view corresponding to each third node according to attribute information of the view type corresponding to each third node in a third linked list, wherein nodes corresponding to each third node are arranged in the first linked list, the visibility of the nodes in the first linked list is the same as the visibility of the corresponding third nodes, and the attribute information comprises the weight of the view type corresponding to each third node in the list view.
5. The method according to claim 4, wherein the method further comprises:
receiving request information which is sent by the list view and used for obtaining the number of the visible sub-views;
responding to the request information, and counting the total number of sub-views corresponding to the first node in the first linked list;
and sending the total number of sub-views corresponding to the first node in the first linked list to the list view.
6. A data acquisition device, comprising:
the first acquisition module is used for acquiring first position information of a target sub-view in a list view, wherein the first position information is an arrangement position of the target sub-view in the list view;
the determining module is configured to determine, according to the first location information and the number of sub-views corresponding to each first node in a preset first linked list, a first target node corresponding to the target sub-view in the first linked list, where each first node stores in advance the number of sub-views corresponding to the first node, an arrangement position of any sub-view in the list view is the same as an arrangement position of the sub-view in all the first nodes, the arrangement position of the sub-view in the first linked list is a sum value of the number of the sub-views in the node and the number of sub-views corresponding to all the first nodes before the node where the sub-view is located, the first node is a visible node, a view type corresponding to the first node is a visible view type, the sub-view corresponding to the first node is a visible sub-view, and the visible sub-view can be displayed in the list view;
The second acquisition module is used for acquiring a second target node corresponding to the first target node from a second preset linked list according to the first target node, and acquiring content data corresponding to the target sub-view from the second target node, wherein the second linked list is provided with a second node corresponding to each first node and is used for storing the content data corresponding to the sub-view;
the determining module is specifically further configured to:
judging whether the current node is empty or not;
if the current node is empty, the returned target sub-view type is empty, and if the current node is not empty, judging whether the current node is visible or not;
if the current node is invisible, the current node is the next node in the first linked list, whether the current node is empty is continuously judged, if the current node is visible, namely, the current node is the first node, the number of sub views corresponding to the current node is obtained, and the size between the first position information and the number of the sub views corresponding to the current node is compared;
if the first position information is smaller than the number of sub-views corresponding to the current node, the current node is the first target node corresponding to the target sub-views, if the first position information is larger than the number of sub-views corresponding to the current node, the first position information is converted into a value obtained by subtracting the number of sub-views corresponding to the current node from the first position information, the current node is the next node in the first linked list, and whether the current node is empty is continuously judged.
7. The apparatus of claim 6, wherein the apparatus further comprises:
and the sending module is used for returning the content data corresponding to the target sub-view to the list view.
8. The apparatus of claim 6, wherein the second acquisition module is configured to:
the obtaining, according to the first target node, a second target node corresponding to the first target node from a second preset linked list, and obtaining content data corresponding to the target sub-view from the second target node includes:
determining a target view type and second position information corresponding to the target sub-view according to the first target node, wherein the second position information is the arrangement order of the target sub-view in the first target node;
according to the target view types, acquiring the second target nodes from the second linked list, wherein each second node in the second linked list stores the view type corresponding to the second node in advance, each second node only corresponds to one view type, and different second nodes correspond to different view types;
and acquiring content data corresponding to the target sub-views from the second target node according to the second position information, wherein the arrangement order of the target sub-views in the first target node and the second target node is the same, and the second target node stores content data of sub-views with target number in advance, wherein the target number is the number of sub-views corresponding to the first target node.
9. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which program or instruction when executed by the processor implements the steps of the data acquisition method as claimed in any one of claims 1 to 5.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the data acquisition method according to any one of claims 1-5.
CN202210660915.XA 2022-06-13 2022-06-13 Data acquisition method and device, electronic equipment and storage medium Active CN115129198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210660915.XA CN115129198B (en) 2022-06-13 2022-06-13 Data acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210660915.XA CN115129198B (en) 2022-06-13 2022-06-13 Data acquisition method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115129198A CN115129198A (en) 2022-09-30
CN115129198B true CN115129198B (en) 2023-10-27

Family

ID=83377370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210660915.XA Active CN115129198B (en) 2022-06-13 2022-06-13 Data acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115129198B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119237A (en) * 2006-07-31 2008-02-06 英业达股份有限公司 Network card testing method
CN108108089A (en) * 2016-11-24 2018-06-01 中国移动通信有限公司研究院 A kind of picture loading method and device
CN109358781A (en) * 2018-09-11 2019-02-19 北京达佳互联信息技术有限公司 Methods of exhibiting, device and the mobile terminal and storage medium of directive sending message
CN109582823A (en) * 2018-11-21 2019-04-05 平安科技(深圳)有限公司 Video information chain type storage method, device, computer equipment and storage medium
CN109739611A (en) * 2019-01-25 2019-05-10 北京城市网邻信息技术有限公司 List View method for drafting, device, terminal and storage medium
CN110246017A (en) * 2019-05-21 2019-09-17 平安普惠企业管理有限公司 Data capture method, terminal device and computer storage medium based on alliance's chain
CN111526216A (en) * 2020-07-03 2020-08-11 支付宝(杭州)信息技术有限公司 Consensus method and system in alliance chain
CN111831815A (en) * 2020-06-19 2020-10-27 东软集团股份有限公司 Questionnaire display control method and device, storage medium and electronic equipment
CN111901896A (en) * 2020-07-14 2020-11-06 维沃移动通信有限公司 Information sharing method, information sharing device, electronic equipment and storage medium
CN112214155A (en) * 2020-06-09 2021-01-12 北京沃东天骏信息技术有限公司 View information playing method, device, equipment and storage medium
CN113641872A (en) * 2021-10-18 2021-11-12 北京医百科技有限公司 Hashing method, hashing device, hashing equipment and hashing medium
CN114329720A (en) * 2021-12-30 2022-04-12 广东三维家信息科技有限公司 UI data synchronization method and device, electronic equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119237A (en) * 2006-07-31 2008-02-06 英业达股份有限公司 Network card testing method
CN108108089A (en) * 2016-11-24 2018-06-01 中国移动通信有限公司研究院 A kind of picture loading method and device
CN109358781A (en) * 2018-09-11 2019-02-19 北京达佳互联信息技术有限公司 Methods of exhibiting, device and the mobile terminal and storage medium of directive sending message
CN109582823A (en) * 2018-11-21 2019-04-05 平安科技(深圳)有限公司 Video information chain type storage method, device, computer equipment and storage medium
CN109739611A (en) * 2019-01-25 2019-05-10 北京城市网邻信息技术有限公司 List View method for drafting, device, terminal and storage medium
CN110246017A (en) * 2019-05-21 2019-09-17 平安普惠企业管理有限公司 Data capture method, terminal device and computer storage medium based on alliance's chain
CN112214155A (en) * 2020-06-09 2021-01-12 北京沃东天骏信息技术有限公司 View information playing method, device, equipment and storage medium
CN111831815A (en) * 2020-06-19 2020-10-27 东软集团股份有限公司 Questionnaire display control method and device, storage medium and electronic equipment
CN111526216A (en) * 2020-07-03 2020-08-11 支付宝(杭州)信息技术有限公司 Consensus method and system in alliance chain
CN111901896A (en) * 2020-07-14 2020-11-06 维沃移动通信有限公司 Information sharing method, information sharing device, electronic equipment and storage medium
CN113641872A (en) * 2021-10-18 2021-11-12 北京医百科技有限公司 Hashing method, hashing device, hashing equipment and hashing medium
CN114329720A (en) * 2021-12-30 2022-04-12 广东三维家信息科技有限公司 UI data synchronization method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
IPv6网络接入控制方法研究与实现;孙文胜;赵玉江;;电子器件(第05期);981-984, 988 *
卫星成像规划调度系统中的可视化决策支持研究与实现;陈慧中;王钧;李军;郭玉华;;计算机工程与科学(第07期);58-61 *

Also Published As

Publication number Publication date
CN115129198A (en) 2022-09-30

Similar Documents

Publication Publication Date Title
CN110377851A (en) Implementation method, device and the computer equipment of multistage linking combobox
US8395643B2 (en) Motion-based data review and zoom
US20140075383A1 (en) Displaying an application set identifier
CN107291352A (en) Application program is redirected in a kind of word read method and its device
CN107885823B (en) Audio information playing method and device, storage medium and electronic equipment
CN104021016A (en) Method and browser for loading browser plug-in icons
CN106874326A (en) A kind of item list obtains request processing method and device
CN112099891A (en) Popup window display method and device, electronic equipment and computer readable storage medium
CN105183853A (en) Method and device used for presenting label page
CN107391534B (en) Page display method, page file return method, page display device, page file return device and computer storage medium
US20070150485A1 (en) Navigating through a displayed hierarchical data structure
SE533322C2 (en) Method, module and apparatus for displaying graphical information
CN115129198B (en) Data acquisition method and device, electronic equipment and storage medium
CN110618797B (en) Method and device for generating character trotting horse lamp and terminal equipment
CN103761020A (en) Shortcut navigating method and device
CN114296845B (en) Interface processing method, device, electronic device and storage medium
CN114461896A (en) Information processing method, information display method, information processing device and information display device, and storage medium
CN108182202B (en) Content update notification method, content update notification device, electronic equipment and storage medium
CN111381745B (en) Page switching method, device and equipment
CN113325986A (en) Program control method, program control device, electronic device and readable storage medium
CN102609167A (en) Electronic equipment and display method thereof
CN115097988B (en) Information display method, device, computer equipment and storage medium
US11330338B2 (en) Method and system of displaying video comments, computing device, and readable storage medium
CN117389458A (en) Information input method and device and electronic equipment
CN115328602A (en) Control display method, device, equipment, medium and program product

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