CN114579031B - Response method and device for sliding operation, server and storage medium - Google Patents

Response method and device for sliding operation, server and storage medium Download PDF

Info

Publication number
CN114579031B
CN114579031B CN202210219667.5A CN202210219667A CN114579031B CN 114579031 B CN114579031 B CN 114579031B CN 202210219667 A CN202210219667 A CN 202210219667A CN 114579031 B CN114579031 B CN 114579031B
Authority
CN
China
Prior art keywords
offset
node
list
node list
subscript
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
CN202210219667.5A
Other languages
Chinese (zh)
Other versions
CN114579031A (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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202210219667.5A priority Critical patent/CN114579031B/en
Publication of CN114579031A publication Critical patent/CN114579031A/en
Application granted granted Critical
Publication of CN114579031B publication Critical patent/CN114579031B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a response method, a device, a server and a storage medium for sliding operation, wherein the method comprises the following steps: determining a sliding distance according to the sliding operation; calculating the corresponding offset of the sliding distance in the document object model; determining node list subscripts according to the size relation between the offset and the offset constant; and feeding back the content of the target node corresponding to the node list index to a preset plug-in, so that the preset plug-in outputs the anti-response content corresponding to the sliding operation. The parameters used in the calculation process are not influenced by other sliding events, so that the anti-response content corresponding to the sliding operation output by the preset plug-in unit can be accurately determined, and the anti-response accuracy of the sliding operation is improved. And quickly determining the node list index according to the sliding distance, so that the preset plug-in unit can smoothly output contents.

Description

Response method and device for sliding operation, server and storage medium
Technical Field
The embodiment of the application relates to a touch processing technology, in particular to a response method and device for sliding operation, a server and a storage medium.
Background
With the development of internet front-end technology, more and more mobile-end applications provide components that respond based on user sliding operations.
For example, a daily consumption record of the user is displayed in the terminal view, and when the user slides the screen, the consumption record is scrolled therewith, and at this time, the time displayed in the time selector is changed in accordance with the user's sliding operation. The process in which the time selector adjusts the response time based on the user's sliding operation in the consumption record is a process in which the response is reversed based on the user's operation.
However, when the response of the sliding operation is performed, there is a problem of sliding monitoring conflict, the response of the sliding operation is often triggered according to monitoring events of the sliding operation provided by other processes, and the sliding events are captured mutually, so that the accuracy of the anti-response of the sliding operation is low.
Disclosure of Invention
The application provides a response method, a response device, a server and a storage medium for sliding operation, so as to improve the accuracy of anti-response of the sliding operation.
In a first aspect, an embodiment of the present application provides a response method for a sliding operation, including:
determining a sliding distance according to the sliding operation;
calculating the corresponding offset of the sliding distance in the document object model;
determining node list subscripts according to the size relation between the offset and the offset constant;
and feeding back the content of the target node corresponding to the node list index to a preset plug-in, so that the preset plug-in outputs the anti-response content corresponding to the sliding operation.
In a second aspect, an embodiment of the present application further provides a response device for a sliding operation, including:
a sliding distance determining module for determining a sliding distance according to a sliding operation;
the offset calculation module is used for calculating the corresponding offset of the sliding distance in the document object model;
the subscript determining module is used for determining a node list subscript according to the magnitude relation between the offset and the offset constant;
and the plug-in response module is used for feeding back the content of the target node corresponding to the node list index to the preset plug-in so that the preset plug-in outputs the anti-response content corresponding to the sliding operation.
In a third aspect, an embodiment of the present application further provides a response terminal for sliding operation, where the terminal includes:
one or more processors;
storage means for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the stream data processing method as an embodiment of the present application.
In a fourth aspect, embodiments of the present application also provide a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform a response method for a sliding operation as in embodiments of the present application.
According to the stream data processing method provided by the embodiment of the application, the sliding distance is determined according to the sliding operation; calculating the corresponding offset of the sliding distance in the document object model; determining node list subscripts according to the size relation between the offset and the offset constant; and feeding back the content of the target node corresponding to the node list index to a preset plug-in, so that the preset plug-in outputs the anti-response content corresponding to the sliding operation. According to the response method for the sliding operation, the sliding distance can be obtained according to the sliding operation of the user, the node list subscript is determined according to the size relation between the offset and the offset constant, and the response content output by the preset plug-in is determined according to the node list subscript. The parameters used in the calculation process are not influenced by other sliding events, so that the anti-response content corresponding to the sliding operation output by the preset plug-in unit can be accurately determined, and the anti-response accuracy of the sliding operation is improved. And quickly determining the node list index according to the sliding distance, so that the preset plug-in unit can smoothly output contents.
Drawings
FIG. 1 is a flow chart of a response method of a sliding operation in a first embodiment of the application;
FIG. 2 is a flow chart of a response method of a sliding operation in a second embodiment of the present application;
fig. 3 is a schematic structural view of a response device to a sliding operation in the third embodiment of the present application;
fig. 4 is a schematic diagram of the structure of a stream data processing terminal in the fourth embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
The technical terms related to the application are as follows:
vue: is a set of progressive JavaScript frames for building user interfaces designed to be applied layer by layer from bottom up. The core library of Vue only focuses on the view layer, facilitating integration with third party libraries or existing items. Vue is fully capable of driving complex single page applications that employ single file components and Vue ecosystem-supported library development.
jQuery: the method is a quick and simple JavaScript framework, encapsulates common function codes of JavaScript, provides a simple JavaScript design mode, and optimizes HTML document operation, event processing, animation design and Ajax interaction. The plug-in expansion mechanism is convenient, plug-ins are abundant, and the plug-in expansion mechanism is compatible with various mainstream browsers.
Mobiscrol: is a date and time selector UI component for touch devices whose use does not alter the native user experience of HTML5, phoneGap, and hybrid applications. As a jQuery sliding selection plug-in, a user can customize a theme style and add colors for the UI components of the mobile items. Mobiscrol can be used as an implementation of the preset plug-in of the present application.
Doms: is an abbreviation for Document Object Model document object model. According to the W3C DOM specification, DOM is a browser, platform, language independent interface that allows users to access other standard components in the page, and DOM is a collection of nodes or pieces of information organized in a hierarchy. The hierarchy allows a developer to navigate through the tree for specific information. Analyzing the structure typically requires loading the entire document and constructing the hierarchy before doing anything. Since it is based on an information hierarchy, dom is considered tree-based or object-based.
Class: is a class selector that allows styles to be specified in a manner that is independent of the document elements. Before using the class selector, the specific document markup needs to be modified in order for the class selector to function properly. In order to associate a style of class selector with an element, class must be specified as an appropriate value, class can be referenced multiple times.
Index: list subscript, its initial value is 0.
Example 1
Fig. 1 is a flowchart of a response method of a sliding operation provided in an embodiment of the present application, where the method may be performed by a mobile terminal, and the mobile terminal may be a device with a touch screen, such as a smart phone, a tablet computer, or the like, and the method specifically includes the following steps:
step 110, determining the sliding distance according to the sliding operation.
When the user slides on the touch screen, the sliding operation is triggered. And determining the sliding distance according to the track length corresponding to the sliding operation.
Further, before determining the sliding distance according to the sliding operation in step 110, the method further includes:
configuring nodes with anti-response changing requirements in a document object model;
and determining a node list according to the configured node class with the anti-response change requirement.
The terminal screen area includes one or more document object models dom having a hierarchical structure. Node class with anti-response requirement is preconfigured. The document object model dom displays the node list through a view. Node class with anti-response change requirement can be configured in the dom, and then a node list of the content node class in the dom is obtained.
Further, the node list contains data recorded based on time;
the preset plug-in is a mobiscrol component.
The preset component can be implemented in a variety of ways. Optionally, the preset plug-in is a mobiscrol component. And outputting the time component through the Mobiescroll component. In addition, the node class in the node list may be a node for documenting user billing information. In the above-described scenario, it is possible to implement a mobiscrol component in which when the user slides the billing information, the user displays the time corresponding to the billing information, and the update of the time content is performed in accordance with the sliding operation output by the user.
Step 120, calculating the corresponding offset of the sliding distance in the document object model.
Optionally, before calculating the corresponding offset of the sliding distance in the document object model in step 120, the method further includes:
an offset constant for the view is determined based on the screen width.
And calculating according to the screen width and preset parameters to obtain an offset constant.
Alternatively, the offset constant may be calculated by the following formula:
offset constant=100× (screen width/750) ×c
Wherein, C is a preset parameter, and the value range of the preset parameter C can be 0.9-3.0. Preferably 1.95. The value of the preset parameter can be determined according to the factors such as the size relation between the dot structure of the display node list and the screen.
Alternatively, calculating the corresponding offset of the sliding distance in the document object model may be implemented by:
if the node list subscript is not equal to the node list length minus one, determining a downward offset according to the top coordinate of the document object model, the next undisplayed node coordinate of the target node and the sliding distance, wherein the target node is the node of the node list displayed at the lowest part in the view.
The nodes in the node list may be represented by a node list x. The node sequence number of the node list starts from 0. The target node may be a node list index node. And judging whether the node list subscript is not equal to the node list length minus one, if the node list subscript is not equal to the node list length minus one, calculating a downward offset, wherein the downward offset is the value of the list [ index+1] element minus the sliding distance from the top distance. Wherein, the top refers to the top of the dom structure where the node list is located.
If the node list subscript is equal to the node list length minus one, the downward offset is infinity.
Further, an upward offset is calculated, which is the target node (list [ index ] element) to dom top distance minus the sliding distance.
And 130, determining a node list index according to the size relation between the offset and the offset constant.
Optionally, determining the node list subscript according to the magnitude relation of the offset and the offset constant may be implemented as:
step 301, determining whether the downward offset is less than or equal to an offset constant.
And 302, if the downward offset is smaller than or equal to the offset constant, determining the index of the next undisplayed node of the target node in the node list as the node list index, and adding one to the node list index.
Wherein the list index is index, and the next node not shown in the target node is index+1. The list index being incremented by one means that the list index is incremented by one based on the current value. And assigning the change content corresponding to the list [ index+1] to a value to be inversely responsive to the change in the mobiscrol, and then adding one to the list index.
Further, after determining whether the downward offset is equal to or less than the offset constant, the method further includes:
step 303, if the downward offset is greater than the offset constant, determining whether the upward offset is greater than the offset constant.
If the upward offset is greater than the offset constant, step 304 is performed. If the upward offset is less than the offset constant, step 307 is performed.
Step 304, if the upward offset is greater than the offset constant, determining whether the subscript of the node list is not zero.
If the index of the node list is not zero, step 305 is performed. If the index of the node list is zero, step 306 is performed.
Step 305, if the index of the node list is not zero, determining the index of the last displayed node of the target node as the index of the node list, and subtracting one from the index of the node list.
Step 306, if the subscript of the node list is zero, exiting.
Step 307, if the upward offset is smaller than the offset constant, exiting.
Judging whether the downward offset is smaller than or equal to the offset constant, if so, assigning the change content corresponding to the list [ index+1] to a value needing to respond to the change in the mobile scroll, and then adding 1 to the list index; otherwise, it is determined whether the upward offset is greater than an offset constant. If so, it is determined whether the list index is 0. If 0, exit. If the value is not 0, the change content corresponding to the list [ index-1] is assigned to a value needing to respond to the change in the mobile scroll, and then the list index is reduced by 1.
And 140, feeding back the content of the target node corresponding to the node list index to a preset plug-in, so that the preset plug-in outputs the anti-response content corresponding to the sliding operation.
According to the stream data processing method provided by the embodiment of the application, the sliding distance is determined according to the sliding operation; calculating the corresponding offset of the sliding distance in the document object model; determining node list subscripts according to the size relation between the offset and the offset constant; and feeding back the content of the target node corresponding to the node list index to a preset plug-in, so that the preset plug-in outputs the anti-response content corresponding to the sliding operation. According to the response method for the sliding operation, the sliding distance can be obtained according to the sliding operation of the user, the node list subscript is determined according to the size relation between the offset and the offset constant, and the response content output by the preset plug-in is determined according to the node list subscript. The parameters used in the calculation process are not influenced by other sliding events, so that the anti-response content corresponding to the sliding operation output by the preset plug-in unit can be accurately determined, and the anti-response accuracy of the sliding operation is improved. And quickly determining the node list index according to the sliding distance, so that the preset plug-in unit can smoothly output contents.
Example two
Fig. 2 is a flowchart of a response method of a sliding operation according to an embodiment of the present application, which further illustrates the above embodiment, including:
step 201, configuring node class with anti-response change requirements in a document object model; the node columns are determined according to the node class of the configuration, which is in inverse response to the changing requirement.
Step 202, determining the offset constant of the view according to the screen width.
Step 203, determining the sliding distance according to the sliding operation.
Step 204, calculating the downward offset.
If the node list subscript is not equal to the node list length minus one, determining a downward offset according to the top coordinate of the document object model, the next undisplayed node coordinate of the target node and the sliding distance, wherein the target node is the node of the node list displayed at the lowest part in the view. If the node list subscript is equal to the node list length minus one, the downward offset is infinity.
Step 205, calculating the upward offset.
Subtracting the sliding distance from the target node to the top of the dom structure, to obtain the upward offset.
Step 206, judging whether the downward offset is smaller than or equal to the offset constant;
step 207, if the downward offset is less than or equal to the offset constant, determining the index of the next node not shown in the target node in the node list as the node list index, and adding one to the node list index.
Step 208, if the downward offset is greater than the offset constant, determining whether the upward offset is greater than the offset constant.
Step 209, if the upward offset is greater than the offset constant, determining whether the subscript of the node list is not zero.
Step 210, if the subscript of the node list is not zero, determining the subscript of the last displayed node of the target node as the node list subscript, and subtracting one from the node list subscript.
Step 211, feeding back the content of the target node corresponding to the node list index to the preset plugin, so that the preset plugin outputs the anti-response content corresponding to the sliding operation.
The method has the anti-response capability, prevents possible sliding events from being captured unknown, achieves high accuracy and smooth response, and can be suitable for various sliding plug-ins and scenes needing the anti-response capability, and achieves the effects of smooth sliding and self-definition of boundary values.
Example III
Fig. 3 is a schematic structural diagram of a stream data processing apparatus according to a third embodiment of the present application, where the present embodiment is applicable to a situation of performing an anti-response according to a user sliding operation, and the method may be performed by a mobile terminal, where the mobile terminal may be a device with a touch screen, such as a smart phone, a tablet computer, or the like, and the apparatus specifically includes: a sliding distance determination module 310, an offset calculation module 320, a subscript determination module 330, and a plug-in response module 340.
A sliding distance determining module 310 for determining a sliding distance according to a sliding operation;
an offset calculating module 320, configured to calculate an offset corresponding to the sliding distance in the document object model;
a subscript determining module 330, configured to determine a node list subscript according to a magnitude relation between the offset and the offset constant;
and the plug-in response module 340 is configured to feed back the content of the target node corresponding to the node list index to the preset plug-in, so that the preset plug-in outputs the anti-response content corresponding to the sliding operation.
On the basis of the embodiment, the device further comprises a configuration module and an offset constant determining module. Wherein, the configuration module is used for:
configuring nodes with anti-response changing requirements in a document object model;
and determining a node list according to the configured nodes with the anti-response change requirements.
On the basis of the above embodiment, the device further comprises an offset constant determining module, wherein the offset constant determining module is used for: an offset constant for the view is determined based on the screen width.
On the basis of the above embodiment, the offset calculation module 320 is configured to:
if the node list subscript is not equal to the node list length minus one, determining a downward offset according to the top coordinate of the document object model, the next undisplayed node coordinate of the target node and the sliding distance, wherein the target node is the node of the node list displayed at the lowest part in the view;
if the node list subscript is equal to the node list length minus one, the downward offset is infinity;
subtracting the sliding distance from the target node to the top of the dom structure, to obtain the upward offset.
On the basis of the above embodiment, the subscript determination module 330 is configured to:
judging whether the downward offset is smaller than or equal to an offset constant or not;
if the downward offset is smaller than or equal to the offset constant, determining the index of the next undisplayed node of the target node in the node list as the node list index, and adding one to the node list index.
On the basis of the above embodiment, the subscript determination module 330 is further configured to:
if the downward offset is greater than the offset constant, judging whether the upward offset is greater than the offset constant;
if the upward offset is greater than the offset constant, judging whether the subscript of the node list is not zero;
if the subscript of the node list is not zero, determining the subscript of the last displayed node of the target node as the subscript of the node list, and subtracting one from the subscript of the node list;
and if the subscript of the node list is zero, exiting.
On the basis of the above embodiment, the node list contains data recorded on a time basis; the preset plug-in is a mobiscrol component.
The embodiment of the present application provides a stream data processing apparatus, a sliding distance determining module 310, configured to determine a sliding distance according to a sliding operation; an offset calculating module 320, configured to calculate an offset corresponding to the sliding distance in the document object model; a subscript determining module 330, configured to determine a node list subscript according to a magnitude relation between the offset and the offset constant; and the plug-in response module 340 is configured to feed back the content of the target node corresponding to the node list index to the preset plug-in, so that the preset plug-in outputs the anti-response content corresponding to the sliding operation. According to the response method for the sliding operation, the sliding distance can be obtained according to the sliding operation of the user, the node list subscript is determined according to the size relation between the offset and the offset constant, and the response content output by the preset plug-in is determined according to the node list subscript. The parameters used in the calculation process are not influenced by other sliding events, so that the anti-response content corresponding to the sliding operation output by the preset plug-in unit can be accurately determined, and the anti-response accuracy of the sliding operation is improved. And quickly determining the node list index according to the sliding distance, so that the preset plug-in unit can smoothly output contents.
The stream data processing device provided by the embodiment of the application can execute the stream data processing method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 is a schematic structural diagram of a response terminal for sliding operation according to a fourth embodiment of the present application, and as shown in fig. 4, the response terminal for sliding operation includes a processor 40, a memory 41, an input device 42 and an output device 43; the number of processors 40 in the response terminal to the sliding operation may be one or more, and one processor 40 is taken as an example in fig. 4; the processor 40, the memory 41, the input device 42 and the output device 43 in the response terminal to the sliding operation may be connected by a bus or other means, for example by a bus connection in fig. 4.
The memory 41 is a computer-readable storage medium that can be used to store a software program, a computer-executable program, and modules such as program instructions/modules corresponding to the stream data processing method in the embodiment of the present application (for example, a sliding distance determination module 310, an offset calculation module 320, a subscript determination module 330, a plug-in response module 340, a configuration module, and an offset constant determination module in the stream data processing apparatus). The processor 40 performs various functional applications of the response terminal for a sliding operation and data processing, that is, implements the above-described stream data processing method by running software programs, instructions, and modules stored in the memory 41.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 41 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 41 may further include memory remotely located relative to processor 40, which may be connected to the response terminal for the sliding operation via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the responsive terminal for a sliding operation. The output means 43 may comprise a display device such as a display screen.
Example five
A fifth embodiment of the present application also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are for performing a response method of a sliding operation, the method comprising:
determining a sliding distance according to the sliding operation;
calculating the corresponding offset of the sliding distance in the document object model;
determining node list subscripts according to the size relation between the offset and the offset constant;
and feeding back the content of the target node corresponding to the node list index to a preset plug-in, so that the preset plug-in outputs the anti-response content corresponding to the sliding operation.
On the basis of the above embodiment, before determining the sliding distance according to the sliding operation, further comprising:
configuring nodes with anti-response changing requirements in a document object model;
and determining a node list according to the configured nodes with the anti-response change requirements.
On the basis of the above embodiment, before determining the node list subscript according to the magnitude relation between the offset and the offset constant, the method further includes:
an offset constant for the view is determined based on the screen width.
On the basis of the above embodiment, calculating the offset amount of the sliding distance corresponding to the document object model includes:
if the node list subscript is not equal to the node list length minus one, determining a downward offset according to the top coordinate of the document object model, the next undisplayed node coordinate of the target node and the sliding distance, wherein the target node is the node of the node list displayed at the lowest part in the view;
if the node list subscript is equal to the node list length minus one, the downward offset is infinity;
subtracting the sliding distance from the target node to the top of the dom structure, to obtain the upward offset.
On the basis of the above embodiment, determining the node list subscript according to the magnitude relation between the offset and the offset constant includes:
judging whether the downward offset is smaller than or equal to an offset constant or not;
if the downward offset is smaller than or equal to the offset constant, determining the index of the next undisplayed node of the target node in the node list as the node list index, and adding one to the node list index.
On the basis of the above embodiment, after determining whether the downward offset is equal to or smaller than the offset constant, the method further includes:
if the downward offset is greater than the offset constant, judging whether the upward offset is greater than the offset constant;
if the upward offset is greater than the offset constant, judging whether the subscript of the node list is not zero;
if the subscript of the node list is not zero, determining the subscript of the last displayed node of the target node as the subscript of the node list, and subtracting one from the subscript of the node list;
and if the subscript of the node list is zero, exiting.
On the basis of the above embodiment, the node list contains data recorded on a time basis; the preset plug-in is a mobiscrol component.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present application is not limited to the above method operations, and may also perform the related operations in the stream data processing method provided in any embodiment of the present application.
From the above description of embodiments, it will be clear to a person skilled in the art that the present application may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., comprising several instructions for causing a response terminal (which may be a personal computer, a server, a network device, etc.) for performing the method of the embodiments of the present application.
It should be noted that, in the embodiment of the apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding function can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.

Claims (6)

1. A method of responding to a sliding operation, comprising:
determining a sliding distance according to the sliding operation;
calculating the corresponding offset of the sliding distance in the document object model;
determining node list subscripts according to the size relation between the offset and the offset constant;
feeding back the content of the target node corresponding to the node list index to a preset plug-in unit so that the preset plug-in unit outputs the anti-response content corresponding to the sliding operation;
before determining the node list subscript according to the magnitude relation of the offset and the offset constant, the method further comprises:
the offset constant is calculated by the following formula: offset constant=100 (screen width/750) ×c, and the value range of the preset parameter C is 0.9-3.0;
the calculating the corresponding offset of the sliding distance in the document object model comprises the following steps:
the target node is the node of which the node list is displayed at the lowest part in the view;
the nodes in the node list are represented by a node list [ x ], the node sequence number of the node list starts from 0, the target node is a node list [ index ] node, whether the node list subscript is not equal to the node list length minus one is judged, if the node list subscript is not equal to the node list length minus one, the downward offset is calculated, and the value of the downward offset is the value of the element of the list [ index+1] subtracted from the top distance; wherein, the top refers to the top of the dom structure where the node list is located;
if the node list subscript is equal to the node list length minus one, the downward offset is infinity;
further, calculating an upward offset, wherein the upward offset is the sliding distance subtracted from the distance from the target node to the dot top;
the determining the node list subscript according to the magnitude relation between the offset and the offset constant comprises the following steps:
judging whether the downward offset is smaller than or equal to the offset constant, if so, assigning the change content corresponding to the list [ index+1] to a value needing to respond to the change in the mobile scroll, and then adding 1 to the list index; otherwise, judging whether the upward offset is larger than an offset constant or not; if yes, judging whether the list subscript is 0; if 0, exiting; if the value is not 0, the change content corresponding to the list [ index-1] is assigned to a value needing to respond to the change in the mobile scroll, and then the list index is reduced by 1.
2. The method according to claim 1, further comprising, before determining the sliding distance according to the sliding operation:
configuring nodes with anti-response changing requirements in a document object model;
and determining a node list according to the configured node class with the anti-response change requirement.
3. The method of claim 1, wherein the list of nodes contains data recorded on a time basis; the preset plug-in is a mobiscrol component.
4. A sliding operation responding device, comprising:
a sliding distance determining module for determining a sliding distance according to a sliding operation;
the offset calculation module is used for calculating the corresponding offset of the sliding distance in the document object model;
the subscript determining module is used for determining subscripts of the node list according to the magnitude relation between the offset and the offset constant;
the plug-in response module is used for feeding back the content of the target node corresponding to the node list subscript to a preset plug-in so that the preset plug-in outputs the anti-response content corresponding to the sliding operation;
the offset constant determining module is used for: the offset constant is calculated by the following formula: offset constant=100 (screen width/750) ×c, and the value range of the preset parameter C is 0.9-3.0;
the offset calculation module is used for: the target node is the node of which the node list is displayed at the lowest part in the view;
the nodes in the node list are represented by a node list [ x ], the node sequence number of the node list starts from 0, the target node is a node list [ index ] node, whether the node list subscript is not equal to the node list length minus one is judged, if the node list subscript is not equal to the node list length minus one, the downward offset is calculated, and the value of the downward offset is the value of the element of the list [ index+1] subtracted from the top distance; wherein, the top refers to the top of the dom structure where the node list is located;
if the node list subscript is equal to the node list length minus one, the downward offset is infinity;
further, calculating an upward offset, wherein the upward offset is the sliding distance subtracted from the distance from the target node to the dot top;
the subscript determining module is used for: judging whether the downward offset is smaller than or equal to the offset constant, if so, assigning the change content corresponding to the list [ index+1] to a value needing to respond to the change in the mobile scroll, and then adding 1 to the list index; otherwise, judging whether the upward offset is larger than an offset constant or not; if yes, judging whether the list subscript is 0; if 0, exiting; if the value is not 0, the change content corresponding to the list [ index-1] is assigned to a value needing to respond to the change in the mobile scroll, and then the list index is reduced by 1.
5. A response terminal for a sliding operation, the terminal comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of responding to a sliding operation as recited in any one of claims 1-3.
6. A storage medium containing computer executable instructions for performing the response method of a sliding operation as claimed in any one of claims 1-3 when executed by a computer processor.
CN202210219667.5A 2022-03-08 2022-03-08 Response method and device for sliding operation, server and storage medium Active CN114579031B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210219667.5A CN114579031B (en) 2022-03-08 2022-03-08 Response method and device for sliding operation, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210219667.5A CN114579031B (en) 2022-03-08 2022-03-08 Response method and device for sliding operation, server and storage medium

Publications (2)

Publication Number Publication Date
CN114579031A CN114579031A (en) 2022-06-03
CN114579031B true CN114579031B (en) 2023-11-21

Family

ID=81773623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210219667.5A Active CN114579031B (en) 2022-03-08 2022-03-08 Response method and device for sliding operation, server and storage medium

Country Status (1)

Country Link
CN (1) CN114579031B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677562A (en) * 2013-11-12 2014-03-26 北京奇虎科技有限公司 Time display method and time display device
CN109885375A (en) * 2019-03-05 2019-06-14 百度在线网络技术(北京)有限公司 A kind of list sliding display methods and mobile terminal
CN111783007A (en) * 2020-07-31 2020-10-16 迈普通信技术股份有限公司 Display rendering method and device, electronic equipment and storage medium
CN113204401A (en) * 2021-05-06 2021-08-03 Oppo广东移动通信有限公司 Browser rendering method, terminal and storage medium
CN113467871A (en) * 2021-06-28 2021-10-01 康键信息技术(深圳)有限公司 H5 page display method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9049258B2 (en) * 2009-09-17 2015-06-02 Border Stylo, LLC Systems and methods for anchoring content objects to structured documents

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677562A (en) * 2013-11-12 2014-03-26 北京奇虎科技有限公司 Time display method and time display device
CN109885375A (en) * 2019-03-05 2019-06-14 百度在线网络技术(北京)有限公司 A kind of list sliding display methods and mobile terminal
CN111783007A (en) * 2020-07-31 2020-10-16 迈普通信技术股份有限公司 Display rendering method and device, electronic equipment and storage medium
CN113204401A (en) * 2021-05-06 2021-08-03 Oppo广东移动通信有限公司 Browser rendering method, terminal and storage medium
CN113467871A (en) * 2021-06-28 2021-10-01 康键信息技术(深圳)有限公司 H5 page display method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114579031A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
CN102929599B (en) The amending method at browser of mobile terminal interface and device, mobile terminal
CN110806863A (en) Interface document generation method and device, electronic equipment and storage medium
CN108874393B (en) Rendering method, rendering device, storage medium and computer equipment
CN112711418B (en) Front-end interface layout method and device for multiple components, electronic equipment and storage medium
CN112631580B (en) Data processing method and device and computing equipment
CN112631591B (en) Method, apparatus, device and computer readable storage medium for table element linkage
CN117193602A (en) Method and device for switching application internal interfaces
CN111581069A (en) Data processing method and device
CN109284488B (en) Method, device and medium for modifying front-end table column data based on local storage
CN110968314A (en) Page generation method and device
CN110941428A (en) Website creation method and device
CN112306486B (en) Interface generation method and device, server and storage medium
CN111782213A (en) Dynamic control page generation system based on DOM
CN111694549A (en) Data processing method, device, terminal and medium
CN114579031B (en) Response method and device for sliding operation, server and storage medium
CN103514203A (en) Method and system for browsing webpage in reading mode
CN115186214A (en) Page configuration method and device, computer equipment and computer readable storage medium
CN114489645A (en) Form generation construction method, system and storage medium based on Vue and Element-UI
CN110502713A (en) Web page resources processing method, device, electronic equipment and storage medium
CN112749528A (en) Text processing method and device, electronic equipment and computer readable storage medium
CN116009863B (en) Front-end page rendering method, device and storage medium
CN116909563B (en) Page generation method, terminal device and storage medium
CN117707493A (en) Front-end interface generation method and device, electronic equipment and storage medium
CN114217877A (en) Operation processing method, device, equipment and medium based on page interaction component
CN118152647A (en) Data processing method, device, equipment and medium

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