CN115033334B - Page turning method, system, equipment and computer readable storage medium - Google Patents

Page turning method, system, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115033334B
CN115033334B CN202210955774.4A CN202210955774A CN115033334B CN 115033334 B CN115033334 B CN 115033334B CN 202210955774 A CN202210955774 A CN 202210955774A CN 115033334 B CN115033334 B CN 115033334B
Authority
CN
China
Prior art keywords
page
fragment
subscript value
array
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210955774.4A
Other languages
Chinese (zh)
Other versions
CN115033334A (en
Inventor
颜专
陈龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changsha Langyuan Electronic Technology Co Ltd
Original Assignee
Changsha Langyuan Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changsha Langyuan Electronic Technology Co Ltd filed Critical Changsha Langyuan Electronic Technology Co Ltd
Priority to CN202210955774.4A priority Critical patent/CN115033334B/en
Publication of CN115033334A publication Critical patent/CN115033334A/en
Application granted granted Critical
Publication of CN115033334B publication Critical patent/CN115033334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a page turning method, a page turning system, page turning equipment and a computer readable storage medium, wherein the page turning method comprises the following steps: traversing the page fragmentation array to obtain the fragmentation subscript value corresponding to the fragmentation currently displayed on the page in the page fragmentation array; and responding to a page turning request to perform corresponding operation on the fragment subscript value to obtain a target subscript value, judging whether the target subscript value meets boundary conditions or not, and calling the fragment corresponding to the target subscript value in the fragment array and displaying the fragment as a current page if the target subscript value meets the boundary conditions. According to the invention, the subscript value corresponding to the current page is searched in the page fragmentation array through the current page, the page display content is determined through calculation of the subscript value, the traditional process that a variable needs to be defined for each page and a large amount of logic judgment needs to be carried out is replaced, the stability is better, errors are not easy to occur, a large amount of ifelse judgment logic cannot occur due to excessive pages, and the expansibility is better.

Description

Page turning method, system, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of information technologies, and in particular, to a page turning method, system, device, and computer-readable storage medium.
Background
The paging function of the previous step and the paging function of the next step are commonly used for the mobile terminal APP. The appearance of the function simplifies the interaction mode of the user, and decomposes a complex single function page into a plurality of simple and understandable function pages. The user is guided and prompted to operate through the buttons of the previous step and the next step, so that the user experience is greatly enhanced, and the operation difficulty is greatly simplified.
The current mainstream page turning scheme in the market is to define variable index = default (default display of the page of the order), assume that three pages respectively correspond to index =0, index =1, and index =2, perform index-1 when clicking the previous step, perform index +1 when clicking the next step, and finally determine the page of the order to be displayed according to the index value. However, in the prior art, the maintenance cost of the index variable is high in the implementation process, and errors are prone to occur, for example, when the number of pages is too many, a large number of ifels logics are generated to judge which page needs to be displayed currently, errors are prone to occur in the logic judgment process, and the wrong page can be displayed after the system stability is affected; and if a new page is needed in the later maintenance process, the maximum boundary value of the index needs to be modified, and the corresponding logic needs to be modified, so that the expansibility is poor.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the objectives of the present invention is to provide a page turning method, which improves the stability and reduces the error probability.
The invention also provides a page turning system.
It is a further object of the present invention to provide an electronic device.
It is a fourth object of the present invention to provide a computer readable storage medium.
One of the purposes of the invention is realized by adopting the following technical scheme:
a page turning method comprises the following steps:
traversing the page fragmentation array to obtain the fragmentation subscript value corresponding to the fragmentation currently displayed on the page in the page fragmentation array;
and responding to a page turning request to perform corresponding operation on the fragment subscript value to obtain a target subscript value, judging whether the target subscript value meets boundary conditions or not, and calling the fragment corresponding to the target subscript value in the fragment array and displaying the fragment as a current page if the target subscript value meets the boundary conditions.
Furthermore, the fragment array is formed by combining all page fragments needing paging in advance, and each page fragment in the fragment array has a unique subscript value.
Further, the method for obtaining the slicing subscript value comprises the following steps:
and comparing the fragment being displayed on the current page with each element in the page fragment array, and if the page fragment of any element is consistent with the fragment being displayed on the current page, taking the subscript value of the element as the fragment subscript value.
Furthermore, the page turning request comprises a page turning to the previous page, a page turning to the next page and a page turning to a specified page; when the page turning request is that the page is turned to the previous page, subtracting 1 from the subscript value of the fragment; when the page turning request indicates that the page is turned to the next page, adding 1 to the fragment subscript value; and when the page turning request indicates that the page is turned to the appointed page, performing plus-minus N operation on the fragment subscript value according to the sorting difference between the appointed page and the current page, wherein N is the sorting difference between the appointed page and the current page.
Further, the boundary conditions are:
judging whether the target subscript value is greater than zero or not, and judging whether the target subscript value is less than or equal to the subscript value of the last element in the page fragmentation array or not;
and if the target subscript value is greater than zero and less than or equal to the subscript value of the last element in the page fragmentation array, the boundary condition is met.
Further, when the target subscript value does not meet the boundary condition, generating and displaying reminding information; if the target subscript value is judged to be negative, directly jumping the current page to the first page; and if the target subscript value is judged to be larger than the subscript value of the last element in the page fragmentation array, directly jumping the current page to the last page.
Further, the method also comprises the following steps:
and responding to a newly added page instruction to obtain a newly added position of the newly added page, inserting the newly added page into the page fragment array according to the newly added position of the newly added page, and updating subscripts of all elements of the page fragment array after insertion.
The second purpose of the invention is realized by adopting the following technical scheme:
a page turning system for executing the page turning method comprises the following steps:
the operation module is used for traversing the page fragment array to obtain a corresponding fragment subscript value of the fragment displayed by the current page in the page fragment array; responding to a page turning request to correspondingly operate the fragment subscript value to obtain the target subscript value;
the judging module is used for judging whether the target subscript value meets the boundary condition or not;
and the display module is used for calling the fragments corresponding to the target subscript values in the fragment array and displaying the fragments as the current page when the boundary condition is met.
The third purpose of the invention is realized by adopting the following technical scheme:
an electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the page turning method as described above when executing the computer program.
The fourth purpose of the invention is realized by adopting the following technical scheme:
a computer-readable storage medium, on which a computer program is stored, which, when executed, implements the page turning method described above.
Compared with the prior art, the invention has the beneficial effects that:
the invention creates the corresponding page fragment array according to each page fragment needing page turning in advance, searches the subscript value corresponding to the page fragment array through the current page, determines the page display content through the calculation of the subscript value, replaces the traditional process that a variable needs to be defined for each page and a large amount of logic judgment needs to be carried out, simplifies the information processing steps of page turning control, ensures that the page turning process has better stability, is not easy to make mistakes, does not generate a large amount of ifelse judgment logic because of excessive pages, needs to newly add a page at the later stage, only needs to newly add page elements in the page array, and has better expansibility.
Drawings
FIG. 1 is a schematic flow chart of a page turning method according to the present invention;
FIG. 2 is a block diagram of a page flipping system according to the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
Example one
The present embodiment provides a page turning method, as shown in fig. 1, the page turning method specifically includes the following steps:
step S1: constructing a page fragmentation array in advance;
the page fragment array is formed by combining page fragments which need to be paged in advance, wherein the page fragments are fragments; each page fragment in the page fragment array has a unique subscript value, and the page fragments in the page fragment array are sequentially arranged in the array according to the position and the sequence of the page fragments in the page.
Step S2: traversing the page fragmentation array to obtain the fragmentation subscript value corresponding to the fragmentation currently displayed on the page in the page fragmentation array;
when a client displays a certain page, identifying the fragments which are displayed by the current page, finding the fragments which are displayed by the current page from the page fragment array, sequentially comparing the fragments which are displayed by the current page with each element in the page fragment array, and when a certain element fragment in the page fragment array is the same as the fragment which is displayed by the current page, extracting the subscript value index corresponding to the element and marking the subscript value index as the fragment subscript value.
And step S3: and responding to a page turning request to correspondingly operate the fragment subscript value to obtain a target subscript value, judging whether the target subscript value meets a boundary condition, and if so, calling the fragment corresponding to the target subscript value in the fragment array and displaying the fragment as a current page.
The page turning request is initiated by a user through a client, and comprises a page turning to the previous page, a page turning to the next page and a page turning to a specified page; different page turning operations, different operation modes executed on the fragment subscript value, specifically:
when the page turning request is the page turning to the previous page, performing subtraction 1 operation on the fragment subscript value, namely index-1; when the page turning request indicates that the page is turned to the next page, performing an operation of adding 1 to the fragment subscript value, namely index +1; when the page turning request is that the designated page is skipped to, performing N addition/subtraction operation on the slicing subscript value according to the sorting difference between the designated page and the current page, wherein N is the sorting difference between the designated page and the current page; if the appointed page is arranged fifth in the array and the current page is arranged third in the array, the sorting difference value of the appointed page and the current page is 2, and at this time index +2 operation is carried out on the fragment subscript value.
The position of the page needing to be jumped in the page fragment array can be positioned according to the addition and subtraction operation, so that the page fragment needing to be jumped can be quickly, accurately and quickly taken out from the page fragment array and displayed as a current page, and the page turning/jumping purpose of the page is realized.
The purpose of judging whether the boundary condition is met is to judge whether a page subscript value needing page turning/skipping is within a boundary range, specifically:
judging whether the target subscript value is greater than zero, if so, indicating that the page needing page turning/skipping is an effective page; if the target subscript value is a negative number, the target subscript value exceeds the minimum boundary, and at the moment, a reminding message can be generated and displayed to inform the user of re-operation.
Meanwhile, when the boundary condition is judged, whether the target subscript value is less than or equal to the subscript value of the last element in the page fragmentation array or not is judged; if the target subscript value is greater than the subscript value of the last element in the page fragment array, the target subscript value exceeds the maximum boundary, and at the moment, a reminding message is generated and displayed to inform a user of re-operation; if the target subscript value is judged to be larger than zero and smaller than or equal to the subscript value of the last element in the page fragmentation array in the boundary condition judgment process, the boundary condition is met. And if the boundary condition is met, calling the segment corresponding to the target subscript value in the page segment array and displaying the segment as the current page.
And when the target subscript value does not meet the boundary condition, the current page can not execute page turning/skipping operation and is continuously reserved on the current page.
In some embodiments, if the target subscript value is judged to be a negative number, directly skipping the current page to the first page; and if the target subscript value is judged to be larger than the subscript value of the last element in the page fragmentation array, directly jumping the current page to the last page.
In addition, in the embodiment, the target subscript value of the jump page is searched in an array form, a page needs to be newly added at the later stage, only the page element needs to be newly added in the page array, the maximum boundary value of the index of the newly added page does not need to be modified, the corresponding logic does not need to be modified, and the expansibility can be greatly improved. Specifically, the method comprises the following steps: the user can initiate a new page instruction at the client, obtain a new position of the new page in the original page according to the new page instruction, insert the new page into the page fragment array according to the new position of the new page, update the subscript values of all elements of the page fragment array after insertion, and subsequently still find the page needing page turning/page turning through a subscript searching mode, so that the accuracy and stability of page turning/page turning are improved.
Example two
The embodiment provides a page turning system, which executes the page turning method according to the first embodiment; as shown in fig. 2, the system includes:
the operation module is used for traversing the page fragment array to obtain a corresponding fragment subscript value of the fragment displayed by the current page in the page fragment array; responding to a page turning request to correspondingly operate the fragment subscript value to obtain the target subscript value;
the judging module is used for judging whether the target subscript value meets the boundary condition or not;
and the display module is used for calling the fragments corresponding to the target subscript values in the fragment array and displaying the fragments as the current page when the boundary condition is met.
The system creates a corresponding page fragment array according to each page fragment needing to be turned, searches for a subscript value corresponding to each page fragment array through a current page, determines page display content through calculation of the subscript value, replaces the traditional process that variables need to be defined for each page and a large amount of logic judgment is needed, simplifies information processing steps of page turning control, enables the stability of a page turning process to be better, enables the error to be difficult to occur, avoids the occurrence of a large amount of ifelse judgment logic due to excessive pages, needs to newly add pages in the later period, only needs to newly add page elements in the page array, and is better in expansibility.
In some embodiments, an electronic device is also provided, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor implementing the page turning method of the first embodiment when executing the computer program;
in addition, in some embodiments, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when executed, implements the page turning method according to the first embodiment.
The above system, device and storage medium and the method in the foregoing embodiments are based on multiple aspects of the same inventive concept, and the method implementation process has been described in detail in the foregoing, so that those skilled in the art can clearly understand the structure and implementation process of the system, device and storage medium according to the foregoing description, and for the sake of brevity of the description, no further description is provided here.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.

Claims (7)

1. A page turning method is characterized by comprising the following steps:
traversing the page fragmentation array to obtain the fragmentation subscript value corresponding to the fragmentation currently displayed on the page in the page fragmentation array; comparing the fragment being displayed on the current page with each element in the page fragment array, and if the page fragment of any element is consistent with the fragment being displayed on the current page, taking the subscript value of the element as the subscript value of the fragment; the page fragmentation array is formed by combining page fragments which need to be paged in advance; each page fragment in the page fragment array has a unique subscript value, and the page fragments in the page fragment array are sequentially arranged in the array according to the positions and the sequence of the page fragments in the page;
responding to a page turning request to perform corresponding operation on the fragment subscript value to obtain a target subscript value, and judging whether the target subscript value meets a boundary condition, wherein the boundary condition is as follows: judging whether the target subscript value is greater than zero or not, and judging whether the target subscript value is less than or equal to the subscript value of the last element in the page fragmentation array or not; if the target subscript value is greater than zero and less than or equal to the subscript value of the last element in the page fragmentation array, the boundary condition is satisfied; if yes, calling the fragments corresponding to the target subscript values in the fragment array and displaying the fragments as the current page.
2. The page turning method according to claim 1, wherein the page turning request includes a jump to a previous page, a jump to a next page, and a jump to a specified page; when the page turning request is that the page is turned to the previous page, subtracting 1 from the subscript value of the fragment; when the page turning request indicates that the page is turned to the next page, adding 1 to the fragment subscript value; and when the page turning request indicates that the page is turned to the appointed page, performing plus-minus N operation on the fragment subscript value according to the sorting difference between the appointed page and the current page, wherein N is the sorting difference between the appointed page and the current page.
3. The page turning method according to claim 1, wherein when the target subscript value does not satisfy the boundary condition, a reminder message is generated and displayed; if the target subscript value is judged to be negative, directly skipping the current page to the first page; and if the target subscript value is judged to be larger than the subscript value of the last element in the page fragmentation array, directly jumping the current page to the last page.
4. The page turning method of claim 1, further comprising:
and responding to the newly added page instruction to obtain a newly added position of the newly added page, inserting the newly added page into the page fragment array according to the newly added position of the newly added page, and updating subscript values of all elements of the page fragment array after insertion.
5. A page turning system for performing the page turning method according to any one of claims 1 to 4, the system comprising:
the operation module is used for traversing the page fragment array to obtain a corresponding fragment subscript value of a fragment displayed by the current page in the page fragment array; responding to a page turning request to correspondingly operate the fragment subscript value to obtain the target subscript value;
the judging module is used for judging whether the target subscript value meets the boundary condition;
and the display module is used for calling the fragments corresponding to the target subscript values in the fragment array and displaying the fragments as the current page when the boundary condition is met.
6. An electronic device, comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the page turning method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, on which a computer program is stored, which, when executed, implements the page turning method according to any one of claims 1 to 4.
CN202210955774.4A 2022-08-10 2022-08-10 Page turning method, system, equipment and computer readable storage medium Active CN115033334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210955774.4A CN115033334B (en) 2022-08-10 2022-08-10 Page turning method, system, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210955774.4A CN115033334B (en) 2022-08-10 2022-08-10 Page turning method, system, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN115033334A CN115033334A (en) 2022-09-09
CN115033334B true CN115033334B (en) 2022-12-06

Family

ID=83131246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210955774.4A Active CN115033334B (en) 2022-08-10 2022-08-10 Page turning method, system, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115033334B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255550A (en) * 2017-11-27 2018-07-06 深圳市小牛在线互联网信息咨询有限公司 Method for page jump, device, storage medium and computer equipment
CN110955428A (en) * 2019-11-27 2020-04-03 北京奇艺世纪科技有限公司 Page display method and device, electronic equipment and medium
CN112084443A (en) * 2020-08-21 2020-12-15 北京幻想纵横网络技术有限公司 Page caching method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246664B (en) * 2012-02-07 2016-05-25 阿里巴巴集团控股有限公司 Web search method and apparatus
CN112632157B (en) * 2021-03-11 2021-07-27 全时云商务服务股份有限公司 Multi-condition paging query method under distributed system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255550A (en) * 2017-11-27 2018-07-06 深圳市小牛在线互联网信息咨询有限公司 Method for page jump, device, storage medium and computer equipment
CN110955428A (en) * 2019-11-27 2020-04-03 北京奇艺世纪科技有限公司 Page display method and device, electronic equipment and medium
CN112084443A (en) * 2020-08-21 2020-12-15 北京幻想纵横网络技术有限公司 Page caching method and device

Also Published As

Publication number Publication date
CN115033334A (en) 2022-09-09

Similar Documents

Publication Publication Date Title
US10990511B2 (en) Apparatus and application interface traversing method
US20200311342A1 (en) Populating values in a spreadsheet using semantic cues
CN110292775B (en) Method and device for acquiring difference data
WO2016028472A2 (en) Automatically adjusting spreadsheet formulas and/or formatting
EP2755119A1 (en) Method for moving interface object and apparatus for supporting movement of interface object
CN111143368A (en) Relational database data comparison method and system
US20160283062A1 (en) Storage medium, facility inspection support method, and facility inspection support apparatus
CN113183759A (en) Method and device for displaying characters of instrument panel
CN115033334B (en) Page turning method, system, equipment and computer readable storage medium
CN112988758B (en) Target object positioning method and device, electronic equipment and storage medium
CN105893614A (en) Information recommendation method and device and electronic equipment
JP2015005228A (en) Cursor movement controller and program therefor
CN112329407A (en) Method and device for adding data in table and electronic equipment
CN113435166B (en) Underline method and system, computer device and readable storage medium
US20170139969A1 (en) Method for filtering and analyzing big data, electronic device, and non-transitory computer-readable storage medium
JP2015122007A (en) Edition support system, method and program
CN113535173B (en) Information searching method, device, equipment and storage medium
CN116955415B (en) Design hierarchy based data search system
CN115577149B (en) Data processing method, device and equipment and readable storage medium
JP2015022568A (en) Information processing program, device, and method
CN114117181B (en) Website page turning logic acquisition method and device and website page turning control method and device
CN112733860B (en) Method and system for mining difficult samples of two-classification segmentation network
JP5602273B1 (en) Power system simulator, power system simulation program, and simulation method
US20240163521A1 (en) Method and system for displaying information on page
CN108153718B (en) Typesetting method and device for footnote-containing document

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant