CN111782304B - Paging loading data logic control method, device, computer equipment and medium - Google Patents

Paging loading data logic control method, device, computer equipment and medium Download PDF

Info

Publication number
CN111782304B
CN111782304B CN202010705962.2A CN202010705962A CN111782304B CN 111782304 B CN111782304 B CN 111782304B CN 202010705962 A CN202010705962 A CN 202010705962A CN 111782304 B CN111782304 B CN 111782304B
Authority
CN
China
Prior art keywords
loading
data
tool
instruction
load
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
CN202010705962.2A
Other languages
Chinese (zh)
Other versions
CN111782304A (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.)
Shenzhen Saiante Technology Service Co Ltd
Original Assignee
Shenzhen Saiante Technology Service 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 Shenzhen Saiante Technology Service Co Ltd filed Critical Shenzhen Saiante Technology Service Co Ltd
Priority to CN202010705962.2A priority Critical patent/CN111782304B/en
Publication of CN111782304A publication Critical patent/CN111782304A/en
Application granted granted Critical
Publication of CN111782304B publication Critical patent/CN111782304B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The embodiment of the application belongs to the field of research and development management, and relates to a paging loading data logic control method. The application also provides a paging loading data logic control device, computer equipment and a storage medium. In addition, the present application relates to blockchain technology in which load data may be stored. According to the method and the device, the paging loading data is realized by utilizing the configured loading tool, complicated logic codes for writing the loading data are omitted for a developer, the problems of repeated data display, data disorder and the like caused by manually writing the codes can be effectively avoided, meanwhile, the development efficiency is greatly improved, and a quicker and more convenient development effect is brought for the developer.

Description

Paging loading data logic control method, device, computer equipment and medium
Technical Field
The present disclosure relates to the field of data loading optimization technologies, and in particular, to a method and apparatus for controlling page loading data logic, a computer device, and a medium.
Background
In recent years, the Android operating system is continuously developed and evolved, and intelligent terminal equipment with the Android operating system becomes an indispensable tool for ordinary people every day. Among various ways in which applications interact with users on intelligent terminal devices, displaying a variety of different types of content, including displaying text, pictures, data, etc., to users in a list form is one of the most common methods.
In general, due to performance limitation, the data to be loaded often exceeds the number of the intelligent terminal equipment which can be displayed by one page of the screen. Therefore, when a large amount of data is loaded in development, partial data is loaded firstly, when a user needs to load more data by sliding up a page again, and when the data needs to be refreshed, new data is loaded by pulling down the page, so that the aim of saving resources with better performance is achieved.
The paging loading data scheme in the market is well agreed with a background interface, and the corresponding data refreshing or more data loading is carried out in a mode of pulling down or pulling up page loading data provided for a developer through the current third party library, but the logic control of the modes is complex and templated, so that the problems of data display errors and disorder caused by manually writing logic codes are easily caused, and the development efficiency is greatly reduced.
Disclosure of Invention
The embodiment of the application aims to provide a paging loading data logic control method, a paging loading data logic control device, computer equipment and a paging loading data logic control medium, so that the problems that logic control is complicated and templet-shaped, data repetition and display errors are easy to cause by manually writing logic codes, and development efficiency is reduced in the related art are solved.
In order to solve the above technical problems, the embodiments of the present application provide a method for controlling page load data logic, which adopts the following technical scheme:
configuring a loading tool, and binding the loading tool with an adapter;
when a trigger instruction is received, loading data is obtained by calling a loading method corresponding to the trigger instruction in the loading tool, wherein the trigger instruction comprises a refreshing instruction and a loading instruction;
and configuring the acquired loading data into the adapter through the loading tool, and displaying the loading data on a list interface.
Further, the step of obtaining the loading data by calling a loading method corresponding to the trigger instruction in the loading tool specifically includes:
acquiring parameters required by loading data corresponding to the trigger instruction through the loading tool;
and executing corresponding loading operation according to the loading method and the required parameter callback network request to acquire the loading data.
Further, the step of obtaining, by the loading tool, the required parameter of the loading data corresponding to the trigger instruction specifically includes:
when the trigger instruction is a refreshing instruction, the loading tool receives first page number data displayed on a current list interface, and sets the value of the page number data to zero to obtain required parameters;
when the trigger instruction is a loading instruction, the loading tool receives second page number data displayed on the current list interface, and adds one to the value of the page number data to obtain the required parameters.
Further, after the step of obtaining the loading data according to the loading method and the step of requesting to execute the corresponding loading operation by the required parameter callback network, the method further comprises:
when the trigger instruction is a loading instruction, judging whether the data is loaded successfully or not;
if the data is loaded successfully, updating the second page number data displayed on the list interface;
and if the loading of the data fails, returning the second page data which is displayed by the list interface.
Further, the step of configuring the obtained loading data to the adapter through the loading tool and displaying the loading data on a list interface specifically includes:
when the trigger instruction is a refresh instruction, the loading tool is used for carrying out clearing processing on the content displayed on the first page number of the list interface, and sending the loading data to the adapter, and informing the list interface to display the loading data in the first page number;
and when the trigger instruction is a loading instruction, sending the loading data to the adapter through the loading tool, and informing the list interface to display the loading data in a next page of a second page number in an accumulated mode.
Further, when the trigger instruction is a load instruction, after the step of configuring the acquired load data into the adapter through the load tool and refreshing and displaying the list interface, the method further includes:
judging whether more loading data are to be processed or not;
if yes, adding one to the value of the current page number to obtain parameters required by loading data; if not, notifying the list interface that no more data need to be displayed through the loading tool.
Further, after the step of acquiring the loading data by the loading method corresponding to the trigger instruction in the loading tool, the method further includes:
storing the load data into a blockchain.
In order to solve the above technical problems, the embodiments of the present application further provide a paging load data logic control device, which adopts the following technical scheme:
the configuration module is used for configuring a loading tool and binding the loading tool with the adapter;
the loading module is used for acquiring loading data by calling a loading method corresponding to the triggering instruction in the loading tool when the triggering instruction is received, wherein the triggering instruction comprises a refreshing instruction and a loading instruction;
and the processing module is used for configuring the acquired loading data into the adapter through the loading tool and displaying the loading data on a list interface.
In order to solve the above technical problems, the embodiments of the present application further provide a computer device, which adopts the following technical schemes:
the computer device includes a memory having computer readable instructions stored therein and a processor that when executed implements the steps of the page load data logic control method described above.
In order to solve the above technical problems, embodiments of the present application further provide a computer readable storage medium, which adopts the following technical solutions:
the computer readable storage medium has stored thereon computer readable instructions which when executed by a processor implement the steps of the page load data logic control method as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
according to the method, the loading tool is configured to bind with the adapter, when a trigger instruction is received, loading data are obtained by calling a loading method corresponding to the trigger instruction in the loading tool, the obtained loading data are configured to the adapter through the loading tool, and the loading data are displayed on a list interface; according to the method and the device, the paging loading data is realized by utilizing the configured loading tool, complicated logic codes for writing the loading data are omitted for a developer, the problems of repeated data display, data disorder and the like caused by manually writing the codes can be effectively avoided, meanwhile, the development efficiency is greatly improved, and a quicker and more convenient development effect is brought for the developer.
Drawings
For a clearer description of the solution in the present application, a brief description will be given below of the drawings that are needed in the description of the embodiments of the present application, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a page load data logic control method according to the present application;
FIG. 3 is a schematic diagram illustrating one embodiment of a page load data logic control device according to the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to better understand the technical solutions of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
In order to solve the problems of complicated logic control and templet formation in the related art, and easy data repetition and display errors and reduced development efficiency caused by manually writing logic codes, the present application provides a method for controlling the logic of paging loading data, which can be applied to a system architecture 100 as shown in fig. 1, wherein the system architecture 100 can include terminal devices 101, 102 and 103, a network 104 and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the paging load data logic control method provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the paging load data logic control device is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Wherein the terminal devices 101, 102, 103 communicate with the server 105 via the network 104. When the terminal device 101, 102, 103 receives the trigger instruction, the server 105 may request to acquire the loading data by calling a loading method corresponding to the trigger instruction in the loading tool through the network, and the server 105 returns the loading data to the terminal device 101, 102, 103 for display.
With continued reference to FIG. 2, a flow diagram of one embodiment of a method of paging load data logic control according to the present application is shown. The paging loading data logic control method comprises the following steps:
step S201, configuring a loading tool, and binding the loading tool with the adapter.
In this embodiment, the loading data is presented to the user in a list form through a list interface, and the paging loading logic is implemented by the loading tool. The list interface refers to a container set containing various controls, and the loading tool is a code tool created outside the controls and not belonging to the controls for processing code logic or business logic. For example, in Android, a list interface may be understood as Activity or Fragment, including controls such as ListView, recylerView, editText, textView, dateTime.
The loading data is shown by setting data for an Adapter (Adapter), and an Android system is taken as an example for the following detailed description.
In Android, there are provided many implementation classes of adapters, for example, an ArrayAdapter adapter, which can specify a data type to be adapted through Java generic, then import the data to be adapted into a constructor, and ArrayAdapter has a plurality of reloads of constructors, and selects an appropriate one according to the actual situation.
Specifically, the manner of specifying the data type to be adapted by Java flooding is: a generic class of data is predefined, which is assigned to the adapter when it is created, i.e. the data type is determined.
In this embodiment, the adapter and the loading tool are bound, and specifically, the adapter may be set to the loading tool by calling bindAdapter (), so that the loading tool has the reference of the adapter, and the data display operation is convenient.
The loading tool is also provided with a callback method, which is used for completing data loading by calling the network to request data by the loading method in the subsequent loading tool, and in the embodiment, the callback method can be set by calling setOnRequestData ().
Step S202, when a trigger instruction is received, loading data is obtained by calling a loading method corresponding to the trigger instruction in a loading tool, wherein the trigger instruction comprises a refreshing instruction and a loading instruction.
In this embodiment, the trigger instruction is triggered by the user, and the trigger instruction includes a Refresh instruction (Refresh) and a load instruction (LoadMore), for example, the Refresh instruction may pull down a page operation, and the load instruction may be a pull up page operation. After the user triggers a refreshing or loading instruction on the list interface, correspondingly, acquiring loading data by calling a loading method corresponding to the contact instruction in the loading tool, specifically, if the user triggers the refreshing instruction, calling a page refreshing method refresh () in the loading tool to acquire refreshed data; if the user triggers the loading instruction, the loading method loadMore () in the loading tool is called to acquire the loaded data. In some optional implementations of this embodiment, the step of obtaining the loading data by calling a loading method corresponding to the trigger instruction in the loading tool specifically includes:
acquiring parameters required by loading data corresponding to the trigger instruction through a loading tool;
and executing corresponding loading operation according to the loading method and the required parameter callback network request to acquire loading data.
It should be understood that, when the trigger instruction is a refresh instruction, the loading tool receives the first page number data displayed by the current list interface, sets the value of the first page number data to zero, and obtains the required parameters, where the required parameters are pageNum and pageSize, and pageNum is the current page number and pageSize is the data volume loaded once for each page; when the trigger instruction is a loading instruction, the loading tool receives second page number data displayed on the current list interface, and adds one to the value of the second page number data to obtain required parameters, wherein the required parameters are pagenum+1 and pageSize, and the pageNum and the pageSize are the same as the above.
In this embodiment, the loading data is obtained by calling the loading method in the loading tool, but the loading method cannot independently complete the task of loading the data, and further call back the network request to obtain the loading data.
Specifically, the loading data needs to be acquired through a network request, and the network request is set outside the loading tool, when the refresh () or loadMore () in the loading tool is called to execute refreshing or loading of the data, the refresh () or loadMore () cannot realize the loading data by itself, and then the refresh () or loadMore () needs to call back the network request to help to complete.
In the embodiment, the callback is realized through a callback method preset in the loading tool, namely, the callback is performed through the loading tool, the callback method is used for realizing the calling of the external network request of the loading tool, more data callbacks are not needed, and the operation is simpler, more convenient and quicker.
In this embodiment, the execution of the corresponding loading operation is specifically: when the trigger instruction is a data refreshing instruction, executing data refreshing operation; when the trigger instruction is a load instruction, a load more data operation is performed. It should be appreciated that refreshing loads data for loading the next page to the current page in order to reload the data for the current page.
In some optional implementations of this embodiment, after the called loading method requests to execute the corresponding loading operation according to the required parameter callback network to obtain the loading data, it is determined whether the loading of the data is successful, and the corresponding operation is executed according to the determination result.
Specifically, when the trigger instruction is a loading instruction, if the loading is successful, updating the second page data displayed by the list interface; if the loading fails, the second page data displayed by the original list interface is returned, namely the original state is returned, and the next loading request is not influenced; when the trigger instruction is a refresh instruction, the first page number displayed by the list interface is unchanged no matter whether loading is successful or loading fails.
It should be emphasized that to further ensure the privacy and security of the load data, the load data may also be stored in a blockchain node.
The blockchain referred to in the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Step S203, the obtained loading data is configured into the adapter through the loading tool, and the loading data is displayed on the list interface.
In this embodiment, the loading data is obtained by the loading tool, and the obtained loading data is located outside the loading tool, so that the data needs to be transferred to the loading tool, and the loading tool executes subsequent paging logic and the loading data display status problem; by using the loading tool to load data and page logic, the code writing process can be simplified, the tedious template code can be eliminated, and the code logic error can be prevented.
Specifically, the updated or loaded data is transferred to the loading tool by calling setData () in the loading tool, the loading tool configures the acquired loading data into the adapter, and the list interface is notified to perform the updating display.
For example, in the Android system, the loading data is displayed by setting data for the adapter, so the loading data needs to be handed to the adapter for processing. It should be understood that different processes need to be performed on the loaded data, and refreshing is generally to reload the data of the page, and a clearing process needs to be performed on the previous result so as to display the data loaded by refreshing; the loading is to accumulate the loading data for later display.
It should be noted that, the adapter is generated in the list interface, and the bind adapter () is called to set to the loading tool, so that the list interface and the loading tool both have the same adapter reference, which is convenient for the data display operation.
In some optional implementations of this embodiment, configuring the obtained loading data to the adapter through the loading tool, and displaying the loading data on the list interface specifically includes:
when the trigger instruction is a refreshing instruction, the loading tool is used for carrying out clearing processing on the content displayed on the first page number of the list interface, loading data is sent to the adapter, and the list interface is informed of displaying the loading data in the first page number;
when the trigger instruction is a loading instruction, the loading tool sends loading data to the adapter, and the notification list interface displays the loading data in a next page of the second page number in an accumulated mode.
Specifically, the obtained loading data is sent to an adapter in the loading tool, the adapter in the loading tool renders the obtained loading data according to the display mode of the input loading data and the animation effect when the loading data is displayed, and as the adapter in the list interface and the adapter in the loading tool are mutually bound and have the same reference, the adapter in the loading tool obtains the loading data, and correspondingly, the adapter in the list interface also obtains the same loading data, and the adapter in the list interface notifies the display interface in the list interface of the obtained loading data according to the display mode and the rendering effect, so that the displayed loading data can be seen on a terminal screen.
In some alternative implementations of the present embodiment, when the trigger instruction is a load, following step S203, the following steps may also be performed:
judging whether loading data are needed to be processed or not through a loading tool;
if yes, adding one to the value of the second page data to obtain parameters required by loading the data; otherwise, the list interface is notified by the loading tool that no more data needs to be displayed.
In this embodiment, determining whether there is more loaded data to process specifically includes:
judging whether the second page number is the last page, if so, indicating that no more loading data need to be processed; if not, it is indicated that there are more data to be processed, and the second page count is incremented by 1, i.e., the value of the pageNum parameter is incremented by 1, in preparation for the next loading of more data.
In some optional implementations of the present embodiment, determining whether the second page number is the last page may determine whether the acquired second page number is the last page through a hasMoreData () function preset in the loading tool; specifically, the obtained required parameters further include the total number of pages of the loaded data, and the hasMoreData () function is called to determine whether the second number of pages is the last page according to the total number of pages.
According to the method, the loading tool is configured to bind with the adapter, when a trigger instruction is received, loading data are obtained by calling a loading method corresponding to the trigger instruction in the loading tool, the obtained loading data are configured to the adapter through the loading tool, and the loading data are displayed on a list interface; according to the method and the device, the paging loading data is realized by utilizing the configured loading tool, complicated logic codes for writing the loading data are omitted for a developer, the problems of repeated data display, data disorder and the like caused by manually writing the codes can be effectively avoided, meanwhile, the development efficiency is greatly improved, and a quicker and more convenient development effect is brought for the developer.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a paging load data logic control device, where an embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device may be specifically applied to various electronic devices.
As shown in fig. 3, the paging load data logic control device 300 according to the present embodiment includes: an acquisition module 301, a loading module 302 and a processing module 303. Wherein:
the configuration module 301 is configured to configure a loading tool, and bind the loading tool with the adapter;
the loading module 302 is configured to, when receiving a trigger instruction, obtain loading data by calling a loading method corresponding to the trigger instruction in a loading tool, where the trigger instruction includes a refresh instruction and a loading instruction;
the processing module 303 is configured to configure the obtained loading data into an adapter through the loading tool, and display the loading data on a list interface.
It should be emphasized that to further ensure the privacy and security of the load data, the load data may also be stored in a blockchain node.
In some alternative implementations of the present embodiment, the loading module 202 includes:
the acquisition unit is used for acquiring parameters required by the loading data corresponding to the trigger instruction through the loading tool;
and the loading unit is used for executing corresponding loading operation according to the loading method and the required parameter callback network request to acquire loading data.
In some optional implementations of the present embodiment, the obtaining unit is further configured to: when the trigger instruction is a refreshing instruction, the loading tool receives first page data displayed on the current list interface, and sets the value of the first page data to zero to obtain required parameters; when the trigger instruction is a loading instruction, the loading tool receives second page number data displayed by the list interface, and adds one to the value of the second page number data to obtain the required parameters.
In some alternative implementations of the present embodiment, the loading module 202 further includes:
the judging unit is used for judging whether the data is loaded successfully or not when the trigger instruction is a loading instruction;
the execution unit is used for updating the second page number data displayed on the list interface if the data is loaded successfully; and if the loading of the data fails, returning the second page data which is displayed by the list interface.
In some optional implementations of the present embodiment, the processing module 303 is specifically configured to: when the trigger instruction is a refresh instruction, carrying out clearing processing on the content displayed on a first page number of a list interface through a loading tool, sending loading data into an adapter, and informing the list interface to display the loading data in the first page number; and when the trigger instruction is a loading instruction, sending loading data to the adapter through a loading tool, and informing the list interface to display the loading data in a next page of the second page number in an accumulated mode.
In some optional implementations of this embodiment, the paging load data logic control device 300 further includes a determining module:
the judging module is used for judging whether the loading data are needed to be processed; if yes, adding one to the value of the second page data to obtain parameters required by loading data; if not, notifying the list interface that no more data need to be displayed through the loading tool.
According to the paging loading data logic control device, the loading tool is bound with the adapter through configuration of the loading tool, when a trigger instruction is received, loading data are obtained through calling a loading method corresponding to the trigger instruction in the loading tool, the obtained loading data are configured into the adapter through the loading tool, and the loading data are displayed on a list interface; the paging loading data is realized by utilizing the configured loading tool, complicated logic codes for writing the loading data are omitted for a developer, the problems of repeated data display, data disorder and the like caused by manually writing the codes can be effectively avoided, meanwhile, the development efficiency is greatly improved, and a quicker and more convenient development effect is brought for the developer.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It should be noted that only computer device 4 having components 41-43 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific IntegratedCircuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used for storing an operating system and various application software installed on the computer device 4, such as computer readable instructions of a page load data logic control method. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the page load data logic control method.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
According to the embodiment, the steps of the method for controlling the data loading logic of the paging embodiment are realized when the processor executes the computer readable instructions stored in the memory, the paging loading data is realized by utilizing the configured loading tool, so that complicated logic codes for writing the loading data are omitted for a developer, the problems of repeated data display, data disorder and the like caused by manually writing the codes can be effectively avoided, meanwhile, the development efficiency is greatly improved, and a quicker and more convenient development effect is brought for the developer.
The application also provides another embodiment, namely provides a computer readable storage medium, wherein the computer readable storage medium stores computer readable instructions, and the computer readable instructions can be executed by at least one processor, so that the at least one processor executes the steps of the paging loading data logic control method, and the configured loading tool is utilized to realize paging loading data, so that complicated logic codes for writing the loading data are omitted for a developer, the problems of repeated data display, data disorder and the like caused by manually writing the codes can be effectively avoided, meanwhile, the development efficiency is greatly improved, and a faster and more convenient development effect is brought for the developer.
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 software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.

Claims (9)

1. A method for controlling the logic of paging loading data, comprising the steps of:
configuring a loading tool, namely binding the loading tool with the adapter, wherein the loading tool is a code tool which is created outside a control and is used for loading data and executing paging logic;
when a trigger instruction is received, loading data is obtained by calling a loading method corresponding to the trigger instruction in the loading tool, wherein the trigger instruction comprises a refreshing instruction and a loading instruction;
the obtained loading data are configured into the adapter through the loading tool, and are displayed on a list interface;
the step of acquiring the loading data by calling a loading method corresponding to the trigger instruction in the loading tool specifically includes:
acquiring parameters required by loading data corresponding to the trigger instruction through the loading tool;
and calling a callback method callback network request in the loading tool through the loading method, and executing corresponding loading operation according to the required parameters to acquire the loading data.
2. The method for controlling page load data logic as recited in claim 1, wherein the step of obtaining, by the load tool, the required parameters of the load data corresponding to the trigger instruction comprises:
when the trigger instruction is a refreshing instruction, the loading tool receives first page number data displayed on a current list interface, and sets the value of the page number data to zero to obtain required parameters;
when the trigger instruction is a loading instruction, the loading tool receives second page number data displayed on the current list interface, and adds one to the value of the page number data to obtain the required parameters.
3. The method of claim 1, further comprising, after the step of requesting execution of the corresponding load operation to obtain the load data according to the load method and the required parameter callback network, the step of:
when the trigger instruction is a loading instruction, judging whether the data is loaded successfully or not;
if the data is loaded successfully, updating the second page number data displayed on the list interface;
and if the loading of the data fails, returning the second page data which is displayed by the list interface.
4. The method for controlling the logic of paging load data according to claim 1, wherein the step of configuring the acquired load data to the adapter through the loading tool and displaying the load data on a list interface specifically comprises:
when the trigger instruction is a refresh instruction, the loading tool is used for carrying out clearing processing on the content displayed on the first page number of the list interface, and sending the loading data to the adapter, and informing the list interface to display the loading data in the first page number;
and when the trigger instruction is a loading instruction, sending the loading data to the adapter through the loading tool, and informing the list interface to display the loading data in a next page of a second page number in an accumulated mode.
5. The method for controlling the logic of paging load data according to claim 2, wherein when the trigger instruction is a load instruction, after the step of setting the acquired load data to an adapter through the load tool to notify the list interface to refresh and display, the method further comprises:
judging whether loading data are needed to be processed or not;
if yes, adding one to the value of the second page data to obtain parameters required by loading data; if not, notifying the list interface that no more data need to be displayed through the loading tool.
6. The method for controlling the logic of paging load data according to claim 1, further comprising, after the step of obtaining load data by a load method corresponding to the trigger instruction in the load tool:
storing the load data into a blockchain.
7. A paged load data logic control device, comprising:
the configuration module is used for configuring a loading tool, binding the loading tool with the adapter, wherein the loading tool is a code tool which is created outside a control and is used for loading data and executing paging logic;
the loading module is used for acquiring loading data by calling a loading method corresponding to the triggering instruction in the loading tool when the triggering instruction is received, wherein the triggering instruction comprises a refreshing instruction and a loading instruction;
the processing module is used for configuring the acquired loading data into the adapter through the loading tool and displaying the loading data on a list interface;
wherein, the loading module includes:
the acquisition unit is used for acquiring parameters required by the loading data corresponding to the trigger instruction through the loading tool;
and the loading unit calls a callback network request of a callback method in the loading tool through the loading method, and executes corresponding loading operation according to the required parameters to acquire the loading data.
8. A computer device comprising a memory having stored therein computer readable instructions which when executed by the processor implement the steps of the paged load data logic control method of any of claims 1 to 6.
9. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the paged load data logic control method of any one of claims 1 to 6.
CN202010705962.2A 2020-07-21 2020-07-21 Paging loading data logic control method, device, computer equipment and medium Active CN111782304B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010705962.2A CN111782304B (en) 2020-07-21 2020-07-21 Paging loading data logic control method, device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010705962.2A CN111782304B (en) 2020-07-21 2020-07-21 Paging loading data logic control method, device, computer equipment and medium

Publications (2)

Publication Number Publication Date
CN111782304A CN111782304A (en) 2020-10-16
CN111782304B true CN111782304B (en) 2024-04-02

Family

ID=72763750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010705962.2A Active CN111782304B (en) 2020-07-21 2020-07-21 Paging loading data logic control method, device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN111782304B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711728B (en) * 2020-12-31 2024-02-09 百果园技术(新加坡)有限公司 Page layout frame, page loading method, device, equipment and storage medium
CN112988267A (en) * 2021-03-09 2021-06-18 北京大米科技有限公司 Loading method and device, storage medium and electronic equipment
CN113420883B (en) * 2021-06-28 2022-11-22 山东浪潮科学研究院有限公司 Method and equipment for quantum programming frame to adapt to quantum computer
CN114840284B (en) * 2021-12-31 2024-04-23 厦门市美亚柏科信息股份有限公司 Method for realizing continuous display of large-scale data for android system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411585A (en) * 2010-09-21 2012-04-11 厦门市美亚柏科信息股份有限公司 Webpage paging data pre-loading method and system
CN102495746A (en) * 2011-11-29 2012-06-13 中国航空工业集团公司第六三一研究所 Onboard embedded computer data loading method
CN105608102A (en) * 2015-10-12 2016-05-25 网易传媒科技(北京)有限公司 Page loading method and equipment
CN105740478A (en) * 2016-03-25 2016-07-06 浪潮通用软件有限公司 Non-refreshing table paging sorting achieving method and device
CN106708568A (en) * 2016-12-07 2017-05-24 微梦创科网络科技(中国)有限公司 Method and apparatus for paged loading of client contents
CN106874010A (en) * 2017-02-28 2017-06-20 山东大学 A kind of method of the quick paging loadings of ListView in android system
CN107391163A (en) * 2017-04-21 2017-11-24 阿里巴巴集团控股有限公司 page data loading method, device and application in mobile terminal
CN108153794A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 Page cache method for refreshing data, apparatus and system
CN109840115A (en) * 2017-11-27 2019-06-04 中移(杭州)信息技术有限公司 RecyclerView paging loading method and device in a kind of android system
CN109857473A (en) * 2017-11-29 2019-06-07 北京京东尚科信息技术有限公司 A kind of loading method and device of page data
CN111309325A (en) * 2020-01-22 2020-06-19 上海钧正网络科技有限公司 Method and device for reference of third-party library and mobile terminal

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411585A (en) * 2010-09-21 2012-04-11 厦门市美亚柏科信息股份有限公司 Webpage paging data pre-loading method and system
CN102495746A (en) * 2011-11-29 2012-06-13 中国航空工业集团公司第六三一研究所 Onboard embedded computer data loading method
CN105608102A (en) * 2015-10-12 2016-05-25 网易传媒科技(北京)有限公司 Page loading method and equipment
CN105740478A (en) * 2016-03-25 2016-07-06 浪潮通用软件有限公司 Non-refreshing table paging sorting achieving method and device
CN108153794A (en) * 2016-12-02 2018-06-12 阿里巴巴集团控股有限公司 Page cache method for refreshing data, apparatus and system
CN106708568A (en) * 2016-12-07 2017-05-24 微梦创科网络科技(中国)有限公司 Method and apparatus for paged loading of client contents
CN106874010A (en) * 2017-02-28 2017-06-20 山东大学 A kind of method of the quick paging loadings of ListView in android system
CN107391163A (en) * 2017-04-21 2017-11-24 阿里巴巴集团控股有限公司 page data loading method, device and application in mobile terminal
CN109840115A (en) * 2017-11-27 2019-06-04 中移(杭州)信息技术有限公司 RecyclerView paging loading method and device in a kind of android system
CN109857473A (en) * 2017-11-29 2019-06-07 北京京东尚科信息技术有限公司 A kind of loading method and device of page data
CN111309325A (en) * 2020-01-22 2020-06-19 上海钧正网络科技有限公司 Method and device for reference of third-party library and mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于Ajax技术的ASP.NET数据分页;屈武江;;计算机系统应用(第09期);第154-159页 *
屈武江 ; .基于Ajax技术的ASP.NET数据分页.计算机系统应用.2013,(第09期),第154-159页. *

Also Published As

Publication number Publication date
CN111782304A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN111782304B (en) Paging loading data logic control method, device, computer equipment and medium
CN109522751B (en) Access right control method and device, electronic equipment and computer readable medium
CN112631911A (en) Automatic testing method and device, computer equipment and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN107657155B (en) Method and device for authenticating user operation authority
CN116974927A (en) Performance automatic test method, system, computer equipment and storage medium
CN111475468A (en) Log access method, device, equipment and storage medium of newly added system
CN116112457A (en) Method, device, computer equipment and storage medium for notifying message
CN116185760A (en) Dynamic monitoring method, device, equipment and storage medium for service operation
CN115687826A (en) Page refreshing method and device, computer equipment and storage medium
CN113835790B (en) Paging page display method and device based on Android
CN112632192A (en) Node maintenance method and device, computer equipment and medium
CN114090066A (en) User interface card view generation method and device, computer equipment and medium
CN112764729A (en) Application software development method and device, computer equipment and readable storage medium
CN113448960A (en) Method and device for importing form file
CN116521630B (en) Task progress real-time display method and device, computer equipment and storage medium
CN116894736A (en) Mail management method, device, computer equipment and storage medium
CN117851014A (en) Application program calling method and device, computer equipment and storage medium
CN116467145A (en) Page performance data acquisition method and device, computer equipment and storage medium
CN116821549A (en) Page view processing method of React application and related equipment
CN115686793A (en) Scheduling method, scheduling device, computer equipment and storage medium
CN117111957A (en) Code generation method, device, computer equipment and storage medium
CN114218191A (en) System function migration method and device, computer equipment and storage medium
CN117251159A (en) Rule page generation method, device, computer equipment and storage medium
CN112631572A (en) Code display method, device, equipment and storage medium based on mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210222

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant after: Shenzhen saiante Technology Service Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Applicant before: Ping An International Smart City Technology Co.,Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant