WO2022105682A1 - Paging data acquisition method and apparatus, electronic device, and computer readable storage medium - Google Patents

Paging data acquisition method and apparatus, electronic device, and computer readable storage medium Download PDF

Info

Publication number
WO2022105682A1
WO2022105682A1 PCT/CN2021/130261 CN2021130261W WO2022105682A1 WO 2022105682 A1 WO2022105682 A1 WO 2022105682A1 CN 2021130261 W CN2021130261 W CN 2021130261W WO 2022105682 A1 WO2022105682 A1 WO 2022105682A1
Authority
WO
WIPO (PCT)
Prior art keywords
paging
data
candidate
paging data
page
Prior art date
Application number
PCT/CN2021/130261
Other languages
French (fr)
Chinese (zh)
Inventor
廖建军
姚东伟
熊俊杰
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2022105682A1 publication Critical patent/WO2022105682A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Definitions

  • the present disclosure relates to the field of paging data acquisition, and in particular, to a method, an apparatus, an electronic device, and a computer-readable storage medium for paging data acquisition.
  • the server needs to provide paging data to the client, and it is necessary to enable the paging data to provide some personalized data, but because the page data provided by the server is in the form of a long list and sorted Fixed, which makes it difficult to operate on long lists to provide some personalized pagination data while providing paginated data.
  • an embodiment of the present disclosure provides a method for acquiring paging data, including:
  • Target paging data is obtained from the first candidate paging data and the second candidate paging data according to the paging parameter.
  • an embodiment of the present disclosure provides a device for acquiring paging data, including:
  • Parameter obtaining module used to obtain paging parameters
  • a first candidate data acquisition module configured to acquire the first candidate paging data according to the paging parameter
  • a second candidate data obtaining module configured to obtain second candidate paging data according to the paging parameter
  • a paging data acquisition module configured to obtain target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter.
  • embodiments of the present disclosure provide an electronic device, including: at least one processor; and,
  • the device is capable of performing the method of any one of the preceding first aspects.
  • an embodiment of the present disclosure provides a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the foregoing first aspect. of any of the methods described.
  • Embodiments of the present disclosure disclose a method, an apparatus, an electronic device, and a computer-readable storage medium for acquiring paging data.
  • the method for obtaining paging data includes: obtaining paging parameters; obtaining first candidate paging data according to the paging parameters; obtaining second candidate paging data according to the paging parameters; Target paging data is obtained from the second candidate paging data.
  • the above method solves the technical problem of difficulty in providing personalized paging data by acquiring and selecting candidate paging data.
  • FIG. 1 is a schematic flowchart of a method for acquiring paging data provided by an embodiment of the present disclosure
  • FIG. 2 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure
  • FIG. 3 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure
  • FIG. 4 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure
  • 5a-5g are schematic diagrams of exemplary execution processes of the method for obtaining paging data according to an embodiment of the present disclosure
  • FIG. 6 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure
  • FIG. 7 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure
  • FIG. 8 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of an embodiment of an apparatus for obtaining paging data provided by an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure.
  • the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
  • the term “based on” is “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • FIG. 1 is a flowchart of an embodiment of a method for obtaining paging data provided by an embodiment of the present disclosure.
  • the method for obtaining paging data provided in this embodiment may be executed by a paging data obtaining device, and the paging data obtaining device may be implemented as software, or Implemented as a combination of software and hardware, the paging data acquisition device can be integrated in a device in a paging data acquisition system, such as a paging data acquisition server or a paging data acquisition terminal device.
  • the method includes the following steps:
  • Step S101 obtaining paging parameters
  • the method for obtaining paging data is performed by a server, and the paging parameter is sent to the server by a client device.
  • a long page is displayed on a client device, and when the user slides the page to turn pages, the client sends a paging request to the server to request to obtain subsequent paginated data.
  • the step S101 includes:
  • Step S201 receiving a paging data request
  • Step S202 parsing the paging data request to obtain the paging parameter.
  • the paging data request includes paging parameters, wherein the paging parameters include: one or more of a flag bit, a fragment size, filtering information, and an offset; wherein the flag bit represents a page data list The starting position of the paging data in ; the fragment size represents the quantity of the target paging data; the filtering information represents the information required to filter the paging data; the offset represents the quantity of the acquired target paging data.
  • the data structure of the parameters included in the paging data request is as follows:
  • Sorting_position indicates the flag bit, which indicates that the paging data starts from the 5th position of the page data list of the server;
  • Count indicates the size of the fragment, that is, the number of target paging data required by each client is 4;
  • Filter indicates the filtering information , which may include the user's preference for using the client, the performance parameters of the client device, etc., so that the server generates corresponding filter conditions according to the filtering information, and filters out the paging data that the user does not like or may cause the client The paging data of the device crash is filtered out.
  • the filtering information can be any information, which will not be repeated here;
  • Cursor represents the offset, that is, the amount of paging data displayed by the client or the The starting position of the ordered list.
  • the ordered list in the client starts from the 5th position. Combined with the size of the shard, the client will display the order [5, 6, 7 of the ordered list]. ,8] bits of paging data.
  • Step S102 obtaining first candidate paging data according to the paging parameter
  • a first candidate paging parameter is obtained according to the paging parameter.
  • the paging parameters include flag bits and filter information, and the step S102 further includes:
  • Step S301 obtaining a page data list
  • Step S302 according to the flag bit and the filtering information, obtain the page data of the fragment size from the page data list as the first candidate page data.
  • the page data list is a list that stores all data elements in the page, and each data element represents a paging data.
  • the paging data list is data stored in the form of an array with a fixed order, wherein the data There is data structure similarity between elements.
  • the server returns the page data list to the client, and the client device parses the data elements in the list and generates a display page.
  • the data in the page data list needs to be processed to obtain target paging data.
  • step S302 the starting position of the paging data is located in the page data list through the flag bit, and the paging data is filtered one by one from the starting position of the paging data through the filtering information, until the number of the obtained paging data is the same as all the paging data.
  • the size of the fragments is the same, and the obtained paging data is the first candidate paging data.
  • the step S302 includes:
  • Step S401 generating filter conditions according to the filter information
  • Step S402 determining the starting position of the paging data in the page data list according to the flag bit
  • Step S403 according to the filter condition, obtain the page data of the fragment size from the start position of the page data in the page data list as the first candidate page data.
  • step S401 the server generates filter conditions according to the filtering information, for example, the filtering information is that the user does not like pictures of ball games, the user's client device cannot play videos with a frame rate higher than 60, etc.
  • the server integrates these The filter information generates filter conditions to filter the obtained paging data.
  • step S402 the starting position of the paging data in the page data list is determined according to the flag bit. As shown in Figure 5a, if the flag bit is 5, the start position of the page data in the page data list can be located at 5 through the flag bit.
  • step S403 according to the filtering condition, starting from the paging data indicated by the starting position of the paging data, the paging data in the page list is filtered one by one, the paging data satisfying the filtering condition is excluded, and the paging data that does not satisfy the filtering condition is excluded.
  • Conditional paging data is retained until the number of retained paging data is equal to the size of the shard.
  • an intrusive condition can also be added, and the intrusive condition can be generated by the intrusive information in the page parameters or generated independently of the page parameters. Add the strong insertion mark and the strong insertion position to the paging data.
  • the first candidate paging data only includes: does not satisfy the filter Conditional paging data and paging data that do not meet the insertion conditions.
  • the step S403 includes:
  • Step S601 initialize the paging window
  • Step S602 obtaining paging data from the starting position of the paging data in the page data list according to the filter condition until the size of the paging window is equal to the size of the fragment;
  • Step S603 taking the paging data in the paging window as the first candidate paging data.
  • a paging window is initialized, and the size of the paging window can be dynamically adjusted to determine the range of the first candidate paging data.
  • the size of the paging window is initialized to 0, that is, in the initial state, there is no first candidate paging data that meets the conditions.
  • Figures 5b-5d are examples of acquiring the first candidate paging data in steps S602 and S603.
  • the starting position of the paging data is 5, then starting from the fifth position of the page data list, it is judged whether the paging data in the fifth position satisfies the filtering condition. In this example, the paging data in the fifth position does not satisfy the filtering condition. If the condition should be reserved, the fifth-bit paging data is the paging data in the first candidate paging data, and the size of the paging window is incremented by 1.
  • the paging data in the sixth position and the paging data in the eighth position are paging data that satisfies the filtering conditions, which will not increase the size of the paging window, and the paging data in the seventh position does not satisfy the filtering conditions.
  • Conditional paging data so it is reserved, then the size of the paging window is 2; in this example, the detection of intrusive data is also added, as shown in Figure 5d, when traversing to the ninth bit of paging data, the detection The paging data up to the ninth position is strong insertion data.
  • the intrusive data needs to be processed separately at this time, so it is not included in the first candidate paging.
  • the window size remains unchanged at this time, and the traversal continues; as shown in Figure 5e, the 10th and 11th paging data do not meet the filtering conditions, and they are not interpolated data, so they are included in the first candidate paging data,
  • the size of the paging window is accumulated to 4, which is the same as the size of the shard, and it stops continuing to traverse the data backwards.
  • the paging data in the paging window that does not satisfy the filtering conditions and is not the intrusive data is the first candidate paging data.
  • Step S103 obtaining second candidate paging data according to the paging parameter
  • the second candidate paging data is paging data that needs to be inserted between other paging data, such as the strongly inserted data described in the above example.
  • the intrusive data is pre-set paging data with an intrusive mark.
  • the second candidate paging data also needs to be screened by filter conditions, so optionally, the step S103 includes:
  • Step S701 generating filter conditions according to the filter information
  • Step S702 obtaining at least one paging data that meets the strong insertion condition
  • Step S703 Obtain page data that does not meet the filtering condition from the at least one page data that meets the strong insertion condition as second candidate page data.
  • the filtering conditions in the step S701 may be the same as the filtering conditions in the foregoing step S401, and details are not described herein again.
  • the filtering conditions in step S701 may also be different from those in step S401, for example, new filtering conditions are generated according to the filtering information and other preset information.
  • step S702 at least one paging data that complies with the intrusive insertion condition is obtained.
  • the intrusive insertion condition can be a combination of logical conditions or a flag bit, so that the paging data that needs to be intruded can be found from the paging data. .
  • the paging data that meets the intrusive insertion condition may be paging data in the page data list, or may be separately stored intrusive data.
  • the quantity and insertion position of intrusive data in each page can also be preset. For example, there are two intrusive data in the paging data of each shard, and the insertion position is before the other two paging data. When there are 4 paging data, the 1st and 3rd paging data in the paging are intrusive data, and the 2nd and 4th paging data are normal paging data in the paging data.
  • step S703 the acquired intrusive data is filtered using the above filtering conditions, and the intrusive data that does not meet the filtering conditions is used as the second candidate paging data.
  • the intrusive data is the paging data in the page data list, and it is assumed that there are 2 intrusive data in each page, since the ninth paging data has been determined in the previous step as The data is forced to be inserted, so it is directly judged whether it satisfies the filter conditions.
  • the paging data of the 9th position does not meet the filter conditions, so the inserted data is retained, and then the next forced insertion data is obtained, and the paging of the 14th position is obtained.
  • the data is interpolated data, but the interpolated data satisfies the filtering conditions, so the 14th paging data is not retained; continue to obtain the next interpolated data, and the 15th paging data is obtained as strong interpolated data and does not meet the filtering conditions, thus
  • the 9th and 15th paging data obtained are the interpolated data that needs to be inserted into the current paging. That is, in this example, the ninth and 15th paging data are the second candidate paging data.
  • Step S104 Obtain target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter.
  • the first candidate paging data and the second candidate paging data are combined and intercepted through paging parameters to obtain target paging data.
  • the target paging data is the paging data in the current paging.
  • the paging parameter includes the fragment size
  • the step S104 further includes:
  • Step S801 obtaining the insertion position of the second candidate paging data
  • Step S802 inserting the second candidate paging data into the first candidate paging data according to the insertion position to obtain candidate paging data
  • Step S803 Cut out the target paging data from the candidate paging data according to the fragment size.
  • the insertion position of the second candidate paging data is obtained according to the offset, where the offset is the starting position of the paging data of the paging data in the client.
  • the offset Cursor is 5, Since the fragment size of a page is 4, the page data corresponds to the position ["5", “6", “7", “8”] in the ordered list in the client, as shown in Figure 5f, The first interpolated data "9” is inserted at position "5" in the ordered list, the second interpolated data "14” is inserted at position "6" in the ordered list, and the third interpolated data "15” is inserted at position "7" in the ordered list.
  • step S803 the candidate page data is intercepted by using the fragment size.
  • the fragment size is 4, the first 4 page data ["9", “5", “15”, “7”] are intercepted from the candidate page data as the target page data.
  • the server returns the obtained target paging data to the client, so that the client displays the target paging data. Therefore, according to the client sending paging data requests multiple times, the server returns corresponding target paging data according to the above method, so that the server can return the target paging data in a personalized manner to obtain a personalized paging page.
  • step S104 it also includes:
  • the flag bit in the paging parameter is updated according to the target paging data.
  • the flag bit in the next paging parameter is obtained according to the position of the last paging data in the target paging data.
  • the last paging data in the target paging data is the position "7”
  • the first paging data after the paging data of the position "7” is the paging data of the position "10”
  • the next paging parameter The flag bits in are set to "10".
  • the flag bit in the paging parameter is sent to the client together with the target paging data, so that the client displays the paging page according to the target paging data, and sets the flag in the next paging data request according to the flag bit.
  • Pagination parameters are sent to the client together with the target paging data, so that the client displays the paging page according to the target paging data, and sets the flag in the next paging data request according to the flag bit.
  • the paging data in the page data list will not be deleted.
  • the filtered paging data will not be returned to the client, but it is still stored in the page data list. Move according to the position after the intrusion.
  • the last paging data in the paging window is set at the last bit of the paging window, that is, the last page data in the paging window cannot be filtered out.
  • the filtered paging data can be directly intercepted, so as to prevent repeated paging data filtering when the next paging data is requested.
  • the paging data in the 15th position is inserted before the paging data in the 7th position. Since the paging data in the 7th position is the last qualified paging data in the paging window, it is moved after the paging data in the 8th position.
  • the 8th bit paging data can be directly intercepted, otherwise when calculating the next flag bit, it will be calculated as position 8, then when the target paging data is acquired next time, it is necessary to repeatedly filter the 8th bit. Paginated data.
  • Embodiments of the present disclosure disclose a method, an apparatus, an electronic device, and a computer-readable storage medium for acquiring paging data.
  • the method for obtaining paging data includes: obtaining paging parameters; obtaining first candidate paging data according to the paging parameters; obtaining second candidate paging data according to the paging parameters; Target paging data is obtained from the second candidate paging data.
  • the above method solves the technical problem of difficulty in providing personalized paging data by acquiring and selecting candidate paging data.
  • FIG. 9 is a schematic structural diagram of an embodiment of an apparatus for acquiring paging data provided by an embodiment of the present disclosure.
  • the apparatus 900 includes: a parameter acquisition module 901 , a first candidate data acquisition module 902 , a second candidate data acquisition module 903 and a paging data acquisition module 904 . in,
  • a first candidate data obtaining module 902 configured to obtain first candidate paging data according to the paging parameter
  • the paging data obtaining module 904 is configured to obtain target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter.
  • parameter acquisition module 901 is also used for:
  • the paging parameter is obtained by parsing the paging data request.
  • the paging parameters include: one or more of a flag bit, a fragment size, filtering information and an offset; wherein the flag bit represents the start position of the page data in the page data list; the fragment size Indicates the quantity of the target paging data; the filtering information represents the information required for filtering the paging data; the offset represents the quantity of the acquired target paging data.
  • first candidate data acquisition module 902 is also used for:
  • the page data of the fragment size is obtained from the page data list as the first candidate page data.
  • first candidate data acquisition module 902 is also used for:
  • the page data of the fragment size is acquired from the start position of the page data in the page data list as the first candidate page data.
  • first candidate data acquisition module 902 is also used for:
  • the paging data in the paging window is used as the first candidate paging data.
  • the first candidate paging data includes:
  • the second candidate data acquisition module 903 is also used for:
  • the page data that does not meet the filtering condition is obtained from the at least one page data that meets the strong insertion condition as the second candidate page data.
  • the paging parameter includes the fragment size
  • the paging data acquisition module 904 is further used for:
  • the target page data is cut out from the candidate page data according to the fragment size.
  • the paging data acquisition device 900 is also used for:
  • the flag bit in the paging parameter is updated according to the target paging data.
  • the apparatus shown in FIG. 9 may execute the method of the embodiment shown in FIG. 1 to FIG. 8 .
  • the apparatus shown in FIG. 9 may execute the method of the embodiment shown in FIG. 1 to FIG. 8 .
  • parts not described in detail in this embodiment reference may be made to the related description of the embodiment shown in FIG. 1 to FIG. 8 .
  • For the execution process and technical effects of the technical solution refer to the descriptions in the embodiments shown in FIG. 1 to FIG. 8 , which will not be repeated here.
  • Terminal devices in the embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (eg, mobile terminals such as in-vehicle navigation terminals), etc., and stationary terminals such as digital TVs, desktop computers, and the like.
  • the electronic device shown in FIG. 10 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • an electronic device 1000 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 1001, which may be loaded into random access according to a program stored in a read only memory (ROM) 1002 or from a storage device 1008 Various appropriate operations and processes are executed by the programs in the memory (RAM) 1003 . In the RAM 1003, various programs and data necessary for the operation of the electronic device 1000 are also stored.
  • the processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004.
  • An input/output (I/O) interface 1005 is also connected to the bus 1004 .
  • the following devices can be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration
  • An output device 1007 such as a computer
  • a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.
  • the communication means 1009 may allow the electronic device 1000 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 10 shows electronic device 1000 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication device 1009, or from the storage device 1008, or from the ROM 1002.
  • the processing apparatus 1001 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: executes the method for acquiring paging data in the foregoing embodiment.
  • Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation of the unit itself under certain circumstances.
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • a method for acquiring paging data including:
  • Target paging data is obtained from the first candidate paging data and the second candidate paging data according to the paging parameter.
  • the obtaining paging parameters includes:
  • the paging parameter is obtained by parsing the paging data request.
  • the paging parameters include: one or more of a flag bit, a fragment size, filtering information and an offset; wherein the flag bit represents the start position of the page data in the page data list; the fragment size Indicates the quantity of the target paging data; the filtering information represents the information required for filtering the paging data; the offset represents the quantity of the acquired target paging data.
  • the paging parameter includes the flag bit and the filtering information
  • the obtaining the first candidate paging data according to the paging parameter includes:
  • the page data of the fragment size is obtained from the page data list as the first candidate page data.
  • the page data of the fragment size obtained from the page data list is used as the first candidate page data, including:
  • the page data of the fragment size is acquired from the start position of the page data in the page data list as the first candidate page data.
  • the obtaining, according to the filter condition, the paging data of the fragment size from the starting position of the paging data in the page data list as the first candidate paging data includes:
  • the paging data in the paging window is used as the first candidate paging data.
  • the first candidate paging data includes:
  • obtaining the second candidate paging data according to the paging parameter includes:
  • the page data that does not satisfy the filtering condition is obtained from the at least one page data that meets the strong insertion condition as the second candidate page data.
  • the paging parameter includes a fragment size
  • the obtaining target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter includes:
  • the target page data is cut out from the candidate page data according to the fragment size.
  • the method also includes:
  • the flag bit in the paging parameter is updated according to the target paging data.
  • an apparatus for acquiring paging data including:
  • Parameter obtaining module used to obtain paging parameters
  • a first candidate data acquisition module configured to acquire the first candidate paging data according to the paging parameter
  • a second candidate data obtaining module configured to obtain second candidate paging data according to the paging parameter
  • a paging data acquisition module configured to obtain target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter.
  • parameter acquisition module is also used for:
  • the paging parameter is obtained by parsing the paging data request.
  • the paging parameters include: one or more of a flag bit, a fragment size, filtering information and an offset; wherein the flag bit represents the start position of the page data in the page data list; the fragment size Indicates the quantity of the target paging data; the filtering information represents the information required for filtering the paging data; the offset represents the quantity of the acquired target paging data.
  • the first candidate data acquisition module is also used for:
  • the page data of the fragment size is obtained from the page data list as the first candidate page data.
  • the first candidate data acquisition module is also used for:
  • the page data of the fragment size is acquired from the start position of the page data in the page data list as the first candidate page data.
  • the first candidate data acquisition module is also used for:
  • the paging data in the paging window is used as the first candidate paging data.
  • the first candidate paging data includes:
  • the second candidate data acquisition module is also used for:
  • the page data that does not satisfy the filtering condition is obtained from the at least one page data that meets the strong insertion condition as the second candidate page data.
  • the paging parameter includes a fragment size
  • the paging data acquisition module is further used for:
  • the target page data is cut out from the candidate page data according to the fragment size.
  • the paging data acquisition device is also used for:
  • the flag bit in the paging parameter is updated according to the target paging data.
  • an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores data that can be accessed by the at least one processor Instructions executed by at least one processor, the instructions being executed by the at least one processor, so that the at least one processor can execute any one of the methods for obtaining paging data in the foregoing first aspect.
  • a non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the foregoing Any one of the method for obtaining paging data in the first aspect.

Abstract

A paging data acquisition method and apparatus, an electronic device, and a computer readable storage medium. The paging data acquisition method comprises: acquiring paging parameters(S101); acquiring first candidate paging data according to the paging parameters (S102); acquiring second candidate paging data according to the paging parameters (S103); and acquiring target paging data from among the first candidate paging data and the second candidate paging data according to the paging parameters (S104). In the method, the candidate paging data is acquired, and a selection is performed on the candidate paging data, such that the technical problem of difficulty in providing personalized paging data is solved.

Description

分页数据获取方法、装置、电子设备及计算机可读存储介质Paging data acquisition method, device, electronic device, and computer-readable storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2020年11月18日提交的、申请号为202011294529.0、发明名称为“分页数据获取方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,该申请的全文通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on November 18, 2020, the application number is 202011294529.0, and the invention name is "paging data acquisition method, device, electronic device and computer-readable storage medium", the full text of the application Incorporated herein by reference.
技术领域technical field
本公开涉及分页数据获取领域,尤其涉及一种分页数据获取方法、装置、电子设备及计算机可读存储介质。The present disclosure relates to the field of paging data acquisition, and in particular, to a method, an apparatus, an electronic device, and a computer-readable storage medium for paging data acquisition.
背景技术Background technique
随着网络技术的发展,互联网用户们迎来了移动终端时代,更高的带宽让移动端智能设备同时展示的信息越来越多,众多的数据难以同时展示在同一页面之内,为了兼顾用户体验和产品效果,客户端应用产品更倾向于选择以分页显示的方法呈现内容。同时,为了满足用户的个性化需求,客户端产品的场景趋于复杂,常见的情况是根据用户的特性和商业化需求,在呈现的元素集合中过滤或者增加特定的内容。With the development of network technology, Internet users have ushered in the era of mobile terminals. Higher bandwidth allows smart devices to display more and more information at the same time. It is difficult to display a lot of data on the same page at the same time. In order to take account of users In terms of experience and product effects, client-side application products are more inclined to choose the method of paging display to present content. At the same time, in order to meet the personalized needs of users, the scenarios of client products tend to be more complex. It is common to filter or add specific content in the presented element set according to the characteristics and commercialization needs of users.
在一些场景中,客户端向用户分页展示,需要服务端向客户端提供分页数据,并且需要使得分页数据能够提供一些个性化的数据,但是由于服务端提供的页面数据为长列表形式,且排序固定,这就给在提供分页数据的同时对长列表操作以提供一些个性化的分页数据带来了困难。In some scenarios, when the client displays paging to the user, the server needs to provide paging data to the client, and it is necessary to enable the paging data to provide some personalized data, but because the page data provided by the server is in the form of a long list and sorted Fixed, which makes it difficult to operate on long lists to provide some personalized pagination data while providing paginated data.
发明内容SUMMARY OF THE INVENTION
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。This Summary is provided to introduce concepts in a simplified form that are described in detail in the Detailed Description section that follows. This summary section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.
为了解决上述技术问题,本公开实施例提出如下技术方案。In order to solve the above technical problems, the embodiments of the present disclosure propose the following technical solutions.
第一方面,本公开实施例提供一种分页数据获取方法,包括:In a first aspect, an embodiment of the present disclosure provides a method for acquiring paging data, including:
获取分页参数;Get paging parameters;
根据所述分页参数获取第一候选分页数据;Obtain the first candidate paging data according to the paging parameter;
根据所述分页参数获取第二候选分页数据;Acquire second candidate paging data according to the paging parameter;
根据所述分页参数从所述第一候选分页数据和所述第二候选分页数据中得到目标分页数据。Target paging data is obtained from the first candidate paging data and the second candidate paging data according to the paging parameter.
第二方面,本公开实施例提供一种分页数据获取装置,包括:In a second aspect, an embodiment of the present disclosure provides a device for acquiring paging data, including:
参数获取模块,用于获取分页参数;Parameter obtaining module, used to obtain paging parameters;
第一候选数据获取模块,用于根据所述分页参数获取第一候选分页数据;a first candidate data acquisition module, configured to acquire the first candidate paging data according to the paging parameter;
第二候选数据获取模块,用于根据所述分页参数获取第二候选分页数据;A second candidate data obtaining module, configured to obtain second candidate paging data according to the paging parameter;
分页数据获取模块,用于根据所述分页参数从所述第一候选分页数据和第二候选分页数据中得到目标分页数据。A paging data acquisition module, configured to obtain target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter.
第三方面,本公开实施例提供一种电子设备,包括:至少一个处理器;以及,In a third aspect, embodiments of the present disclosure provide an electronic device, including: at least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有能被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述第一方面中的任一所述的方法。a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one process The device is capable of performing the method of any one of the preceding first aspects.
第四方面,本公开实施例提供一种非暂态计算机可读存储介质,其特征在 于,该非暂态计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行前述第一方面中的任一所述的方法。In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the foregoing first aspect. of any of the methods described.
本公开实施例公开了一种分页数据获取方法、装置、电子设备和计算机可读存储介质。其中该分页数据获取方法包括:获取分页参数;根据所述分页参数获取第一候选分页数据;根据所述分页参数获取第二候选分页数据;根据所述分页参数从所述第一候选分页数据和所述第二候选分页数据中得到目标分页数据。上述方法通过获取候选的分页数据并对候选的分页数据进行选取,解决了提供个性化分页数据困难的技术问题。Embodiments of the present disclosure disclose a method, an apparatus, an electronic device, and a computer-readable storage medium for acquiring paging data. The method for obtaining paging data includes: obtaining paging parameters; obtaining first candidate paging data according to the paging parameters; obtaining second candidate paging data according to the paging parameters; Target paging data is obtained from the second candidate paging data. The above method solves the technical problem of difficulty in providing personalized paging data by acquiring and selecting candidate paging data.
上述说明仅是本公开技术方案的概述,为了能更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为让本公开的上述和其他目的、特征和优点能够更明显易懂,以下特举较佳实施例,并配合附图,详细说明如下。The above description is only an overview of the technical solutions of the present disclosure. In order to understand the technical means of the present disclosure more clearly, it can be implemented according to the content of the description, and to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand , the following specific preferred embodiments, and in conjunction with the accompanying drawings, are described in detail as follows.
附图说明Description of drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent when taken in conjunction with the accompanying drawings and with reference to the following detailed description. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
图1为本公开实施例提供的分页数据获取方法的流程示意图;1 is a schematic flowchart of a method for acquiring paging data provided by an embodiment of the present disclosure;
图2为本公开实施例提供的分页数据获取方法的进一步流程示意图;FIG. 2 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure;
图3为本公开实施例提供的分页数据获取方法的进一步流程示意图;FIG. 3 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure;
图4为本公开实施例提供的分页数据获取方法的进一步流程示意图;FIG. 4 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure;
图5a-图5g为本公开实施例提供的分页数据获取方法的执行过程示例示意图;5a-5g are schematic diagrams of exemplary execution processes of the method for obtaining paging data according to an embodiment of the present disclosure;
图6为本公开实施例提供的分页数据获取方法的进一步流程示意图;FIG. 6 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure;
图7为本公开实施例提供的分页数据获取方法的进一步流程示意图;FIG. 7 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure;
图8为本公开实施例提供的分页数据获取方法的进一步流程示意图;FIG. 8 is a further schematic flowchart of the method for obtaining paging data according to an embodiment of the present disclosure;
图9为本公开实施例提供的分页数据获取装置的实施例的结构示意图;9 is a schematic structural diagram of an embodiment of an apparatus for obtaining paging data provided by an embodiment of the present disclosure;
图10为根据本公开实施例提供的电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for the purpose of A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes, and are not intended to limit the protection scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and/or in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this regard.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "including" and variations thereof are open-ended inclusions, ie, "including but not limited to". The term "based on" is "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or interdependence.
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "a" and "a plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, they should be understood as "one or a plurality of". multiple".
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of these messages or information.
图1为本公开实施例提供的分页数据获取方法实施例的流程图,本实施例提供的该分页数据获取方法可以由一分页数据获取装置来执行,该分页数据获取装置可以实现为软件,或者实现为软件和硬件的组合,该分页数据获取装置可以集成设置在分页数据获取系统中的某设备中,比如分页数据获取服务器或者分页数据获取终端设备中。如图1所示,该方法包括如下步骤:1 is a flowchart of an embodiment of a method for obtaining paging data provided by an embodiment of the present disclosure. The method for obtaining paging data provided in this embodiment may be executed by a paging data obtaining device, and the paging data obtaining device may be implemented as software, or Implemented as a combination of software and hardware, the paging data acquisition device can be integrated in a device in a paging data acquisition system, such as a paging data acquisition server or a paging data acquisition terminal device. As shown in Figure 1, the method includes the following steps:
步骤S101,获取分页参数;Step S101, obtaining paging parameters;
可选的,所述分页数据获取方法由服务端执行,所述分页参数由客户端设备发送至所述服务端。示例性的,在客户端设备展示长页面的分页面,当用户滑动页面进行翻页时,所述客户端发送分页请求至所述服务端,以请求获得后续分页的数据。Optionally, the method for obtaining paging data is performed by a server, and the paging parameter is sent to the server by a client device. Exemplarily, a long page is displayed on a client device, and when the user slides the page to turn pages, the client sends a paging request to the server to request to obtain subsequent paginated data.
如图2所示,可选的,所述步骤S101包括:As shown in FIG. 2, optionally, the step S101 includes:
步骤S201,接收分页数据请求;Step S201, receiving a paging data request;
步骤S202,解析所述分页数据请求得到所述分页参数。Step S202, parsing the paging data request to obtain the paging parameter.
可选的,所述分页数据请求中包括分页参数,其中所述分页参数包括:标志位、分片大小、过滤信息以及偏移量中的一个或多个;其中所述标志位表示页面数据列表中的分页数据开始位置;所述分片大小表示目标分页数据的数量;所述过滤信息表示过滤所述分页数据所需要的信息;所述偏移量表示已获取的目标分页数据的数量。Optionally, the paging data request includes paging parameters, wherein the paging parameters include: one or more of a flag bit, a fragment size, filtering information, and an offset; wherein the flag bit represents a page data list The starting position of the paging data in ; the fragment size represents the quantity of the target paging data; the filtering information represents the information required to filter the paging data; the offset represents the quantity of the acquired target paging data.
示例性的,所述分页数据请求中包括参数的数据结构如下:Exemplarily, the data structure of the parameters included in the paging data request is as follows:
Figure PCTCN2021130261-appb-000001
Figure PCTCN2021130261-appb-000001
其中Sorting_position表示标志位,其表示该分页数据从服务端的页面数据列表的第5位开始;Count表示分片的大小,即每次客户端需要的目标分页数据的数量为4个;Filter表示过滤信息,其中可以包括使用客户端的用户的偏 好、客户端设备的性能参数等等,以使得服务端根据所述过滤信息生成对应的过滤条件,将用户不喜欢的分页数据过滤掉或者将可能导致客户端设备崩溃的分页数据过滤掉,可以理解的,所述过滤信息可以是任何信息,在此不再赘述;Cursor表示偏移量,即所述客户端已经展示的分页数据的数量或者客户端中的有序列表的起始位置,如上述示例中,所述客户端中的有序列表从第5位开始,结合分片大小,所述客户端将展示有序列表的第[5,6,7,8]位的分页数据。Among them, Sorting_position indicates the flag bit, which indicates that the paging data starts from the 5th position of the page data list of the server; Count indicates the size of the fragment, that is, the number of target paging data required by each client is 4; Filter indicates the filtering information , which may include the user's preference for using the client, the performance parameters of the client device, etc., so that the server generates corresponding filter conditions according to the filtering information, and filters out the paging data that the user does not like or may cause the client The paging data of the device crash is filtered out. It is understandable that the filtering information can be any information, which will not be repeated here; Cursor represents the offset, that is, the amount of paging data displayed by the client or the The starting position of the ordered list. As in the above example, the ordered list in the client starts from the 5th position. Combined with the size of the shard, the client will display the order [5, 6, 7 of the ordered list]. ,8] bits of paging data.
可以理解的,上述分页参数仅为举例,在实际使用时,所述分页参数可以根据需要进行增减,在此不再赘述。It can be understood that the above paging parameters are only examples, and in actual use, the paging parameters can be increased or decreased as required, and details are not described herein again.
步骤S102,根据所述分页参数获取第一候选分页数据;Step S102, obtaining first candidate paging data according to the paging parameter;
在该步骤中,根据分页参数得到第一候选分页参数。如图3所示,可选的,所述分页参数包括标志位和过滤信息,所述步骤S102进一步包括:In this step, a first candidate paging parameter is obtained according to the paging parameter. As shown in FIG. 3 , optionally, the paging parameters include flag bits and filter information, and the step S102 further includes:
步骤S301,获取页面数据列表;Step S301, obtaining a page data list;
步骤S302,根据所述标志位和过滤信息从所述页面数据列表中获取分片大小个分页数据作为所述第一候选分页数据。Step S302 , according to the flag bit and the filtering information, obtain the page data of the fragment size from the page data list as the first candidate page data.
其中,所述页面数据列表是保存页面中的所有数据元素的列表,每个数据元素表示一个分页数据,示例性的,所述分页数据列表是以数组形式存储且排序固定的数据,其中的数据元素之间具有数据结构相似性。对于一般的页面展示方式来说,服务端将所述页面数据列表返回给客户端,客户端设备解析所述列表中的数据元素并生成展示页面。而在本公开的技术方案中,需要对所述页面数据列表中的数据进行处理以得到目标分页数据。Wherein, the page data list is a list that stores all data elements in the page, and each data element represents a paging data. Exemplarily, the paging data list is data stored in the form of an array with a fixed order, wherein the data There is data structure similarity between elements. For a general page display method, the server returns the page data list to the client, and the client device parses the data elements in the list and generates a display page. In the technical solution of the present disclosure, however, the data in the page data list needs to be processed to obtain target paging data.
在步骤S302中,通过所述标志位在所述页面数据列表中定位出分页数据的开始位置,通过过滤信息从所述分页数据开始位置挨个过滤分页数据,直至得到的分页数据的个数与所述分片大小相同,所得到的分页数据即为所述第一候选分页数据。In step S302, the starting position of the paging data is located in the page data list through the flag bit, and the paging data is filtered one by one from the starting position of the paging data through the filtering information, until the number of the obtained paging data is the same as all the paging data. The size of the fragments is the same, and the obtained paging data is the first candidate paging data.
可选的,如图4所示,所述步骤S302包括:Optionally, as shown in FIG. 4 , the step S302 includes:
步骤S401,根据所述过滤信息生成过滤条件;Step S401, generating filter conditions according to the filter information;
步骤S402,根据所述标志位确定所述页面数据列表中的分页数据开始位置;Step S402, determining the starting position of the paging data in the page data list according to the flag bit;
步骤S403,根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取所述分片大小个分页数据作为所述第一候选分页数据。Step S403, according to the filter condition, obtain the page data of the fragment size from the start position of the page data in the page data list as the first candidate page data.
在步骤S401中,服务端根据所述过滤信息生成过滤条件,如过滤信息为用户不喜欢球类运动的图片、用户的客户端设备无法播放帧率高于60的视频等等,服务端综合这些过滤信息生成过滤条件以对获取到的分页数据进行过滤。In step S401, the server generates filter conditions according to the filtering information, for example, the filtering information is that the user does not like pictures of ball games, the user's client device cannot play videos with a frame rate higher than 60, etc. The server integrates these The filter information generates filter conditions to filter the obtained paging data.
在步骤S402,根据标志位确定所述分页数据在所述页面数据列表中的分页数据开始位置。如图5a所示,标志位为5,则通过标志位可以定位分页数据在页面数据列表的分页数据开始位置为5。In step S402, the starting position of the paging data in the page data list is determined according to the flag bit. As shown in Figure 5a, if the flag bit is 5, the start position of the page data in the page data list can be located at 5 through the flag bit.
在步骤S403中,根据所述过滤条件,从所述分页数据开始位置所指示的分页数据开始,挨个过滤所述页面列表中的分页数据,将满足过滤条件的分页数据排除掉,将不满足过滤条件的分页数据保留,直至保留下来的分页数据的个数等于所述分片大小。可选的,在该步骤中,还可以加入强插条件,所述强插条件可是通过页面参数中的强插信息生成或者独立于页面参数生成,如强插条件可以是一个标记,如预先在分页数据上加入强插标记以及强插的位置,如果在遍历分页数据时发现分页数据具有强插标记,则也暂时将其过滤掉,即所述第一候选分页数据中只包括:不满足过滤条件的分页数据以及不满足强插条件的分页数据。In step S403, according to the filtering condition, starting from the paging data indicated by the starting position of the paging data, the paging data in the page list is filtered one by one, the paging data satisfying the filtering condition is excluded, and the paging data that does not satisfy the filtering condition is excluded. Conditional paging data is retained until the number of retained paging data is equal to the size of the shard. Optionally, in this step, an intrusive condition can also be added, and the intrusive condition can be generated by the intrusive information in the page parameters or generated independently of the page parameters. Add the strong insertion mark and the strong insertion position to the paging data. If it is found that the paging data has the strong insertion mark when traversing the paging data, it will also be temporarily filtered out, that is, the first candidate paging data only includes: does not satisfy the filter Conditional paging data and paging data that do not meet the insertion conditions.
可选的,如图6所示,所述步骤S403包括:Optionally, as shown in FIG. 6 , the step S403 includes:
步骤S601,初始化分页窗口;Step S601, initialize the paging window;
步骤S602,根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取分页数据直至所述分页窗口的大小等于所述分片大小;Step S602, obtaining paging data from the starting position of the paging data in the page data list according to the filter condition until the size of the paging window is equal to the size of the fragment;
步骤S603,将所述分页窗口内的分页数据作为所述第一候选分页数据。Step S603, taking the paging data in the paging window as the first candidate paging data.
在步骤S601中,初始化分页窗口,所述分页窗口的大小能够动态调整,以确定出第一候选分页数据的范围。所述分页窗口的大小被初始化成0,即初始状态时,没有符合条件的第一候选分页数据。In step S601, a paging window is initialized, and the size of the paging window can be dynamically adjusted to determine the range of the first candidate paging data. The size of the paging window is initialized to 0, that is, in the initial state, there is no first candidate paging data that meets the conditions.
如图5b-5d为步骤S602和步骤S603中获取第一候选分页数据的示例。如图5b所示,分页数据开始位置为5,则从页面数据列表的第5位开始,判断所述第5位分页数据是否满足过滤条件,在该示例中,第5位分页数据不满足过滤条件,应该被保留,则第5位分页数据为所述第一候选分页数据中的分页数据,分页窗口的大小累加1。依此类推,如图5c所示,第6位分页数据和第8位分页数据为满足过滤条件的分页数据,其不会增加所述分页窗口的大小,第7位置的分页数据是不满足过滤条件的分页数据,因此被保留,则此时分页窗口的大小为2;在该示例中,还加入了强插数据的检测,如图5d所示,在遍历到第9位分页数据时,检测到第9位分页数据为强插数据,如其符合强插条件或者第9位的分页数据中带有强插标记等,此时强插数据需要单独进行处理,因此也不计入第一候选分页数据中,此时窗口大小不变,继续向后遍历;如图5e所示,第10和11位分页数据不满足过滤条件,并且也不是强插数据,因此计入第一候选分页数据中,此时分页窗口大小累加到4,与分片大小相同,停止继续向后遍历数据。此时,分页窗口内不满足过滤条件以及不是强插数据的分页数据即为第一候选分页数据。Figures 5b-5d are examples of acquiring the first candidate paging data in steps S602 and S603. As shown in Figure 5b, the starting position of the paging data is 5, then starting from the fifth position of the page data list, it is judged whether the paging data in the fifth position satisfies the filtering condition. In this example, the paging data in the fifth position does not satisfy the filtering condition. If the condition should be reserved, the fifth-bit paging data is the paging data in the first candidate paging data, and the size of the paging window is incremented by 1. And so on, as shown in Figure 5c, the paging data in the sixth position and the paging data in the eighth position are paging data that satisfies the filtering conditions, which will not increase the size of the paging window, and the paging data in the seventh position does not satisfy the filtering conditions. Conditional paging data, so it is reserved, then the size of the paging window is 2; in this example, the detection of intrusive data is also added, as shown in Figure 5d, when traversing to the ninth bit of paging data, the detection The paging data up to the ninth position is strong insertion data. If it meets the strong insertion conditions or the paging data in the ninth position has an intrusive insertion mark, etc., the intrusive data needs to be processed separately at this time, so it is not included in the first candidate paging. In the data, the window size remains unchanged at this time, and the traversal continues; as shown in Figure 5e, the 10th and 11th paging data do not meet the filtering conditions, and they are not interpolated data, so they are included in the first candidate paging data, At this time, the size of the paging window is accumulated to 4, which is the same as the size of the shard, and it stops continuing to traverse the data backwards. At this time, the paging data in the paging window that does not satisfy the filtering conditions and is not the intrusive data is the first candidate paging data.
步骤S103,根据所述分页参数获取第二候选分页数据;Step S103, obtaining second candidate paging data according to the paging parameter;
可选的,所述第二候选分页数据为需要插入到其他分页数据之间的分页数据,如上述示例中所述的强插数据。示例性的,所述强插数据为预先设置好的,带有强插标记的分页数据。Optionally, the second candidate paging data is paging data that needs to be inserted between other paging data, such as the strongly inserted data described in the above example. Exemplarily, the intrusive data is pre-set paging data with an intrusive mark.
第二候选分页数据也需要经过过滤条件的筛选,因此可选的,所述步骤S103包括:The second candidate paging data also needs to be screened by filter conditions, so optionally, the step S103 includes:
步骤S701,根据所述过滤信息生成过滤条件;Step S701, generating filter conditions according to the filter information;
步骤S702,获取至少一个符合强插条件的分页数据;Step S702, obtaining at least one paging data that meets the strong insertion condition;
步骤S703,从所述至少一个符合强插条件的分页数据中获取不满足所述过滤条件的分页数据作为第二候选分页数据。Step S703: Obtain page data that does not meet the filtering condition from the at least one page data that meets the strong insertion condition as second candidate page data.
所述步骤S701中的过滤条件可以与上述步骤S401中的过滤条件相同,在此不再赘述。或者,所述步骤S701中的过滤条件也可以与步骤S401中不同,如根据所述过滤信息与其他预设的信息来生成新的过滤条件。The filtering conditions in the step S701 may be the same as the filtering conditions in the foregoing step S401, and details are not described herein again. Alternatively, the filtering conditions in step S701 may also be different from those in step S401, for example, new filtering conditions are generated according to the filtering information and other preset information.
在步骤S702中,获取至少一个符合强插条件的分页数据,如上所述,强插条件可以是逻辑条件的组合或者是一个标志位,由此可以从分页数据中查找出需要强插的分页数据。所述符合强插条件的分页数据可以是所述页面数据列表中的分页数据,也可以是单独存储的强插数据。强插数据在每个分页中的数量以及插入位置也可以预先设定,如每个分片的分页数据中有两个强插数据,插入位置为另外两个分页数据之前,如当一个分页中有4个分页数据时,该分页中第1、3个分页数据为强插数据,第2、4个分页数据为分页数据中的正常分页数据。In step S702, at least one paging data that complies with the intrusive insertion condition is obtained. As mentioned above, the intrusive insertion condition can be a combination of logical conditions or a flag bit, so that the paging data that needs to be intruded can be found from the paging data. . The paging data that meets the intrusive insertion condition may be paging data in the page data list, or may be separately stored intrusive data. The quantity and insertion position of intrusive data in each page can also be preset. For example, there are two intrusive data in the paging data of each shard, and the insertion position is before the other two paging data. When there are 4 paging data, the 1st and 3rd paging data in the paging are intrusive data, and the 2nd and 4th paging data are normal paging data in the paging data.
在步骤S703中,使用上述过滤条件对获取到的强插数据进行过滤,将不满足所述过滤条件的强插数据作为第二候选分页数据。如图5f所示,在该示例中,强插数据为页面数据列表中的分页数据,设每个分页中有2个强插数据,由于第9位的分页数据已经在之前的步骤中确定为强插数据,因此直接判断其是否满足过滤条件,在该示例中,第9位的分页数据不满足过滤条件,因此保留该强插数据,之后继续获取下一个强插数据,得到第14位分页数据为强插数据,但是该强插数据满足过滤条件,因此不保留第14位分页数据;继续获取下一个强插数据,得到第15位分页数据为强插数据且不满足过滤条件,由此得到第9位和第15位分页数据为需要插入到当前分页中的强插数据。即在该示例中,第9位和第15位分页数据即为所述第二候选分页数据。In step S703, the acquired intrusive data is filtered using the above filtering conditions, and the intrusive data that does not meet the filtering conditions is used as the second candidate paging data. As shown in Figure 5f, in this example, the intrusive data is the paging data in the page data list, and it is assumed that there are 2 intrusive data in each page, since the ninth paging data has been determined in the previous step as The data is forced to be inserted, so it is directly judged whether it satisfies the filter conditions. In this example, the paging data of the 9th position does not meet the filter conditions, so the inserted data is retained, and then the next forced insertion data is obtained, and the paging of the 14th position is obtained. The data is interpolated data, but the interpolated data satisfies the filtering conditions, so the 14th paging data is not retained; continue to obtain the next interpolated data, and the 15th paging data is obtained as strong interpolated data and does not meet the filtering conditions, thus The 9th and 15th paging data obtained are the interpolated data that needs to be inserted into the current paging. That is, in this example, the ninth and 15th paging data are the second candidate paging data.
步骤S104,根据所述分页参数从所述第一候选分页数据和所述第二候选分 页数据中得到目标分页数据。Step S104: Obtain target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter.
在该步骤中,通过分页参数将所述第一候选分页数据和第二候选分页数据进行合并截取以得到目标分页数据。其中,所述目标分页数据为当前分页中的分页数据。In this step, the first candidate paging data and the second candidate paging data are combined and intercepted through paging parameters to obtain target paging data. Wherein, the target paging data is the paging data in the current paging.
如图8所示,可选的,所述分页参数包括所述分片大小,所述步骤S104进一步包括:As shown in FIG. 8 , optionally, the paging parameter includes the fragment size, and the step S104 further includes:
步骤S801,获取第二候选分页数据的插入位置;Step S801, obtaining the insertion position of the second candidate paging data;
步骤S802,根据所述插入位置将所述第二候选分页数据插入所述第一候选分页数据得到候选分页数据;Step S802, inserting the second candidate paging data into the first candidate paging data according to the insertion position to obtain candidate paging data;
步骤S803,根据所述分片大小从所述候选分页数据中截取出所述目标分页数据。Step S803: Cut out the target paging data from the candidate paging data according to the fragment size.
可选的,根据所述偏移量得到第二候选分页数据的插入位置,所述偏移量为客户端中分页数据的分页数据开始位置,如在上述示例中,偏移量Cursor为5,由于一个分页的分片大小为4,因此分页数据对应于客户端中的有序列表中的位置[“5”,“6”,“7”,“8”],则如图5f所示,第一个强插数据“9”插入到有序列表中的位置“5”上,第二个强插数据“14”插入到有序列表中的位置“6”上,第三个强插数据“15”插入到有序列表中的位置“7”上。由于强插数据“14”满足过滤条件,因此将其过滤掉。在所述页面数据列表中,由于“5”被“9”占用,因此“5”移动到“6”的位置,“6”的位置的分页数据满足过滤条件,被过滤掉。“7”的位置被“15”的分页数据占用,因此“7”位置的分页数据向后移动到“8”的位置,“8”的位置的分页数据满足过滤条件,被过滤掉。经过上述步骤S801和步骤S802,得到候选分页数据[“9”,“5”,“15”,“7”,“10”,“11”]。Optionally, the insertion position of the second candidate paging data is obtained according to the offset, where the offset is the starting position of the paging data of the paging data in the client. For example, in the above example, the offset Cursor is 5, Since the fragment size of a page is 4, the page data corresponds to the position ["5", "6", "7", "8"] in the ordered list in the client, as shown in Figure 5f, The first interpolated data "9" is inserted at position "5" in the ordered list, the second interpolated data "14" is inserted at position "6" in the ordered list, and the third interpolated data "15" is inserted at position "7" in the ordered list. Since the interpolated data "14" satisfies the filter condition, it is filtered out. In the page data list, since "5" is occupied by "9", "5" is moved to the position of "6", and the paging data at the position of "6" satisfies the filter condition and is filtered out. The position of "7" is occupied by the paging data of "15", so the paging data of the position of "7" is moved backward to the position of "8", and the paging data of the position of "8" satisfies the filtering conditions and is filtered out. After the above steps S801 and S802, candidate paging data ["9", "5", "15", "7", "10", "11"] are obtained.
在步骤S803中,使用所述分片大小对候选分页数据进行截取。如上述示例中,分片大小为4,则从所述候选分页数据中截取前4个分页数据 [“9”,“5”,“15”,“7”]作为目标分页数据。In step S803, the candidate page data is intercepted by using the fragment size. As in the above example, if the fragment size is 4, the first 4 page data ["9", "5", "15", "7"] are intercepted from the candidate page data as the target page data.
服务端将得到的目标分页数据返回给客户端,使得客户端展示所述目标分页数据。由此,根据客户端多次发送分页数据请求,服务端根据上述方法分别返回对应的目标分页数据,使得服务端能够个性化的返回目标分页数据以得到个性化的分页页面。The server returns the obtained target paging data to the client, so that the client displays the target paging data. Therefore, according to the client sending paging data requests multiple times, the server returns corresponding target paging data according to the above method, so that the server can return the target paging data in a personalized manner to obtain a personalized paging page.
进一步的,在所述步骤S104之后,还包括:Further, after the step S104, it also includes:
根据所述目标分页数据更新所述分页参数中的标志位。The flag bit in the paging parameter is updated according to the target paging data.
可选的,根据目标分页数据中最后一个分页数据的位置得到下一个分页参数中的标志位。如图5g中所示,目标分页数据中最后一个分页数据为位置“7”,位置“7”的分页数据之后的第一个分页数据为位置“10”的分页数据,因此将下一个分页参数中的标志位设置为“10”。Optionally, the flag bit in the next paging parameter is obtained according to the position of the last paging data in the target paging data. As shown in Figure 5g, the last paging data in the target paging data is the position "7", and the first paging data after the paging data of the position "7" is the paging data of the position "10", so the next paging parameter The flag bits in are set to "10".
可选的,所述分页参数中的标志位与所述目标分页数据一起发送至客户端,使得客户端根据所述目标分页数据展示分页页面,根据所述标志位设置下一分页数据请求中的分页参数。Optionally, the flag bit in the paging parameter is sent to the client together with the target paging data, so that the client displays the paging page according to the target paging data, and sets the flag in the next paging data request according to the flag bit. Pagination parameters.
可选的,所述页面数据列表中的分页数据不会被删除,如被过滤的掉的分页数据,仅仅是不返回给客户端,但是其本身仍然保存在所述页面数据列表中,其位置根据强插之后的位置进行移动。Optionally, the paging data in the page data list will not be deleted. For example, the filtered paging data will not be returned to the client, but it is still stored in the page data list. Move according to the position after the intrusion.
在上述基础上,可选的,为了能够不重复进行分页数据的过滤,分页窗口中的最后一个分页数据设置在该分页窗口的最后一位,即分页窗口中的最后一个页面数据不能是过滤掉的数据,这样在进行分页数据截取时,可以直接将过滤掉的分页数据截取掉,防止在下一分页数据请求时,重复进行分页数据的过滤。如图5f中,第15位的分页数据插入到第7位的分页数据之前,由于第7位的分页数据为分页窗口中最后一个合格的分页数据,因此将其移动到第8位分页数据之后,这样在截取分页数据时,可以直接将第8位分页数据截取掉,否则在计算下一个标志位时,会计算成位置8,则在下一次获取目标分页数据时, 需要重复过滤第8位的分页数据。On the basis of the above, optionally, in order not to repeat the filtering of paging data, the last paging data in the paging window is set at the last bit of the paging window, that is, the last page data in the paging window cannot be filtered out. In this way, when paging data is intercepted, the filtered paging data can be directly intercepted, so as to prevent repeated paging data filtering when the next paging data is requested. As shown in Figure 5f, the paging data in the 15th position is inserted before the paging data in the 7th position. Since the paging data in the 7th position is the last qualified paging data in the paging window, it is moved after the paging data in the 8th position. , in this way, when intercepting the paging data, the 8th bit paging data can be directly intercepted, otherwise when calculating the next flag bit, it will be calculated as position 8, then when the target paging data is acquired next time, it is necessary to repeatedly filter the 8th bit. Paginated data.
本公开实施例公开了一种分页数据获取方法、装置、电子设备和计算机可读存储介质。其中该分页数据获取方法包括:获取分页参数;根据所述分页参数获取第一候选分页数据;根据所述分页参数获取第二候选分页数据;根据所述分页参数从所述第一候选分页数据和所述第二候选分页数据中得到目标分页数据。上述方法通过获取候选的分页数据并对候选的分页数据进行选取,解决了提供个性化分页数据困难的技术问题。Embodiments of the present disclosure disclose a method, an apparatus, an electronic device, and a computer-readable storage medium for acquiring paging data. The method for obtaining paging data includes: obtaining paging parameters; obtaining first candidate paging data according to the paging parameters; obtaining second candidate paging data according to the paging parameters; Target paging data is obtained from the second candidate paging data. The above method solves the technical problem of difficulty in providing personalized paging data by acquiring and selecting candidate paging data.
在上文中,虽然按照上述的顺序描述了上述方法实施例中的各个步骤,本领域技术人员应清楚,本公开实施例中的步骤并不必然按照上述顺序执行,其也可以倒序、并行、交叉等其他顺序执行,而且,在上述步骤的基础上,本领域技术人员也可以再加入其他步骤,这些明显变型或等同替换的方式也应包含在本公开的保护范围之内,在此不再赘述。In the above, although the steps in the above method embodiments are described in the above order, it should be clear to those skilled in the art that the steps in the embodiments of the present disclosure are not necessarily executed in the above order, and may also be performed in reverse order, parallel, interleaved and other steps are performed in other order, and, on the basis of the above steps, those skilled in the art can also add other steps, these obvious modifications or equivalent replacement modes should also be included within the protection scope of the present disclosure, and will not be repeated here. .
图9为本公开实施例提供的分页数据获取装置实施例的结构示意图。如图9所示,该装置900包括:参数获取模块901、第一候选数据获取模块902、第二候选数据获取模块903和分页数据获取模块904。其中,FIG. 9 is a schematic structural diagram of an embodiment of an apparatus for acquiring paging data provided by an embodiment of the present disclosure. As shown in FIG. 9 , the apparatus 900 includes: a parameter acquisition module 901 , a first candidate data acquisition module 902 , a second candidate data acquisition module 903 and a paging data acquisition module 904 . in,
参数获取模块901,用于获取分页参数;A parameter obtaining module 901, used for obtaining paging parameters;
第一候选数据获取模块902,用于根据所述分页参数获取第一候选分页数据;a first candidate data obtaining module 902, configured to obtain first candidate paging data according to the paging parameter;
第二候选数据获取模块903,用于根据所述分页参数获取第二候选分页数据;A second candidate data obtaining module 903, configured to obtain second candidate paging data according to the paging parameter;
分页数据获取模块904,用于根据所述分页参数从所述第一候选分页数据和第二候选分页数据中得到目标分页数据。The paging data obtaining module 904 is configured to obtain target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter.
进一步的,所述参数获取模块901,还用于:Further, the parameter acquisition module 901 is also used for:
接收分页数据请求;Receive paging data requests;
解析所述分页数据请求得到所述分页参数。The paging parameter is obtained by parsing the paging data request.
进一步的,所述分页参数包括:标志位、分片大小、过滤信息以及偏移量中的一个或多个;其中所述标志位表示页面数据列表中的分页数据开始位置;所述分片大小表示目标分页数据的数量;所述过滤信息表示过滤所述分页数据所需要的信息;所述偏移量表示已获取的目标分页数据的数量。Further, the paging parameters include: one or more of a flag bit, a fragment size, filtering information and an offset; wherein the flag bit represents the start position of the page data in the page data list; the fragment size Indicates the quantity of the target paging data; the filtering information represents the information required for filtering the paging data; the offset represents the quantity of the acquired target paging data.
进一步的,所述第一候选数据获取模块902,还用于:Further, the first candidate data acquisition module 902 is also used for:
获取页面数据列表;Get a list of page data;
根据所述标志位和所述过滤信息从所述页面数据列表中获取分片大小个分页数据作为所述第一候选分页数据。According to the flag bit and the filtering information, the page data of the fragment size is obtained from the page data list as the first candidate page data.
进一步的,所述第一候选数据获取模块902,还用于:Further, the first candidate data acquisition module 902 is also used for:
根据所述过滤信息生成过滤条件;generating filter conditions according to the filter information;
根据所述标志位确定所述页面数据列表中的分页数据开始位置;Determine the starting position of the paging data in the page data list according to the flag bit;
根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取所述分片大小个分页数据作为所述第一候选分页数据。According to the filter condition, the page data of the fragment size is acquired from the start position of the page data in the page data list as the first candidate page data.
进一步的,所述第一候选数据获取模块902,还用于:Further, the first candidate data acquisition module 902 is also used for:
初始化分页窗口;Initialize the paging window;
根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取分页数据直至所述分页窗口的大小等于所述分片大小;Acquire paging data from the starting position of the paging data in the page data list according to the filter condition until the size of the paging window is equal to the size of the fragment;
将所述分页窗口内的分页数据作为所述第一候选分页数据。The paging data in the paging window is used as the first candidate paging data.
进一步的,所述第一候选分页数据包括:Further, the first candidate paging data includes:
不满足过滤条件的分页数据以及不满足强插条件的分页数据。Paging data that does not meet the filter conditions and paging data that does not meet the insertion conditions.
进一步的,所述第二候选数据获取模块903,还用于:Further, the second candidate data acquisition module 903 is also used for:
根据所述过滤信息生成过滤条件;generating filter conditions according to the filter information;
获取至少一个符合强插条件的分页数据;Get at least one paged data that meets the strong insertion condition;
从所述至少一个符合强插条件的分页数据获取不满足所述过滤条件的分页数据作为第二候选分页数据。The page data that does not meet the filtering condition is obtained from the at least one page data that meets the strong insertion condition as the second candidate page data.
进一步的,其中所述分页参数包括分片大小,所述分页数据获取模块904,还用于:Further, wherein the paging parameter includes the fragment size, and the paging data acquisition module 904 is further used for:
获取第二候选分页数据的插入位置;Obtain the insertion position of the second candidate paging data;
根据所述插入位置将所述第二候选分页数据插入所述第一候选分页数据得到候选分页数据;Inserting the second candidate paging data into the first candidate paging data according to the insertion position to obtain candidate paging data;
根据所述分片大小从所述候选分页数据中截取出所述目标分页数据。The target page data is cut out from the candidate page data according to the fragment size.
进一步的,所述分页数据获取装置900还用于:Further, the paging data acquisition device 900 is also used for:
根据所述目标分页数据更新所述分页参数中的标志位。The flag bit in the paging parameter is updated according to the target paging data.
图9所示装置可以执行图1-图8所示实施例的方法,本实施例未详细描述的部分,可参考对图1-图8所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1-图8所示实施例中的描述,在此不再赘述。The apparatus shown in FIG. 9 may execute the method of the embodiment shown in FIG. 1 to FIG. 8 . For parts not described in detail in this embodiment, reference may be made to the related description of the embodiment shown in FIG. 1 to FIG. 8 . For the execution process and technical effects of the technical solution, refer to the descriptions in the embodiments shown in FIG. 1 to FIG. 8 , which will not be repeated here.
下面参考图10,其示出了适于用来实现本公开实施例的电子设备1000的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图10示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring next to FIG. 10 , it shows a schematic structural diagram of an electronic device 1000 suitable for implementing an embodiment of the present disclosure. Terminal devices in the embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (eg, mobile terminals such as in-vehicle navigation terminals), etc., and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in FIG. 10 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
如图10所示,电子设备1000可以包括处理装置(例如中央处理器、图形处理器等)1001,其可以根据存储在只读存储器(ROM)1002中的程序或者从存储装置1008加载到随机访问存储器(RAM)1003中的程序而执行各种适当的动作和处理。在RAM 1003中,还存储有电子设备1000操作所需的各种程序和数 据。处理装置1001、ROM 1002以及RAM 1003通过总线1004彼此相连。输入/输出(I/O)接口1005也连接至总线1004。As shown in FIG. 10, an electronic device 1000 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 1001, which may be loaded into random access according to a program stored in a read only memory (ROM) 1002 or from a storage device 1008 Various appropriate operations and processes are executed by the programs in the memory (RAM) 1003 . In the RAM 1003, various programs and data necessary for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An input/output (I/O) interface 1005 is also connected to the bus 1004 .
通常,以下装置可以连接至I/O接口1005:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置1006;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置1007;包括例如磁带、硬盘等的存储装置1008;以及通信装置1009。通信装置1009可以允许电子设备1000与其他设备进行无线或有线通信以交换数据。虽然图10示出了具有各种装置的电子设备1000,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices can be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 1007 such as a computer; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009 . The communication means 1009 may allow the electronic device 1000 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 10 shows electronic device 1000 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置1009从网络上被下载和安装,或者从存储装置1008被安装,或者从ROM 1002被安装。在该计算机程序被处理装置1001执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication device 1009, or from the storage device 1008, or from the ROM 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带 中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects. Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:执行上述实施例中的分页数据获取方法。The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: executes the method for acquiring paging data in the foregoing embodiment.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特 网服务提供商来通过因特网连接)。Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。The units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation of the unit itself under certain circumstances.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、 磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
根据本公开的一个或多个实施例,提供了一种分页数据获取方法,包括:According to one or more embodiments of the present disclosure, a method for acquiring paging data is provided, including:
获取分页参数;Get paging parameters;
根据所述分页参数获取第一候选分页数据;Obtain the first candidate paging data according to the paging parameter;
根据所述分页参数获取第二候选分页数据;Acquire second candidate paging data according to the paging parameter;
根据所述分页参数从所述第一候选分页数据和所述第二候选分页数据中得到目标分页数据。Target paging data is obtained from the first candidate paging data and the second candidate paging data according to the paging parameter.
进一步的,所述获取分页参数,包括:Further, the obtaining paging parameters includes:
接收分页数据请求;Receive paging data requests;
解析所述分页数据请求得到所述分页参数。The paging parameter is obtained by parsing the paging data request.
进一步的,所述分页参数包括:标志位、分片大小、过滤信息以及偏移量中的一个或多个;其中所述标志位表示页面数据列表中的分页数据开始位置;所述分片大小表示目标分页数据的数量;所述过滤信息表示过滤所述分页数据所需要的信息;所述偏移量表示已获取的目标分页数据的数量。Further, the paging parameters include: one or more of a flag bit, a fragment size, filtering information and an offset; wherein the flag bit represents the start position of the page data in the page data list; the fragment size Indicates the quantity of the target paging data; the filtering information represents the information required for filtering the paging data; the offset represents the quantity of the acquired target paging data.
进一步的,所述分页参数包括所述标志位和所述过滤信息,所述根据所述分页参数获取第一候选分页数据,包括:Further, the paging parameter includes the flag bit and the filtering information, and the obtaining the first candidate paging data according to the paging parameter includes:
获取页面数据列表;Get a list of page data;
根据所述标志位和所述过滤信息从所述页面数据列表中获取分片大小个分页数据作为所述第一候选分页数据。According to the flag bit and the filtering information, the page data of the fragment size is obtained from the page data list as the first candidate page data.
进一步的,所述根据所述标志位和过滤信息从所述页面数据列表中获取分片大小个分页数据作为所述第一候选分页数据,包括:Further, according to the flag bit and the filtering information, the page data of the fragment size obtained from the page data list is used as the first candidate page data, including:
根据所述过滤信息生成过滤条件;generating filter conditions according to the filter information;
根据所述标志位确定所述页面数据列表中的分页数据开始位置;Determine the starting position of the paging data in the page data list according to the flag bit;
根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取所述分片大小个分页数据作为所述第一候选分页数据。According to the filter condition, the page data of the fragment size is acquired from the start position of the page data in the page data list as the first candidate page data.
进一步的,所述根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取所述分片大小个分页数据作为所述第一候选分页数据,包括:Further, the obtaining, according to the filter condition, the paging data of the fragment size from the starting position of the paging data in the page data list as the first candidate paging data, includes:
初始化分页窗口;Initialize the paging window;
根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取分页数据直至所述分页窗口的大小等于所述分片大小;Acquire paging data from the starting position of the paging data in the page data list according to the filter condition until the size of the paging window is equal to the size of the fragment;
将所述分页窗口内的分页数据作为所述第一候选分页数据。The paging data in the paging window is used as the first candidate paging data.
进一步的,所述第一候选分页数据包括:Further, the first candidate paging data includes:
不满足过滤条件的分页数据以及不满足强插条件的分页数据。Paging data that does not meet the filter conditions and paging data that does not meet the insertion conditions.
进一步的,所述根据所述分页参数获取第二候选分页数据,包括:Further, obtaining the second candidate paging data according to the paging parameter includes:
根据所述过滤信息生成过滤条件;generating filter conditions according to the filter information;
获取至少一个符合强插条件的分页数据;Get at least one paged data that meets the strong insertion condition;
从所述至少一个符合强插条件的分页数据获取不满足所述过滤条件的分页数据作为第二候选分页数据。The page data that does not satisfy the filtering condition is obtained from the at least one page data that meets the strong insertion condition as the second candidate page data.
进一步的,所述分页参数包括分片大小,所述根据所述分页参数从所述第一候选分页数据和第二候选分页数据中得到目标分页数据,包括:Further, the paging parameter includes a fragment size, and the obtaining target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter includes:
获取第二候选分页数据的插入位置;Obtain the insertion position of the second candidate paging data;
根据所述插入位置将所述第二候选分页数据插入所述第一候选分页数据得到候选分页数据;Inserting the second candidate paging data into the first candidate paging data according to the insertion position to obtain candidate paging data;
根据所述分片大小从所述候选分页数据中截取出所述目标分页数据。The target page data is cut out from the candidate page data according to the fragment size.
进一步的,所述方法还包括:Further, the method also includes:
根据所述目标分页数据更新所述分页参数中的标志位。The flag bit in the paging parameter is updated according to the target paging data.
根据本公开的一个或多个实施例,提供了一种分页数据获取装置,包括:According to one or more embodiments of the present disclosure, an apparatus for acquiring paging data is provided, including:
参数获取模块,用于获取分页参数;Parameter obtaining module, used to obtain paging parameters;
第一候选数据获取模块,用于根据所述分页参数获取第一候选分页数据;a first candidate data acquisition module, configured to acquire the first candidate paging data according to the paging parameter;
第二候选数据获取模块,用于根据所述分页参数获取第二候选分页数据;A second candidate data obtaining module, configured to obtain second candidate paging data according to the paging parameter;
分页数据获取模块,用于根据所述分页参数从所述第一候选分页数据和第二候选分页数据中得到目标分页数据。A paging data acquisition module, configured to obtain target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter.
进一步的,所述参数获取模块,还用于:Further, the parameter acquisition module is also used for:
接收分页数据请求;Receive paging data requests;
解析所述分页数据请求得到所述分页参数。The paging parameter is obtained by parsing the paging data request.
进一步的,所述分页参数包括:标志位、分片大小、过滤信息以及偏移量中的一个或多个;其中所述标志位表示页面数据列表中的分页数据开始位置;所述分片大小表示目标分页数据的数量;所述过滤信息表示过滤所述分页数据所需要的信息;所述偏移量表示已获取的目标分页数据的数量。Further, the paging parameters include: one or more of a flag bit, a fragment size, filtering information and an offset; wherein the flag bit represents the start position of the page data in the page data list; the fragment size Indicates the quantity of the target paging data; the filtering information represents the information required for filtering the paging data; the offset represents the quantity of the acquired target paging data.
进一步的,所述第一候选数据获取模块,还用于:Further, the first candidate data acquisition module is also used for:
获取页面数据列表;Get a list of page data;
根据所述标志位和所述过滤信息从所述页面数据列表中获取分片大小个分页数据作为所述第一候选分页数据。According to the flag bit and the filtering information, the page data of the fragment size is obtained from the page data list as the first candidate page data.
进一步的,所述第一候选数据获取模块,还用于:Further, the first candidate data acquisition module is also used for:
根据所述过滤信息生成过滤条件;generating filter conditions according to the filter information;
根据所述标志位确定所述页面数据列表中的分页数据开始位置;Determine the starting position of the paging data in the page data list according to the flag bit;
根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取所述分片大小个分页数据作为所述第一候选分页数据。According to the filter condition, the page data of the fragment size is acquired from the start position of the page data in the page data list as the first candidate page data.
进一步的,所述第一候选数据获取模块,还用于:Further, the first candidate data acquisition module is also used for:
初始化分页窗口;Initialize the paging window;
根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取分页数据直至所述分页窗口的大小等于所述分片大小;Acquire paging data from the starting position of the paging data in the page data list according to the filter condition until the size of the paging window is equal to the size of the fragment;
将所述分页窗口内的分页数据作为所述第一候选分页数据。The paging data in the paging window is used as the first candidate paging data.
进一步的,所述第一候选分页数据包括:Further, the first candidate paging data includes:
不满足过滤条件的分页数据以及不满足强插条件的分页数据。Paging data that does not meet the filter conditions and paging data that does not meet the insertion conditions.
进一步的,所述第二候选数据获取模块,还用于:Further, the second candidate data acquisition module is also used for:
根据所述过滤信息生成过滤条件;generating filter conditions according to the filter information;
获取至少一个符合强插条件的分页数据;Get at least one paged data that meets the strong insertion condition;
从所述至少一个符合强插条件的分页数据获取不满足所述过滤条件的分页数据作为第二候选分页数据。The page data that does not satisfy the filtering condition is obtained from the at least one page data that meets the strong insertion condition as the second candidate page data.
进一步的,其中所述分页参数包括分片大小,所述分页数据获取模块,还用于:Further, wherein the paging parameter includes a fragment size, and the paging data acquisition module is further used for:
获取第二候选分页数据的插入位置;Obtain the insertion position of the second candidate paging data;
根据所述插入位置将所述第二候选分页数据插入所述第一候选分页数据得到候选分页数据;Inserting the second candidate paging data into the first candidate paging data according to the insertion position to obtain candidate paging data;
根据所述分片大小从所述候选分页数据中截取出所述目标分页数据。The target page data is cut out from the candidate page data according to the fragment size.
进一步的,所述分页数据获取装置还用于:Further, the paging data acquisition device is also used for:
根据所述目标分页数据更新所述分页参数中的标志位。The flag bit in the paging parameter is updated according to the target paging data.
根据本公开的一个或多个实施例,提供了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有能被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述第一方面中的任一所述分页数据 获取方法。According to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores data that can be accessed by the at least one processor Instructions executed by at least one processor, the instructions being executed by the at least one processor, so that the at least one processor can execute any one of the methods for obtaining paging data in the foregoing first aspect.
根据本公开的一个或多个实施例,提供了一种非暂态计算机可读存储介质,其特征在于,该非暂态计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行前述第一方面中的任一所述分页数据获取方法。According to one or more embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the foregoing Any one of the method for obtaining paging data in the first aspect.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, and should also cover, without departing from the above-mentioned disclosed concept, the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of its equivalent features. For example, a technical solution is formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) with similar functions.

Claims (13)

  1. 一种分页数据获取方法,其特征在于,包括:A method for obtaining paging data, comprising:
    获取分页参数;Get paging parameters;
    根据所述分页参数获取第一候选分页数据;Obtain the first candidate paging data according to the paging parameter;
    根据所述分页参数获取第二候选分页数据;Acquire second candidate paging data according to the paging parameter;
    根据所述分页参数从所述第一候选分页数据和所述第二候选分页数据中得到目标分页数据。Target paging data is obtained from the first candidate paging data and the second candidate paging data according to the paging parameter.
  2. 如权利要求1所述的分页数据获取方法,其特征在于,所述获取分页参数,包括:The method for obtaining paging data according to claim 1, wherein the obtaining paging parameters comprises:
    接收分页数据请求;Receive paging data requests;
    解析所述分页数据请求得到所述分页参数。The paging parameter is obtained by parsing the paging data request.
  3. 如权利要求1或2中任一项所述的分页数据获取方法,其特征在于,所述分页参数包括:标志位、分片大小、过滤信息以及偏移量中的一个或多个;其中所述标志位表示页面数据列表中的分页数据开始位置;所述分片大小表示目标分页数据的数量;所述过滤信息表示过滤所述分页数据所需要的信息;所述偏移量表示已获取的目标分页数据的数量。The method for obtaining paging data according to any one of claims 1 or 2, wherein the paging parameters include: one or more of a flag bit, a fragment size, filtering information, and an offset; The flag bit represents the starting position of the paging data in the page data list; the fragment size represents the quantity of the target paging data; the filtering information represents the information required to filter the paging data; the offset represents the acquired data The amount of target paginated data.
  4. 如权利要求3所述的分页数据获取方法,其特征在于,所述分页参数包括所述标志位和所述过滤信息,所述根据所述分页参数获取第一候选分页数据,包括:The method for obtaining paging data according to claim 3, wherein the paging parameter includes the flag bit and the filtering information, and the obtaining the first candidate paging data according to the paging parameter comprises:
    获取所述页面数据列表;Get the page data list;
    根据所述标志位和所述过滤信息从所述页面数据列表中获取分片大小个分页数据作为所述第一候选分页数据。According to the flag bit and the filtering information, the page data of the fragment size is obtained from the page data list as the first candidate page data.
  5. 如权利要求4所述的分页数据获取方法,其特征在于,所述根据所述标 志位和所述过滤信息从所述页面数据列表中获取分片大小个分页数据作为所述第一候选分页数据,包括:The method for obtaining paging data according to claim 4, characterized in that, according to the flag bit and the filtering information, the paging data of the fragment size is obtained from the page data list as the first candidate paging data ,include:
    根据所述过滤信息生成过滤条件;generating filter conditions according to the filter information;
    根据所述标志位确定所述页面数据列表中的分页数据开始位置;Determine the starting position of the paging data in the page data list according to the flag bit;
    根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取所述分片大小个分页数据作为所述第一候选分页数据。According to the filter condition, the page data of the fragment size is acquired from the start position of the page data in the page data list as the first candidate page data.
  6. 如权利要求5所述的分页数据获取方法,其特征在于,所述根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取所述分片大小个分页数据作为所述第一候选分页数据,包括:The method for obtaining paging data according to claim 5, wherein, according to the filtering condition, the paging data of the size of the fragment is obtained from the starting position of the paging data in the page data list as the first A candidate paging data, including:
    初始化分页窗口;Initialize the paging window;
    根据所述过滤条件从所述页面数据列表中的所述分页数据开始位置获取分页数据直至所述分页窗口的大小等于所述分片大小;Acquire paging data from the starting position of the paging data in the page data list according to the filter condition until the size of the paging window is equal to the size of the fragment;
    将所述分页窗口内的分页数据作为所述第一候选分页数据。The paging data in the paging window is used as the first candidate paging data.
  7. 如权利要求5所述的分页数据获取方法,其特征在于,所述第一候选分页数据包括:The method for obtaining paging data according to claim 5, wherein the first candidate paging data comprises:
    不满足过所述滤条件的分页数据以及不满足强插条件的分页数据。The paged data that does not meet the filtering conditions and the paged data that do not meet the strong insertion conditions.
  8. 如权利要求3所述的分页数据获取方法,其特征在于,所述根据所述分页参数获取第二候选分页数据,包括:The method for obtaining paging data according to claim 3, wherein the obtaining the second candidate paging data according to the paging parameter comprises:
    根据所述过滤信息生成过滤条件;generating filter conditions according to the filter information;
    获取至少一个符合强插条件的分页数据;Get at least one paged data that meets the strong insertion condition;
    从所述至少一个符合强插条件的分页数据获取不满足所述过滤条件的分页数据作为第二候选分页数据。The page data that does not satisfy the filtering condition is obtained from the at least one page data that meets the strong insertion condition as the second candidate page data.
  9. 如权利要求3所述的分页数据获取方法,其特征在于,所述分页参数包括所述分片大小,所述根据所述分页参数从所述第一候选分页数据和第二候选 分页数据中得到目标分页数据,包括:The method for obtaining paging data according to claim 3, wherein the paging parameter includes the fragment size, and the paging parameter is obtained from the first candidate paging data and the second candidate paging data according to the paging parameter Target paginated data, including:
    获取第二候选分页数据的插入位置;Obtain the insertion position of the second candidate paging data;
    根据所述插入位置将所述第二候选分页数据插入所述第一候选分页数据得到候选分页数据;Inserting the second candidate paging data into the first candidate paging data according to the insertion position to obtain candidate paging data;
    根据所述分片大小从所述候选分页数据中截取出所述目标分页数据。The target page data is cut out from the candidate page data according to the fragment size.
  10. 如权利要求1所述的分页数据获取方法,其特征在于,所述方法还包括:The method for obtaining paging data according to claim 1, wherein the method further comprises:
    根据所述目标分页数据更新所述分页参数中的标志位。The flag bit in the paging parameter is updated according to the target paging data.
  11. 一种分页数据获取装置,其特征在于,包括:A device for obtaining paging data, comprising:
    参数获取模块,用于获取分页参数;Parameter obtaining module, used to obtain paging parameters;
    第一候选数据获取模块,用于根据所述分页参数获取第一候选分页数据;a first candidate data acquisition module, configured to acquire the first candidate paging data according to the paging parameter;
    第二候选数据获取模块,用于根据所述分页参数获取第二候选分页数据;A second candidate data obtaining module, configured to obtain second candidate paging data according to the paging parameter;
    分页数据获取模块,用于根据所述分页参数从所述第一候选分页数据和第二候选分页数据中得到目标分页数据。A paging data acquisition module, configured to obtain target paging data from the first candidate paging data and the second candidate paging data according to the paging parameter.
  12. 一种电子设备,包括:An electronic device comprising:
    存储器,用于存储计算机可读指令;以及memory for storing computer-readable instructions; and
    处理器,用于运行所述计算机可读指令,使得所述处理器运行时实现根据权利要求1-10中任意一项所述的方法。A processor for executing the computer-readable instructions such that the processor, when executed, implements the method according to any one of claims 1-10.
  13. 一种非暂态计算机可读存储介质,用于存储计算机可读指令,当所述计算机可读指令由计算机执行时,使得所述计算机执行权利要求1-10中任意一项所述的方法。A non-transitory computer-readable storage medium for storing computer-readable instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1-10.
PCT/CN2021/130261 2020-11-18 2021-11-12 Paging data acquisition method and apparatus, electronic device, and computer readable storage medium WO2022105682A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011294529.0A CN112417276A (en) 2020-11-18 2020-11-18 Paging data acquisition method and device, electronic equipment and computer readable storage medium
CN202011294529.0 2020-11-18

Publications (1)

Publication Number Publication Date
WO2022105682A1 true WO2022105682A1 (en) 2022-05-27

Family

ID=74774451

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/130261 WO2022105682A1 (en) 2020-11-18 2021-11-12 Paging data acquisition method and apparatus, electronic device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN112417276A (en)
WO (1) WO2022105682A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112417276A (en) * 2020-11-18 2021-02-26 北京字节跳动网络技术有限公司 Paging data acquisition method and device, electronic equipment and computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106184A (en) * 2013-03-01 2013-05-15 畅捷通信息技术股份有限公司 Tabular data paging device and tabular data paging method
CN107943981A (en) * 2017-11-30 2018-04-20 努比亚技术有限公司 HBase rows paging method, server and computer-readable recording medium
CN108509529A (en) * 2018-03-14 2018-09-07 武汉斗鱼网络科技有限公司 Data page sort method, device and readable storage medium storing program for executing
CN108848244A (en) * 2018-04-02 2018-11-20 阿里巴巴集团控股有限公司 A kind of method and device of Pagination Display
CN110442406A (en) * 2018-05-02 2019-11-12 天津京东深拓机器人科技有限公司 The method and paging control, electronic equipment of paging control processing data
US20200133986A1 (en) * 2017-01-19 2020-04-30 Palantir Technologies Inc. Network graph parser
CN111247518A (en) * 2017-10-25 2020-06-05 国际商业机器公司 Database sharding
CN112417276A (en) * 2020-11-18 2021-02-26 北京字节跳动网络技术有限公司 Paging data acquisition method and device, electronic equipment and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354256A (en) * 2015-10-22 2016-02-24 浪潮电子信息产业股份有限公司 Data pagination query method and apparatus
CN108090086B (en) * 2016-11-21 2022-02-22 迈普通信技术股份有限公司 Paging query method and device
CN109543027B (en) * 2018-11-23 2020-02-07 苏州好玩友网络科技有限公司 Method, device and equipment for acquiring paging data and storage medium
CN111797091A (en) * 2019-10-18 2020-10-20 北京沃东天骏信息技术有限公司 Method and device for querying data in database, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106184A (en) * 2013-03-01 2013-05-15 畅捷通信息技术股份有限公司 Tabular data paging device and tabular data paging method
US20200133986A1 (en) * 2017-01-19 2020-04-30 Palantir Technologies Inc. Network graph parser
CN111247518A (en) * 2017-10-25 2020-06-05 国际商业机器公司 Database sharding
CN107943981A (en) * 2017-11-30 2018-04-20 努比亚技术有限公司 HBase rows paging method, server and computer-readable recording medium
CN108509529A (en) * 2018-03-14 2018-09-07 武汉斗鱼网络科技有限公司 Data page sort method, device and readable storage medium storing program for executing
CN108848244A (en) * 2018-04-02 2018-11-20 阿里巴巴集团控股有限公司 A kind of method and device of Pagination Display
CN110442406A (en) * 2018-05-02 2019-11-12 天津京东深拓机器人科技有限公司 The method and paging control, electronic equipment of paging control processing data
CN112417276A (en) * 2020-11-18 2021-02-26 北京字节跳动网络技术有限公司 Paging data acquisition method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112417276A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN111581563B (en) Page response method and device, storage medium and electronic equipment
CN111414498A (en) Multimedia information recommendation method and device and electronic equipment
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
WO2021139383A1 (en) Live broadcast room gift resource updating method and apparatus, and medium and electronic device
CN110097397B (en) Feedback-based information pushing method and device and electronic equipment
CN111163336B (en) Video resource pushing method and device, electronic equipment and computer readable medium
CN111596991A (en) Interactive operation execution method and device and electronic equipment
WO2022105682A1 (en) Paging data acquisition method and apparatus, electronic device, and computer readable storage medium
CN110908752A (en) Control setting method and device, electronic equipment and interaction system
WO2024055824A1 (en) Short-message verification method and apparatus, and storage medium and electronic device
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN110545313B (en) Message push control method and device and electronic equipment
CN111949746A (en) Data processing method and device, electronic equipment and computer readable medium
CN113163483B (en) Timestamp updating method and device and electronic equipment
WO2022057581A1 (en) Content display method and apparatus, electronic device, and computer readable storage medium
US20220365644A1 (en) User interface presentation method and apparatus, computer-readable medium and electronic device
CN111581556B (en) Page data processing method, device, electronic equipment and readable medium
CN111444457B (en) Data release method and device, storage medium and electronic equipment
CN111143355B (en) Data processing method and device
CN111625745B (en) Recommendation method, recommendation device, electronic equipment and computer readable medium
CN111787043A (en) Data request method and device
WO2022184037A1 (en) Document processing method, apparatus and device, and medium
WO2023098611A1 (en) Special effect display method and apparatus, and device and storage medium
CN115374320B (en) Text matching method and device, electronic equipment and computer medium
WO2022206474A1 (en) Data acquisition method and apparatus, electronic device, and computer-readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21893829

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 070923)

122 Ep: pct application non-entry in european phase

Ref document number: 21893829

Country of ref document: EP

Kind code of ref document: A1