CN106648282B - Method and device for processing indexes in webpage - Google Patents

Method and device for processing indexes in webpage Download PDF

Info

Publication number
CN106648282B
CN106648282B CN201510729523.4A CN201510729523A CN106648282B CN 106648282 B CN106648282 B CN 106648282B CN 201510729523 A CN201510729523 A CN 201510729523A CN 106648282 B CN106648282 B CN 106648282B
Authority
CN
China
Prior art keywords
area
index
target object
cursor pointer
initial position
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
CN201510729523.4A
Other languages
Chinese (zh)
Other versions
CN106648282A (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201510729523.4A priority Critical patent/CN106648282B/en
Publication of CN106648282A publication Critical patent/CN106648282A/en
Application granted granted Critical
Publication of CN106648282B publication Critical patent/CN106648282B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects

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 method and a device for processing indexes in a webpage. Wherein, the method comprises the following steps: acquiring a target object of an initial position of a cursor pointer, wherein the target object is an object representing a webpage element in a webpage; judging whether the obtained target object contains indexes or not; under the condition that the obtained target object contains the index, obtaining a moving track, wherein the moving track is a track of the cursor pointer moving from the initial position to the end position; and controlling the operation of the index according to the moving track. The technical problem that in the prior art, the operation of deleting or adding indexes is too complicated is solved.

Description

Method and device for processing indexes in webpage
Technical Field
The application relates to the field of data processing, in particular to a method and a device for processing indexes in a webpage.
Background
The indexes are the key points of the performance system, and how to carry out more friendly operation on the indexes or the addition or deletion operation which is more consistent with the operation mode of the user is the key point of whether various performance systems can be approved by the client.
In the prior art, various processing methods of performance systems generally click an edit button in the system, and after the edit button is clicked, a control page managed by a page index is displayed as shown in fig. 1. The left end of each index comprises a check box, and a user can add or delete the index by checking or canceling the check box. In the case that the user confirms the addition, the selected index is added to the left area as shown in fig. 1, and the unchecked index is deleted from the area as shown in fig. 1 and appears in the right list as shown in fig. 1.
According to the method for deleting or adding the index, the index to be added or deleted is selected in the check box, and the index is deleted or added after the determining button is clicked. The operation steps are complicated, so that the operation of the user is inconvenient, and when the indexes are more, the user cannot search conveniently.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a method and a device for processing indexes in a webpage, and the method and the device are used for at least solving the technical problem that the operation of deleting or adding the indexes in the prior art is too complicated.
According to an aspect of an embodiment of the present application, a method for processing an indicator in a web page is provided, where the method includes: acquiring a target object of an initial position of a cursor pointer, wherein the target object is an object representing a webpage element in the webpage; judging whether the obtained target object contains indexes or not; under the condition that the obtained target object is judged to contain the index, obtaining a moving track, wherein the moving track is a track of the cursor pointer moving from the initial position to the end position; and controlling the operation of the index according to the moving track.
Further, the determining whether the acquired target object includes an index includes: judging whether the obtained target object contains an index identifier of the index; and determining that the target object comprises the index under the condition that the target object comprises the index identification.
Further, the operation of controlling the index according to the movement trajectory includes: and when the obtained movement track is that the position of the target object moves from a first area to a second area, deleting the index in the first area, and adding the index in the second area, wherein the first area is an area where the added index is located, and the second area is an area where the index to be added is located.
Further, controlling the operation on the index according to the movement trajectory further includes: when the situation that the moving track is that the position of the target object moves from the second area to the first area is obtained, sending a request message to a server, wherein the request message is a message for requesting to add the index in the first area; receiving a response message from the server; when the response message is an empty message, adding the index to the first area, and deleting the index in the second area; and when the response message contains error prompt information, returning the position of the target object to the initial position.
Further, before obtaining the target object at the position of the cursor pointer, the method further comprises: and judging whether the cursor pointer generates a trigger instruction at the initial position, wherein under the condition that the cursor pointer generates the trigger instruction at the initial position, a target object of the cursor pointer at the initial position is obtained.
Further, when the trigger instruction is terminated, the position of the cursor pointer at the termination time is determined as the termination position.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for processing an index in a web page, the apparatus including: the first acquisition unit is used for acquiring a target object of an initial position of a cursor pointer, wherein the target object is an object representing a webpage element in the webpage; the first judgment unit is used for judging whether the acquired target object contains an index or not; a second obtaining unit, configured to obtain a movement trajectory when it is determined that the obtained target object includes the index, where the movement trajectory is a trajectory along which the cursor pointer moves from the initial position to an end position; and a control unit for controlling an operation on the index according to the movement trajectory.
Further, the first judgment unit includes: the judging module is used for judging whether the acquired target object contains the index identification of the index; and the determining module is used for determining that the target object comprises the index under the condition that the target object comprises the index identification.
Further, the control unit includes: and the first deleting module is used for deleting the index in the first area and adding the index in the second area when the obtained moving track is that the position of the target object moves from the first area to the second area, wherein the first area is the area where the added index is located, and the second area is the area where the index to be added is located.
Further, the control unit further includes: a sending module, configured to send a request message to a server when it is obtained that the movement trajectory is that the position of the target object moves from the second area to the first area, where the request message is a message requesting to add the indicator in the first area; the receiving module is used for receiving the response message from the server; an adding module, configured to add the indicator to the first area and delete the indicator in the second area when the response message is an empty message; and a returning module, configured to return the position of the target object to the initial position when the response message includes error prompt information.
In the embodiment of the application, a target object for acquiring an initial position of a cursor pointer is adopted, wherein the target object is an object for representing a webpage element in the webpage; judging whether the obtained target object contains indexes or not; under the condition that the obtained target object is judged to contain the index, obtaining a moving track, wherein the moving track is a track of the cursor pointer moving from the initial position to the end position; and controlling the operation mode of the index according to the moving track. By acquiring the target object at the position of the cursor pointer, and moving the cursor pointer to the termination position under the condition that the target object is judged to contain the index, the purpose of simplifying the operation steps of adding or deleting the index is achieved only for acquiring the moving track of the cursor pointer, and the index is added or deleted according to the moving track, compared with a method for adding or deleting the index through a check box in the prior art, the technical effect of adding or deleting the index can be achieved by moving the cursor pointer, and the technical problem that the operation of deleting or adding the index is too complicated in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram of pointer processing in a web page according to the prior art;
FIG. 2 is a flowchart of a method for processing metrics in a web page according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of an alternative method for processing metrics in a web page according to an embodiment of the present application; and
fig. 4 is a schematic diagram of a device for processing an indicator in a web page according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present application, there is provided a method embodiment of a method for processing metrics in a web page, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 2 is a flowchart of a method for processing an index in a web page according to an embodiment of the present application, and as shown in fig. 2, the method includes steps S102 to S108 as follows:
step S102, a target object of the initial position of the cursor pointer is obtained, wherein the target object is an object representing a webpage element in the webpage.
Specifically, in the embodiment of the present application, the cursor pointer moves in the web page, wherein the cursor pointer is controlled to move in the web page by a hardware device connected to the terminal device. The hardware equipment is connected to the terminal equipment in a wired and wireless mode, and the hardware equipment comprises any one of equipment such as a mouse, a touch pad, a control rod, a key and a keyboard. When a certain position file or folder in a webpage is selected by a cursor pointer, the position is an initial position, and it needs to be noted that the file selected by the cursor pointer at the initial position may or may not contain an index; if the file includes the index, the number of the index may be one or more.
It should be noted that the target object is a dom (document object) object, and the dom object includes web page elements in a web page, where the web page elements include characters, pictures, audio, animation, video, and so on. While the target object of the initial position is acquired, the position coordinates of the target object (i.e., the coordinates of the initial position) may also be acquired.
Step S104, determining whether the acquired target object includes an index.
Specifically, in the embodiment of the present application, the index is an index in the performance system, for example, the index may be "internet influence", which may be further classified into "mobile terminal access amount", "user influence in website", "search listing page visited rate", and the like, and "user experience", which may further include an index such as "search node click rate in website".
And step S106, acquiring a moving track under the condition that the acquired target object is judged to contain the index, wherein the moving track is the track of the cursor pointer moving from the initial position to the end position.
Specifically, if the target object includes the index, the coordinates of the target object follow the coordinates of the cursor pointer; if the target object does not include the index, the coordinates of the target object do not follow the coordinates of the cursor pointer. And when the cursor pointer moves to the termination position, acquiring the moving track of the cursor pointer, wherein when the target object comprises the cursor, the moving track of the cursor pointer is the moving track of the target object.
And step S108, controlling the operation of the index according to the moving track. Specifically, whether the index is deleted or added is determined according to the acquired movement track of the cursor pointer.
According to the method for processing the indexes in the webpage, the target object at the position of the cursor pointer is obtained, the cursor pointer is moved to the end position under the condition that the target object is judged to contain the indexes, the cursor pointer is only moved to the end position to obtain the moving track of the cursor pointer, the indexes are added or deleted according to the moving track, and compared with a method for adding or deleting the indexes through check boxes in the prior art, the purpose of simplifying the operation steps of adding or deleting the indexes is achieved, the technical effect that the indexes can be added or deleted through moving the cursor pointer is achieved, and the technical problem that the operation for deleting or adding the indexes in the prior art is too complicated is solved.
Optionally, before obtaining the target object at the position of the cursor pointer, the method for processing the index in the web page provided by the present application further includes the following steps: and judging whether the cursor pointer generates a trigger instruction at the initial position, wherein under the condition that the cursor pointer is judged to generate the trigger instruction at the initial position, the target object of the cursor pointer at the initial position is obtained.
Specifically, if the cursor pointer is controlled by the mouse, the file at the initial position can be selected after the cursor pointer clicks the left button of the mouse at the initial position, and the trigger instruction is generated at the time of selecting the file at the initial position. After the trigger instruction is generated, an initial position target object is acquired.
And if the trigger instruction is terminated, determining the position of the cursor pointer at the moment when the trigger instruction is terminated as the termination position. Specifically, when the user selects a file at the initial position by mouse click, the file can be dragged to any position in the web page. When the user releases the left key of the mouse, the triggering instruction is terminated, wherein the position of the cursor pointer is the termination position at the moment when the triggering instruction is terminated. The track of the cursor pointer dragging the file from the initial position to the end position is the moving track in the embodiment of the application. It should be noted that the file selected by the cursor pointer at the initial position may or may not include the index; if the file includes the index, the number of the index may be one or more.
Optionally, the determining whether the obtained target object includes the index includes steps S1041 to S1043:
step S1041, determining whether the acquired target object includes an index identifier of an index.
Step S1043, determining that the target object includes the index when it is determined that the target object includes the index identifier.
Specifically, whether the target object contains the index is determined by determining whether the target object contains an index identifier, wherein the index identifier may be an identifier uniquely representing the index, such as ID information or text information of the index. And if the target object contains the index identification, determining that the target object contains the index, wherein the index is the index which the user actually wants to add or delete.
Optionally, the operation of controlling the index according to the movement trajectory includes the following step S1081:
step S1081, when it is obtained that the position of the target object with the movement track is moved from the first area to the second area, deleting the index in the first area, and adding the index in the second area, where the first area is an area where the added index is located, and the second area is an area where the index to be added is located.
The initial position of the cursor pointer can be positioned in the first area or the second area, and can also be positioned in the area outside the first area and the second area; the termination position of the file selected by the cursor pointer dragging can be positioned in the first area and the second area, and can also be positioned in the area outside the first area and the second area. Specifically, when the initial position of the cursor pointer is located in the first region and the terminal position of the cursor pointer after the user drags is located in the second region, it indicates that the user wishes to delete the pointer that has been added to the first region; when the initial position of the cursor pointer is located in the first area and the termination position of the cursor pointer after being dragged by the user is located in the second area, indicating that the user wants to add the index into the second area; if the above conditions are not met, no operation is performed on the indexes.
If the moving track of the cursor pointer is judged to be moved from the first area to the second area, the index is deleted from the first area, and the index is added to the second area, so that the user can continuously add the index to the first area in subsequent operation.
Optionally, the operation of controlling the index according to the movement trajectory further includes the following steps S1083 to S1089:
step S1083, when it is obtained that the position of the target object moves from the second area to the first area with the movement track, sending a request message to the server, where the request message is a message requesting to add an index in the first area.
Step S1085, a response message from the server is received.
Step S1087, in a case where the response message is an empty message, adds the index to the first area, and deletes the index in the second area.
In step S1089, when the response message includes the error presentation information, the position of the target object is returned to the initial position.
Specifically, if it is determined that the moving track of the cursor pointer moves from the second area to the first area, it indicates that the user wishes to add the pointer to be added in the second area to the first area. At this time, the system sends a message to the server requesting that the index be added within the first region. And the server replies a response message under the condition of receiving the request message, wherein the response message is a message for confirming whether to add the index into the first area or not. If the response message is an empty message and indicates that the indicator is confirmed to be added to the first area, adding the indicator to the first area, adding the dragged target object in the first area, and deleting the indicator successfully added to the first area in the second area; if the response message is a non-empty message and the response message contains error prompt information, the index is not added to the first area, and at this time, the coordinate of the target object is returned to the coordinate of the initial position from the coordinate of the cursor pointer which follows.
If the initial position of the cursor pointer is located in the first area and the termination position is also located in the first area, returning the coordinates of the target object dragged to the termination position by the cursor pointer to the coordinates of the initial position without any operation; similarly, if the initial position of the cursor pointer is located in the second region and the end position is also located in the second region, the coordinates of the target object dragged to the end position by the cursor pointer are returned to the coordinates of the initial position without any operation.
Fig. 3 is a flowchart of another alternative method for processing an indicator in a web page according to an embodiment of the present application, and as shown in fig. 3, the method includes the following steps S202 to S224:
step S202, judging whether the cursor pointer generates a trigger instruction at the initial position, wherein, under the condition of generating the trigger instruction, the step S204 is executed, otherwise, the step S202 is continuously executed, and whether the trigger instruction is generated or not is continuously judged. Specifically, it is assumed that when the movement of the cursor pointer is controlled by the mouse, the left button of the mouse is clicked, i.e., a trigger instruction is generated.
In step S204, a target object at the initial position of the cursor pointer is obtained. Specifically, a target object of an initial position of a cursor pointer at a moment when the trigger instruction is generated is obtained, where in this embodiment of the present application, the target object is a dom object.
In step S206, it is determined whether the acquired target object includes an index. If yes, executing step S208; if the index is not included, step S210 is executed. Specifically, whether the target object contains the index is determined by determining whether the target object contains an index identification of the index, wherein the index identification may be ID information, text information, or the like of the index, which uniquely represents the index.
In step S208, a movement trajectory is acquired. When the user drags the cursor pointer under the condition that the target object is judged to contain the index identification of the index, the coordinates of the target object always follow the coordinates of the cursor pointer. When the user drags the cursor pointer to any position and releases the left mouse button at the position, the position is the termination position. The track of the cursor pointer moving from the initial position to the end position is the moving track.
In step S210, no operation is performed. If the target object is judged to contain the index, the coordinates of the target object do not follow the coordinates of the cursor pointer, and no operation is performed.
In step S212, it is determined whether the movement track moves from the first area to the second area. If yes, go to step S214; if not, go to step S216. The first area is the area where the added index is located, and the second area is the area where the index to be added is located. If the moving track moves from the first area to the second area, the fact that the user actually wants to delete the added indexes in the first area is indicated; if the moving track moves from the second area to the first area, the indication indicates that the user actually wants to add the index in the first area.
In step S214, the index is deleted in the first area and the index is added in the second area. And under the condition that the movement track is judged to be moved from the first area to the second area, deleting the index in the first area, and adding the index in the second area, so that the user can add the index in the first area next time, and the space of the page in the webpage is saved.
In step S216, it is determined whether the movement track moves from the second area to the first area. If yes, go to step S218; if not, go to step S224.
Step S218, sending the request message to the server. And sending a request message to the server under the condition that the movement track is judged to move from the second area to the first area, and receiving a response message replied by the server after the server receives the request message.
Step S220, determine whether the received response message is an empty message. When the response message from the server is determined to be an empty message, step S222 is executed to add the index into the first area and delete the index in the second area, so that the space of the page in the webpage is saved; and under the condition that the response message from the server contains the error prompt information, no operation is carried out, and the flow is ended.
Step S222, adding the index to the first area and deleting the index in the second area.
In step S224, the position of the target object is returned to the initial position. If the obtained movement track does not move from the first area to the second area or from the second area to the first area, at this time, the position of the target object returns to the initial position, and no operation is performed.
According to the method for processing the indexes in the webpage, the indexes are added and deleted in a dragging mode, and the operation is simpler and more convenient. In addition, in the prior art, the multi-step adding process can be completed through one-step dragging, the dragging is more in line with the operation habit and the operation thinking of the user, the user experience can be improved, and the index processing speed is increased.
The embodiment of the present application further provides a device for processing an index in a web page, where the device is mainly used to execute the method for processing the index in the web page provided in the embodiment of the present application, and a specific description is given below to the device for processing the index in the web page provided in the embodiment of the present application.
Fig. 4 is a schematic diagram of a device for processing an index in a web page according to an embodiment of the present application, and as shown in fig. 4, the device for processing an index in a web page mainly includes a first obtaining unit 10, a first judging unit 20, a second obtaining unit 30, and a control unit 40, where:
the first obtaining unit 10 is configured to obtain a target object at an initial position of a cursor pointer, where the target object is an object representing a web page element in a web page.
Specifically, in the embodiment of the present application, the cursor pointer moves in the web page, wherein the cursor pointer is controlled to move in the web page by a hardware device connected to the terminal device. The hardware equipment is connected to the terminal equipment in a wired and wireless mode, and the hardware equipment comprises any one of equipment such as a mouse, a touch pad, a control rod, a key and a keyboard. When a certain position file or folder in a webpage is selected by a cursor pointer, the position is an initial position, and it needs to be noted that the file selected by the cursor pointer at the initial position may or may not contain an index; if the file includes the index, the number of the index may be one or more.
It should be noted that the target object is a dom (document object) object, and the dom object includes web page elements in a web page, where the web page elements include characters, pictures, audio, animation, video, and so on. While the target object of the initial position is acquired, the position coordinates of the target object (i.e., the coordinates of the initial position) may also be acquired.
The first determination unit 20 is configured to determine whether the acquired target object includes an index.
Specifically, in the application embodiment, the index is an index in the performance system, for example, the index may be "internet influence" and "user experience", where the "internet influence" may be further classified into "mobile terminal access amount", "user influence in website", "search listing page visited rate", and the like, and the "user experience" may further include an index such as "search node click rate in website".
And a second obtaining unit 30, configured to, in a case where it is determined that the obtained target object includes the index, obtain a movement trajectory, where the movement trajectory is a trajectory in which the cursor pointer moves from the initial position to the end position.
Specifically, if the target object includes the index, the coordinates of the target object follow the coordinates of the cursor pointer; if the target object does not include the index, the coordinates of the target object do not follow the coordinates of the cursor pointer. And when the cursor pointer moves to the termination position, acquiring the moving track of the cursor pointer, wherein when the target object comprises the cursor, the moving track of the cursor pointer is the moving track of the target object.
And a control unit 40 for controlling the operation of the index according to the movement trajectory. Specifically, whether the index is deleted or added is determined according to the acquired movement track of the cursor pointer.
According to the processing device for the indexes in the webpage, the target object at the position of the cursor pointer is obtained, the cursor pointer is moved to the end position under the condition that the target object is judged to contain the indexes, the cursor pointer is only moved to the end position to obtain the moving track of the cursor pointer, the indexes are added or deleted according to the moving track, and compared with a method for adding or deleting the indexes through check boxes in the prior art, the purpose of simplifying the operation steps of adding or deleting the indexes is achieved, the technical effect that the indexes can be added or deleted through moving the cursor pointer is achieved, and the technical problem that the operation for deleting or adding the indexes in the prior art is too complicated is solved.
Optionally, the apparatus for processing the index in the webpage provided by the present application further includes: and the second judging unit is used for judging whether the cursor pointer generates a trigger instruction at the initial position before the first acquiring unit acquires the target object at the initial position of the cursor pointer, wherein the target object at the initial position of the cursor pointer is acquired under the condition that the cursor pointer is judged to generate the trigger instruction at the initial position.
Specifically, if the cursor pointer is controlled by the mouse, the file at the initial position can be selected after the cursor pointer clicks the left button of the mouse at the initial position, and the trigger instruction is generated at the time of selecting the file at the initial position. And judging whether a trigger instruction is generated or not by the second judging unit, and if the trigger instruction is generated by the second judging unit, acquiring the initial position target object by the first acquiring unit.
And if the trigger instruction is terminated, determining the position of the cursor pointer at the moment when the trigger instruction is terminated as the termination position. Specifically, when the user selects a file at the initial position by mouse click, the file can be dragged to any position in the web page. When the user releases the left key of the mouse, the triggering instruction is terminated, wherein the position of the cursor pointer is the termination position at the moment when the triggering instruction is terminated. The track of the cursor pointer dragging the file from the initial position to the end position is the moving track in the embodiment of the application.
Alternatively, the first judgment unit 20 includes: the judging module is used for judging whether the obtained target object contains the index identification of the index; and the determining module is used for determining that the target object comprises the index under the condition that the target object comprises the index identification.
Specifically, whether the target object contains the index is determined by determining whether the target object contains an index identifier, wherein the index identifier may be an identifier uniquely representing the index, such as ID information or text information of the index. And if the target object contains the index identification, determining that the target object contains the index, wherein the index is the index which the user actually wants to add or delete.
Alternatively, the control unit 40 includes: the first deleting module is used for deleting the indexes in the first area and adding the indexes in the second area when the position of the target object is obtained to move from the first area to the second area, wherein the first area is the area where the added indexes are located, and the second area is the area where the indexes to be added are located.
If the obtained movement track of the cursor pointer moves from the first area to the second area, the index is deleted in the first area through the first deletion module, and the index is added in the second area, so that the user can continuously add the index to the first area in subsequent operations.
Optionally, the control unit 40 further comprises: the sending module is used for sending a request message to the server under the condition that the position of the target object with the moving track is obtained to move from the second area to the first area, wherein the request message is a message for requesting to add the index in the first area; the receiving module is used for receiving the response message from the server; the adding module is used for adding the index to the first area and deleting the index in the second area under the condition that the response message is an empty message; and the returning module is used for returning the position of the target object to the initial position under the condition that the response message contains the error prompt information.
Specifically, if the movement track of the cursor pointer is obtained as moving from the second area to the first area, it indicates that the user wishes to add the index to be added in the second area to the first area. At this time, the system transmits a message requesting to add the index in the first area to the server through the transmission module. And the server replies a response message under the condition of receiving the request message, wherein the response message is a message for confirming whether to add the index into the first area or not. If the response message received by the receiving module is an empty message, indicating that the addition of the index to the first area is confirmed, adding the index to the first area, adding the dragged target object in the first area, and deleting the index successfully added to the first area in the second area; if the response message received by the receiving module is a non-empty message and the response message contains error prompt information, the index is not added to the first area, and at this time, the coordinate of the target object is returned to the coordinate of the initial position from the coordinate of the cursor pointer which follows.
If the initial position of the cursor pointer is located in the first area and the termination position is also located in the first area, returning the coordinates of the target object dragged to the termination position by the cursor pointer to the coordinates of the initial position without any operation; similarly, if the initial position of the cursor pointer is located in the second region and the end position is also located in the second region, the coordinates of the target object dragged to the end position by the cursor pointer are returned to the coordinates of the initial position without any operation.
The processing device for the indexes in the webpage comprises a processor and a memory, wherein the first acquiring unit, the first judging unit, the second acquiring unit, the control unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the operation steps of adding or deleting the indexes are simplified by adjusting the kernel parameters, so that the technical effect of adding or deleting the indexes can be realized by moving the cursor pointer, and the technical problem that the operation of deleting or adding the indexes in the prior art is too complicated is solved.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The present application further provides a computer program product adapted to perform program code for initializing the following method steps when executed on a data processing device: acquiring a target object of an initial position of a cursor pointer, wherein the target object is an object representing a webpage element in a webpage; judging whether the obtained target object contains indexes or not; under the condition that the obtained target object contains the index, obtaining a moving track, wherein the moving track is a track of the cursor pointer moving from the initial position to the end position; and controlling the operation of the index according to the moving track.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (4)

1. A method for processing indexes in a webpage is characterized by comprising the following steps:
acquiring a target object of an initial position of a cursor pointer, wherein the target object is an object representing a webpage element in the webpage;
judging whether the obtained target object contains indexes or not;
under the condition that the obtained target object is judged to contain the index, obtaining a moving track, wherein the moving track is a track of the cursor pointer moving from the initial position to the end position; and
controlling the operation of the index according to the moving track;
if the target object comprises the index, the coordinate of the target object follows the coordinate of the cursor pointer, and when the cursor pointer moves to the termination position, the movement track of the cursor pointer is obtained, wherein when the target object comprises the index, the movement track of the cursor pointer is the movement track of the target object;
judging whether the acquired target object contains the index comprises the following steps: judging whether the obtained target object contains an index identifier of the index; and determining that the target object comprises the index under the condition that the target object comprises the index identification;
the index is an index which the user actually wants to add or delete;
controlling the operation on the index according to the movement trajectory further includes: when the situation that the moving track is that the position of the target object moves from a second area to a first area is obtained, sending a request message to a server, wherein the request message is a message for requesting to add the index in the first area; receiving a response message from the server; when the response message is an empty message, adding the index to the first area, and deleting the index in the second area; and when the response message contains error prompt information, the position of the target object returns to the initial position; the first area is an area where the added indexes are located, and the second area is an area where the indexes to be added are located;
controlling the operation on the index according to the movement track comprises the following steps: when the situation that the position of the target object is moved from a first area to a second area in the movement track is obtained, deleting the index in the first area, and adding the index in the second area;
if the initial position of the cursor pointer is located in the first area and the end position of the cursor pointer is also located in the first area, returning the coordinates of the target object dragged to the end position by the cursor pointer to the coordinates of the initial position without any operation; similarly, if the initial position of the cursor pointer is located in the second area and the end position of the cursor pointer is also located in the second area, the coordinates of the target object dragged to the end position by the cursor pointer return to the coordinates of the initial position without any operation;
the index is an index in a performance system, and the first area and the second area are different areas in the same webpage.
2. The method of claim 1, wherein prior to obtaining the target object at which the cursor pointer is located, the method further comprises:
and judging whether the cursor pointer generates a trigger instruction at the initial position, wherein under the condition that the cursor pointer generates the trigger instruction at the initial position, a target object of the cursor pointer at the initial position is obtained.
3. The method according to claim 2, wherein when the trigger instruction is terminated, the position of the cursor pointer at the termination time is determined as the termination position.
4. An apparatus for processing metrics in a web page, comprising:
the first acquisition unit is used for acquiring a target object of an initial position of a cursor pointer, wherein the target object is an object representing a webpage element in the webpage;
the first judgment unit is used for judging whether the acquired target object contains an index or not;
a second obtaining unit, configured to obtain a movement trajectory when it is determined that the obtained target object includes the index, where the movement trajectory is a trajectory along which the cursor pointer moves from the initial position to an end position; and
a control unit configured to control an operation on the index according to the movement trajectory;
if the target object comprises the index, the coordinate of the target object follows the coordinate of the cursor pointer, and when the cursor pointer moves to the termination position, the movement track of the cursor pointer is obtained, wherein when the target object comprises the index, the movement track of the cursor pointer is the movement track of the target object;
the first judgment unit includes: the judging module is used for judging whether the acquired target object contains the index identification of the index; the determining module is used for determining that the target object comprises the index under the condition that the target object comprises the index identification;
the index is an index which the user actually wants to add or delete;
the control unit further includes: a sending module, configured to send a request message to a server when the obtained movement trajectory is that the position of the target object moves from a second area to a first area, where the request message is a message requesting to add the indicator in the first area; the receiving module is used for receiving the response message from the server; an adding module, configured to add the indicator to the first area and delete the indicator in the second area when the response message is an empty message; the return module is used for returning the position of the target object to the initial position under the condition that the response message contains error prompt information;
the control unit includes: a first deleting module, configured to delete the indicator in the first area and add the indicator in the second area when it is obtained that the movement trajectory is that the position of the target object moves from the first area to the second area, where the first area is an area where the added indicator is located, and the second area is an area where the indicator to be added is located;
if the initial position of the cursor pointer is located in the first area and the end position of the cursor pointer is also located in the first area, returning the coordinates of the target object dragged to the end position by the cursor pointer to the coordinates of the initial position without any operation; similarly, if the initial position of the cursor pointer is located in the second area and the end position of the cursor pointer is also located in the second area, the coordinates of the target object dragged to the end position by the cursor pointer return to the coordinates of the initial position without any operation;
the index is an index in a performance system, and the first area and the second area are different areas in the same webpage.
CN201510729523.4A 2015-10-30 2015-10-30 Method and device for processing indexes in webpage Active CN106648282B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510729523.4A CN106648282B (en) 2015-10-30 2015-10-30 Method and device for processing indexes in webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510729523.4A CN106648282B (en) 2015-10-30 2015-10-30 Method and device for processing indexes in webpage

Publications (2)

Publication Number Publication Date
CN106648282A CN106648282A (en) 2017-05-10
CN106648282B true CN106648282B (en) 2021-05-14

Family

ID=58809639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510729523.4A Active CN106648282B (en) 2015-10-30 2015-10-30 Method and device for processing indexes in webpage

Country Status (1)

Country Link
CN (1) CN106648282B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462410A (en) * 2014-12-11 2015-03-25 北京国双科技有限公司 Method and device for processing web page options

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164191B (en) * 2011-12-08 2017-07-11 腾讯科技(深圳)有限公司 Web page element dragging method and device
US9442687B2 (en) * 2012-07-23 2016-09-13 Korea Advanced Institute Of Science And Technology Method and apparatus for moving web object based on intent
CN104077389A (en) * 2014-06-27 2014-10-01 北京奇虎科技有限公司 Display method of webpage element information and browser device
CN104461309A (en) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 Method and device for cross-page object position adjustment based on dragging operation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462410A (en) * 2014-12-11 2015-03-25 北京国双科技有限公司 Method and device for processing web page options

Also Published As

Publication number Publication date
CN106648282A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
CN106406846B (en) Display interface creating method and device
CN109388762B (en) Application sharing method and device
CN106528154B (en) Online seat selection method, system and equipment
CN110688598B (en) Service parameter acquisition method and device, computer equipment and storage medium
CN108363657B (en) Method, equipment and medium for monitoring integrity of embedded data acquisition of APP client
CN107644100B (en) Information processing method, device and system and computer readable storage medium
CN106649446B (en) Information pushing method and device
CN107679214B (en) Link positioning method, device, terminal and computer readable storage medium
CN106776615B (en) Thermodynamic diagram generation method and device
CN109117208B (en) Information sharing method and device, user terminal and readable storage medium
CN110968553B (en) Ordering method and device for elements in directory tree
CN105893471B (en) Data processing method and electronic equipment
CN104484482A (en) Webpage information updating method and system of network platform
CN104881273A (en) Webpage rendering analysis method and terminal device
US10120846B2 (en) System and method for displaying online comments
CN104679824A (en) Webpage generating method and webpage generating system of network platform
CN105302590B (en) Information processing method and device
CN104111981B (en) A kind of method and apparatus to release news for offer
CN106648282B (en) Method and device for processing indexes in webpage
CN106250002B (en) Information processing method and information processing apparatus
CN105677699A (en) Method and apparatus for generating news pages for user
KR20150011026A (en) Method and device for pushing media information in real time
CN107368376B (en) Message sending method and device, expansion method and terminal
CN104811464A (en) Information processing method, device and system
CN111026615B (en) Method and device for acquiring logical volume list, electronic equipment and storage 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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant