CN111782304A - Logic control method and device for paging loading data, computer equipment and medium - Google Patents

Logic control method and device for paging loading data, computer equipment and medium Download PDF

Info

Publication number
CN111782304A
CN111782304A CN202010705962.2A CN202010705962A CN111782304A CN 111782304 A CN111782304 A CN 111782304A CN 202010705962 A CN202010705962 A CN 202010705962A CN 111782304 A CN111782304 A CN 111782304A
Authority
CN
China
Prior art keywords
data
loading
load
tool
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010705962.2A
Other languages
Chinese (zh)
Other versions
CN111782304B (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
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology 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

Images

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

Landscapes

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

Abstract

The embodiment of the application belongs to the field of research and development management, and relates to a logic control method for paging loading data. The application also provides a logic control device for paging loading data, computer equipment and a storage medium. In addition, the application also relates to a block chain technology, and the loading data can be stored in the block chain. According to the method and the device, the paging loading data is realized by utilizing the configured loading tool, the complex logic codes for compiling the loading data are saved for developers, the problems that the data are repeatedly displayed and the data are disordered and the like caused by manually compiling the codes can be effectively avoided, meanwhile, the development efficiency is greatly improved, and the development effect which is more rapid and convenient is brought for the developers.

Description

Logic control method and device for paging loading data, computer equipment and medium
Technical Field
The present application relates to the field of data loading optimization technologies, and in particular, to a method and an apparatus for controlling logic of paged loaded data, a computer device, and a medium.
Background
In recent years, the Android operating system is continuously developed, and an intelligent terminal device carrying the Android operating system is gradually an essential tool for ordinary people every day. In various ways of interaction between an application program and a user on an intelligent terminal device, displaying various different types of contents including characters, pictures, data and the like to the user in a list form is the most common method.
Generally, due to performance limitation, data needing to be loaded often exceeds the quantity of the intelligent terminal device which can be displayed by one page. Therefore, when a large amount of data is loaded in development, a part of data is loaded firstly, when a user needs to load more data by sliding up a page and triggering, and when the data needs to be refreshed, the page is pulled down to load new data, so that the purpose of better performance and resource saving is achieved.
The present paging loading data scheme in the market has a data interface well agreed with a background interface, and corresponding data refreshing or more data loading is performed in a pull-down or pull-up page loading data mode provided for a developer by a current third-party library, but the logic control of the modes is relatively complicated and is in a template-like mode, so that the problems of data display errors and confusion caused by manual logic code writing are easily caused, and the development efficiency is greatly reduced.
Disclosure of Invention
The embodiment of the application aims to provide a method, a device, computer equipment and a medium for controlling logic of page-wise loading data, so as to solve the problems that logic control is complicated and is templated, data repetition and display errors are easily caused by artificially compiling logic codes, and development efficiency is reduced in the related technology.
In order to solve the above technical problem, an embodiment of the present application provides a method for controlling logic of paged load data, which adopts the following technical solutions:
configuring a loading tool, and binding the loading tool with an adapter;
when a trigger instruction is received, acquiring load data by calling a load method corresponding to the trigger instruction in the load tool, wherein the trigger instruction comprises a refresh instruction and a load instruction;
and configuring the acquired loading data into the adapter through the loading tool, and displaying the acquired loading data on a list interface.
Further, the step of acquiring the load data by calling the load method corresponding to the trigger instruction in the load 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 acquiring, by the loading tool, the required parameter of the loading data corresponding to the trigger instruction specifically includes:
when the trigger instruction is a refresh instruction, the loading tool receives first page data displayed on a current list interface, and sets the value of the page data to zero to obtain a required parameter;
and 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 parameter.
Further, after the step of obtaining the loading data by executing the corresponding loading operation according to the loading method and the required parameter callback network request, the method further includes:
when the trigger instruction is a loading instruction, judging whether the data is loaded successfully;
if the data are loaded successfully, updating second page number data displayed on the list interface;
and if the data loading fails, returning the second page number data which is originally displayed on the list interface.
Further, the step of configuring the acquired loading data into 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, emptying the content displayed at the first page number of the list interface through the loading tool, sending the loaded data to the adapter, and informing the list interface to display the loaded data in the first page number;
and when the trigger instruction is a loading instruction, the loading data is sent to the adapter through the loading tool, and the list interface is informed to display the loading data in the next page of the second page 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 on the list interface, the method further includes:
judging whether more loading data are to be processed;
if so, adding one to the value of the current page number to obtain a parameter required by loading data; and if not, informing the list interface that no more data need to be displayed through the loading tool.
Further, after the step of obtaining the load data by the load method corresponding to the trigger instruction in the load tool, the method further includes:
and storing the load data into a block chain.
In order to solve the above technical problem, an embodiment of the present application further provides a device for controlling logic of paged loaded data, which adopts the following technical solutions:
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 trigger instruction in the loading tool when the trigger instruction is received, wherein the trigger instruction comprises a refresh 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 problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
the computer device comprises a memory and a processor, wherein the memory is stored with computer readable instructions, and the processor executes the computer readable instructions to realize the steps of the logic control method for paging loading data.
In order to solve the above technical problem, an embodiment of the present application further provides 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 paged load data logic control method as described above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
the method comprises the steps that a loading tool is configured, the loading tool is bound with an 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 into 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, the complex logic codes for compiling the loading data are saved for developers, the problems that the data are repeatedly displayed and the data are disordered and the like caused by manually compiling the codes can be effectively avoided, meanwhile, the development efficiency is greatly improved, and the development effect which is more rapid and convenient is brought for the developers.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram illustrating one embodiment of a method for logically controlling paged load data according to the present application;
FIG. 3 is a block diagram illustrating an embodiment of a paged load data logic control apparatus according to the present application;
FIG. 4 is a schematic block 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 application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase 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. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
In order to solve the problems of tedious logic control and template making in the related art, and easy data repetition and display error caused by manually writing logic codes, and reduced development efficiency, the present application provides a method for controlling logic of paged loaded data, which can be applied to a system architecture 100 shown in fig. 1, where the system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, 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 method for controlling logic of paged load data provided in the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the paged load data logic control apparatus 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 a server 105 over a network 104. When receiving the trigger instruction, the terminal devices 101, 102, and 103 may request the server 105 to obtain the loading data through the network by calling a loading method corresponding to the trigger instruction in the loading tool, and the server 105 returns the loading data to the terminal devices 101, 102, and 103 for display.
Continuing to refer to FIG. 2, a flow diagram of one embodiment of a method for paged load data logic control according to the present application is shown. The logic control method for paging loading data comprises the following steps:
step S201, configuring a loading tool, and binding the loading tool with the adapter.
In this embodiment, the loaded data is presented to the user in a list form through a list interface, and the paging load logic is implemented by a load tool. The list interface is a container set containing various controls, and the loading tool is a code tool which is created outside the controls, does not belong to the controls, and is used for processing code logic or business logic. For example, in Android, a list interface can be understood as Activity or Fragment, and contains controls such as ListView, RecylerView, EditText, TextView, DateTime, and the like.
It should be noted that loading data is presented by setting data for an Adapter (Adapter), and the following description takes an Android system as an example.
A plurality of implementation classes of adapters are provided in Android, for example, an ArrayAdapter adapter, which can specify the type of data to be adapted through Java generals and then transfer the data to be adapted into constructors, wherein the ArrayAdapter has reloading of a plurality of constructors, and an appropriate one is selected according to actual conditions.
Specifically, the way of specifying the data type to be adapted by the Java generic is: a data class with a generic type is predefined, and the generic type is assigned to the data class when the adapter is created, namely the data type is determined.
In this embodiment, the adapter and the loading tool are bound, and specifically, the adapter can be set to the loading tool by calling binddapt (), so that the loading tool has reference of the adapter, and data display operation is facilitated.
The loading tool is also provided with a callback method for calling back network request data to complete data loading by the loading method in the subsequent loading tool.
Step S202, when a trigger instruction is received, load data is obtained by calling a load method corresponding to the trigger instruction in a load tool, wherein the trigger instruction comprises a refresh instruction and a load instruction.
In this embodiment, the trigger instruction is triggered by a user, and the trigger instruction includes a Refresh instruction (Refresh) and a load instruction (LoadMore). After a user triggers a refresh or load instruction on a list interface, correspondingly, load data is obtained by calling a load method corresponding to the contact instruction in the load tool, specifically, if the user triggers the refresh instruction, a page refresh method refresh () in the load tool is called to obtain the refreshed data; if the user triggers the loading instruction, a loading method loadMore () in the loading tool is called to obtain the loaded data. In some optional implementation manners of this embodiment, the step of obtaining the load data by calling a load method corresponding to the trigger instruction in the load tool specifically includes:
acquiring parameters required by loading data corresponding to the trigger instruction through a loading tool;
and calling back a network request to execute corresponding loading operation according to the loading method and the required parameters to acquire the loading data.
It should be understood that the trigger instruction is different, and the required parameters for loading data are also different, for example, when the trigger instruction is a refresh instruction, the loading tool receives the first page number data displayed on the current list interface, and sets the value of the first page number data to zero to obtain the required parameters, where the required parameters are pageNum and pageSize, where pageNum is the current page number and pageSize is the amount of data loaded once per page; and 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 as described 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 data, and further callback network requests are required to obtain the loading data.
Specifically, the loaded data needs to be obtained through a network request, the network request is set outside the loading tool, and when refresh () or loadMore () in the loading tool is called to perform refreshing or loading of data, refresh () or loadMore () cannot implement loading of data, and then refresh () or loadMore () needs to call back the network request to help completion.
In this embodiment, the callback is implemented by a callback method preset in the loading tool, that is, the callback is performed by the loading tool, and this way of implementing the call to the external network request of the loading tool by the callback method does not need more data callbacks, and the operation is simpler, more convenient and faster.
In this embodiment, the executing of the corresponding load operation specifically includes: when the trigger command is a data refreshing command, executing data refreshing operation; when the trigger instruction is a load instruction, a load more data operation is performed. It should be understood that the refresh is to reload data of the current page and the load is to load data of a page next to the current page.
In some optional implementation manners of this embodiment, after the called loading method calls back the network request to execute the corresponding loading operation according to the required parameter to obtain the loading data, it is determined whether the data is loaded successfully, 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 second page number data displayed on the list interface; if the loading fails, returning the second page number data displayed on the original list interface, namely returning to the original state without influencing the next loading request; when the trigger instruction is a refresh instruction, the first page number displayed on the list interface is unchanged no matter the loading is successful or the loading is failed.
It is emphasized that, to further ensure the privacy and security of the load data, the load data may also be stored in a node of a blockchain.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Step S203, configuring the acquired loading data into the adapter through the loading tool, and displaying the configured loading data on the list interface.
In this embodiment, the load data is obtained by the loading tool, and the obtained load data is located outside the loading tool, and the data needs to be transmitted to the loading tool, and the loading tool executes subsequent paging logic and displays the status of the load data; by using a loading tool to load data and perform paging logic, the process of writing codes can be simplified, complicated template codes are eliminated, and code logic errors are prevented.
Specifically, the refreshed or loaded data is transmitted 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 refreshing display.
For example, in the Android system, the loaded data is displayed by setting data for the adapter, so the loaded data needs to be handed to the adapter for processing. It should be understood that different processing needs to be performed on the loaded data for refreshing and loading, refreshing generally refers to reloading the data of the page, and the previous result needs to be cleared so as to display the refreshed and loaded data; and the loading is to accumulate the loaded data for displaying later.
It should be noted that the adapter is generated in the list interface, and the bindeditor () is called to set the loading tool, so that both the list interface and the loading tool have references of the same adapter, thereby facilitating data display operation.
In some optional implementation manners of this embodiment, configuring the acquired load data into the adapter through the load tool, and displaying on the list interface specifically includes:
when the trigger instruction is a refresh instruction, emptying the content displayed on the first page number of the list interface through a loading tool, sending the loaded data to an adapter, and informing the list interface to display the loaded data on the first page number;
and when the trigger instruction is a loading instruction, the loading tool sends the loading data to the adapter, and the notification list interface displays the loading data in the next page of the second page in an accumulated manner.
Specifically, the acquired loading data are sent to an adapter in the loading tool, the adapter in the loading tool renders the acquired loading data according to a display mode of the incoming loading data and an animation effect when the loading data are displayed, the adapter in the list interface and the adapter in the loading tool are bound with each other and have the same reference, the adapter in the loading tool acquires the loading data, correspondingly, the adapter in the list interface also acquires the same loading data, and the adapter in the list interface displays the acquired 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 optional implementations of this embodiment, when the trigger instruction is a load, after step S203, the following steps may also be performed:
judging whether loading data to be processed exists through a loading tool;
if so, adding one to the value of the second page number data to obtain a parameter required by loading data; otherwise, the list interface is notified by the loading tool that no more data needs to be displayed.
In this embodiment, the determining whether there is any loaded data to be processed specifically includes:
judging whether the second page number is the last page, if so, indicating that no more loaded data needs to be processed; if not, the result shows that more loaded data are needed to be processed, and the second page number is added with 1, that is, the value of the pageNum parameter is added with 1 so as to prepare for loading more data next time.
In some optional implementation manners of this embodiment, determining whether the second page number is the last page may determine whether the obtained second page number is the last page through a hasMoreData () function preset in the loading tool; specifically, the acquired required parameters further include the total number of pages of the loaded data, and a hasMoredata () function is called to determine whether the second number of pages is the last page according to the total number of pages.
The method comprises the steps that a loading tool is configured, the loading tool is bound with an 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 into 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, the complex logic codes for compiling the loading data are saved for developers, the problems that the data are repeatedly displayed and the data are disordered and the like caused by manually compiling the codes can be effectively avoided, meanwhile, the development efficiency is greatly improved, and the development effect which is more rapid and convenient is brought for the developers.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, the processes of the embodiments of the methods described above can be included. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a 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, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a logic control apparatus for paging loading data, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be applied to various electronic devices.
As shown in fig. 3, the apparatus 300 for controlling logic of paged load data 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 an 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 acquired loading data into an adapter through the loading tool, and display the configured loading data on a list interface.
It is emphasized that, to further ensure the privacy and security of the load data, the load data may also be stored in a node of a blockchain.
In some optional implementations of this embodiment, the loading module 202 includes:
the acquisition unit is used for acquiring parameters required by loading data corresponding to the trigger instruction through a loading tool;
and the loading unit is used for calling back the network request to execute corresponding loading operation according to the loading method and the required parameters to acquire the loading data.
In some optional implementations of this embodiment, the obtaining unit is further configured to: when the trigger instruction is a refresh instruction, the loading tool receives first page number data displayed on a current list interface, and sets the value of the first page number data to zero to obtain required parameters; and when the trigger instruction is a loading instruction, the loading tool receives the second page number data displayed on the list interface, and adds one to the value of the second page number data to obtain the required parameter.
In some optional implementations of this 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 are loaded successfully; and if the data loading fails, returning the second page number data which is originally displayed on the list interface.
In some optional implementations of this embodiment, the processing module 303 is specifically configured to: when the trigger instruction is a refresh instruction, emptying the content displayed on the first page number of the list interface through a loading tool, sending the loaded data to the adapter, and informing the list interface to display the loaded data in the first page number; and when the trigger instruction is a loading instruction, sending the loading data to the adapter through a loading tool, and informing the list interface to display the loading data in the next page of the second page in an accumulated manner.
In some optional implementations of this embodiment, the paged load data logic control apparatus 300 further includes a determining module:
the judging module is used for judging whether loading data need to be processed; if so, adding one to the value of the second page number data to obtain a parameter required by loading data; and if not, informing the list interface that no more data need to be displayed through the loading tool.
The logic control device for paging loading data binds the loading tool with the adapter by configuring the loading tool, acquires the loading data by calling a loading method corresponding to the trigger instruction in the loading tool when receiving the trigger instruction, configures the acquired loading data into the adapter by the loading tool, and displays the loading data on a list interface; the data are loaded in a paging mode by using the configured loading tool, so that a complex logic code for compiling the loaded data is saved for a developer, the problems of repeated data display, disordered data and the like caused by manually compiling the code can be effectively solved, meanwhile, the development efficiency is greatly improved, and a faster and more convenient development effect is brought for the developer.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure 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 is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 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 (FlashCard), and the like provided on the computer device 4. Of course, the memory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, the memory 41 is generally used for storing an operating system and various application software installed on the computer device 4, such as computer readable instructions of a paging load data logic control method. Further, the memory 41 may also 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 (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, for example, execute computer readable instructions of the paged load data logic control method.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
In the embodiment, when the processor executes the computer readable instructions stored in the memory, the steps of the logic control method for paging loading data according to the embodiment are realized, and the configured loading tool is used for paging loading data, so that a complex logic code for writing the loading data is saved for a developer, the problems of repeated display of data, disorder of data and the like caused by writing the code manually can be effectively solved, meanwhile, the development efficiency is greatly improved, and a faster and more convenient development effect is brought for the developer.
The application further provides another implementation mode, namely a computer readable storage medium is provided, the computer readable storage medium stores computer readable instructions, the computer readable instructions can be executed by at least one processor, so that the at least one processor executes the steps of the logic control method for paging loading data, paging loading data are realized by utilizing a configured loading tool, tedious logic codes for writing the loading data are omitted for developers, the problems of repeated display of data, disorder of data and the like caused by writing the codes manually are effectively avoided, meanwhile, the development efficiency is greatly improved, and a faster and more convenient development effect is brought for the developers.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A method for controlling logic of a paged load data, comprising the steps of:
configuring a loading tool, and binding the loading tool with an adapter;
when a trigger instruction is received, acquiring load data by calling a load method corresponding to the trigger instruction in the load tool, wherein the trigger instruction comprises a refresh instruction and a load instruction;
and configuring the acquired loading data into the adapter through the loading tool, and displaying the acquired loading data on a list interface.
2. The method for logic control of paged load data according to claim 1, wherein the step of obtaining load data by calling a load method in the load tool corresponding to the trigger instruction specifically comprises:
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.
3. The method for logic control of paged load data according to claim 2, wherein the step of obtaining the required parameters of the load data corresponding to the trigger instruction by the load tool specifically comprises:
when the trigger instruction is a refresh instruction, the loading tool receives first page data displayed on a current list interface, and sets the value of the page data to zero to obtain a required parameter;
and 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 parameter.
4. The method for logically controlling paged load data according to claim 2, further comprising, after the step of obtaining the load data by performing the corresponding load operation according to the load method and the required parameter callback network request:
when the trigger instruction is a loading instruction, judging whether the data is loaded successfully;
if the data are loaded successfully, updating second page number data displayed on the list interface;
and if the data loading fails, returning the second page number data which is originally displayed on the list interface.
5. The method for logic control of paginated load data according to claim 1, wherein the step of configuring the acquired load data into the adapter through the load tool and displaying the acquired load data on a list interface specifically comprises:
when the trigger instruction is a refresh instruction, emptying the content displayed at the first page number of the list interface through the loading tool, sending the loaded data to the adapter, and informing the list interface to display the loaded data in the first page number;
and when the trigger instruction is a loading instruction, the loading data is sent to the adapter through the loading tool, and the list interface is informed to display the loading data in the next page of the second page in an accumulated mode.
6. The method for controlling logic of paged load data according to claim 3, wherein when the trigger instruction is a load instruction, after the step of setting the acquired load data into an adapter through the load tool and notifying the list interface to perform refresh display, the method further comprises:
judging whether loading data to be processed exists;
if so, adding one to the value of the second page number data to obtain a parameter required by loading data; and if not, informing the list interface that no more data need to be displayed through the loading tool.
7. The method for logic controlling paged 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:
and storing the load data into a block chain.
8. A logic control apparatus for paging load data, comprising:
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 trigger instruction in the loading tool when the trigger instruction is received, wherein the trigger instruction comprises a refresh 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.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor that when executed implements the method for logic controlling paged load data according to any one of claims 1 to 7.
10. A computer readable storage medium having computer readable instructions stored thereon which, when executed by a processor, implement the steps of the paged load data logic control method according to any one of claims 1 to 7.
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 true CN111782304A (en) 2020-10-16
CN111782304B 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711728A (en) * 2020-12-31 2021-04-27 百果园技术(新加坡)有限公司 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
CN113420883A (en) * 2021-06-28 2021-09-21 山东浪潮科学研究院有限公司 Method and device for quantum programming frame to adapt to quantum computer
CN114840284A (en) * 2021-12-31 2022-08-02 厦门市美亚柏科信息股份有限公司 Method for realizing large-scale data continuous display 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数据分页", 计算机系统应用, no. 09, 15 September 2013 (2013-09-15), pages 154 - 159 *
屈武江;: "基于Ajax技术的ASP.NET数据分页", 计算机系统应用, no. 09, pages 154 - 159 *

Cited By (7)

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

Also Published As

Publication number Publication date
CN111782304B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN111782304B (en) Paging loading data logic control method, device, computer equipment and medium
CN112765271B (en) Block chain transaction index storage method and device, computer equipment and medium
CN112671760A (en) Socket-based client cross-platform network communication method and related equipment thereof
CN112632071A (en) Database primary key id generation method, device, equipment and storage medium
CN111800462A (en) Micro-service instance processing method and device, computer equipment and storage medium
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112631911A (en) Automatic testing method and device, computer equipment and storage medium
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN113312135B (en) List display method and device, computer equipment and storage medium
CN107657155B (en) Method and device for authenticating user operation authority
CN112965721A (en) Android-based project compiling method and device, computer equipment and storage medium
CN112860662A (en) Data blood relationship establishing method and device, computer equipment and storage medium
CN111475388A (en) Data push test method and device, computer equipment and storage medium
CN111475468A (en) Log access method, device, equipment and storage medium of newly added system
CN111352644A (en) Applet updating method, device, server and storage medium
CN116112457A (en) Method, device, computer equipment and storage medium for notifying message
CN113835790B (en) Paging page display method and device based on Android
CN114510908A (en) Data export method and device, computer equipment and storage medium
CN112632192A (en) Node maintenance method and device, computer equipment and medium
CN112764729A (en) Application software development method and device, computer equipment and readable storage medium
CN113110846A (en) Method and device for acquiring environment variable
CN112650491A (en) Date selection modal component development method based on Reactnative and related equipment
CN112948817A (en) Permission control method and device of application program, computer equipment and medium
CN111880831A (en) Method and device for synchronously updating server, computer equipment and storage medium
CN113448960A (en) Method and device for importing form file

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
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.

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant