Invention content
The present invention provides a kind of data extraction methods, and number can be realized without converting data to be extracted to picture format
According to extraction.
In order to solve the above-mentioned technical problem, the embodiment of the invention discloses following technical solutions:
In a first aspect, a kind of data extraction method is provided, including:
Determine the first interception position that user selectes on a terminal screen;
Determine the first position relationship between first interception position and the boundary of the terminal screen;
The second interception position that there is second position relationship with the boundary of the terminal screen is determined in the first data,
In, first data are shown on the terminal screen, and the first position relationship is identical as the second position relationship;
According to second interception position in second data of the first extracting data.
In conjunction with above-mentioned in a first aspect, in the first possible implementation, the determining user selects on a terminal screen
The first fixed interception position, including following at least one:
Determine touch point position of the user on the terminal screen, and using the touch point position as described first section
Fetch bit is set;Alternatively,
It determines nearly contact of the user close to the terminal screen, and the nearly contact is corresponded on the terminal screen
As first interception position, the nearly contact is less than or equal to pre-determined distance threshold value at a distance from the terminal screen for position;
Alternatively,
Determine the first interception position that user is selected by button on the terminal screen.
In conjunction with it is above-mentioned in a first aspect, and/or the first possible realization method, in second of possible realization method,
Touch point position of the determining user on the terminal screen, including:
Obtain touch sliding trace of the user on the terminal screen;
When the touch sliding trace meets preset condition, the initial position for touching sliding trace is obtained as use
Touch point position of the family on the terminal screen.
In conjunction with it is above-mentioned in a first aspect, and/or the first possible realization method and/or second of possible realization method,
In the third possible realization method, the preset condition includes:
The touch sliding trace at least two, and each continuously slipping distance for touching sliding trace is more than etc.
In sliding threshold value.
In conjunction with it is above-mentioned in a first aspect, and/or the first possible realization method and/or second of possible realization method,
And/or the third possible realization method, in the 4th kind of possible realization method, the preset condition includes:
The touch sliding trace is closed curve.
In conjunction with it is above-mentioned in a first aspect, and/or the first possible realization method and/or second of possible realization method,
And/or the third possible realization method and/or the 4th kind of possible realization method, in the 5th kind of possible realization method,
First position relationship between the determination first interception position and the boundary of the terminal screen, including:
Calculate the first distance and first interception position and between first interception position and the first boundary
Second distance between two boundaries, wherein first boundary and two adjacent edges that the second boundary is the terminal screen
Boundary;
Calculate the first ratio and the second distance and described the of first distance and the second boundary length
Second ratio of one boundary length, and using first ratio and second ratio as first interception position with it is described
First position relationship between the boundary of terminal screen.
Second aspect provides a kind of data extraction device, including:
First position determination unit, the first interception position selected on a terminal screen for determining user;
Position relationship determination unit, for determining the position between first interception position and the boundary of the terminal screen
Set relationship;
Second position determination unit, for determining that there is the second position with the boundary of the terminal screen in the first data
Second interception position of relationship, wherein first data are shown on the terminal screen, and the first position relationship with
The second position relationship is identical;
Data extracting unit is used for according to second interception position in second data of the first extracting data.
In conjunction with above-mentioned second aspect, in the first possible implementation, the first position determination unit is specific to use
In determining touch point position of the user on the terminal screen, and using the touch point position as first interception position
It sets;Alternatively, determining user close to the nearly contact of the terminal screen, and the nearly contact is corresponded on the terminal screen
As first interception position, the nearly contact is less than or equal to pre-determined distance threshold value at a distance from the terminal screen for position;
Alternatively, determining the first interception position that user is selected by button on the terminal screen.
In conjunction with above-mentioned second aspect and/or the first possible realization method, in second of possible realization method,
The first position determination unit includes:
Track obtains subelement, is used for the user in the first position determination unit on the terminal screen
Before touch point location determination is first interception position, touch sliding trace of the user on the terminal screen is obtained;
Location determination subelement, for when the touch sliding trace meets preset condition, obtaining the touch sliding
Touch point position of the initial position of track as user on the terminal screen.
In conjunction with above-mentioned second aspect and/or the first possible realization method and/or second of possible realization method,
In the third possible realization method, the preset condition includes:
The touch sliding trace at least two, and each continuously slipping distance for touching sliding trace is more than etc.
In sliding threshold value.
In conjunction with above-mentioned second aspect and/or the first possible realization method and/or second of possible realization method,
And/or the third possible realization method, in the 4th kind of possible realization method, the preset condition includes:The touch
Sliding trace is closed curve.
In conjunction with above-mentioned second aspect and/or the first possible realization method and/or second of possible realization method,
And/or the third possible realization method and/or the 4th kind of possible realization method, in the 5th kind of possible realization method,
The position relationship determination unit includes:
First computation subunit, for calculating the first distance between first interception position and the first boundary, and
Second distance between first interception position and the second boundary, wherein first boundary and the second boundary are institute
State two adjacent boundaries of terminal screen;
Second computation subunit, the first ratio for calculating first distance and the second boundary length, and
Second ratio of the second distance and first boundary length, and using first ratio and second ratio as institute
State the first position relationship between the first interception position and the boundary of the terminal screen.
The first interception position that the embodiment of the present invention is inputted on a terminal screen by obtaining user, and determine this first section
The position relationship in on-screen display (osd) area is set in fetch bit, and then the position relationship is applied in the first data, so as to carry
Take out the second data for meeting same position relationship.The process is not necessarily to convert the first data to picture format, you can realizes the
The extraction of two data, the second data need not also be preserved with picture format.And the process can be applied not only to browser,
It can also be applied to a variety of data files, such as table data, web data, image data, pdf data, e-book.
Specific implementation mode
In order to make those skilled in the art more fully understand the technical solution in the embodiment of the present invention, and make of the invention real
The above objects, features, and advantages for applying example can be more obvious and easy to understand, below in conjunction with the accompanying drawings to technical side in the embodiment of the present invention
Case is described in further detail.
It is a kind of data extraction method flow chart of the embodiment of the present invention referring to Fig. 1.
This method may include:
Step 101, the first interception position that user selectes on a terminal screen is determined.
The device for being used to extract data in the embodiment of the present invention determines user selectes on a terminal screen first first
Interception position, first interception position can be one, it is two or more.
In a particular embodiment, the determination of first interception position can be to determine the touch point of user on a terminal screen
Position, and using touch point position as the first interception position;Alternatively, determining user close to the nearly contact of terminal screen, and nearly
Contact corresponds to position on a terminal screen as the first interception position, which is less than or equal to pre- at a distance from terminal screen
If distance threshold;Alternatively, determining the first interception position that user is selected on a terminal screen by button.It is specific to refer to subsequently
The description of embodiment.
Step 102, the first position relationship between the first interception position and the boundary of terminal screen is determined.
For the first position relationship for showing position of first interception position in terminal screen, which can
To characterize in several ways, for example, by the distance between the first interception position and certain boundary or certain point can be accounted for end
The ratio of a certain distance of screen is held to indicate, this distance may be the long side length of terminal screen, bond length, just diagonal
Line length or clinodiagonal length etc..
Step 103, the second interception position that there is second position relationship with the boundary of terminal screen is determined in the first data
It sets, wherein the first data are shown on a terminal screen, and first position relationship is identical as second position relationship.
After obtaining above-mentioned first position relationship, you can by the first position, relationship is applied in the first data, according to the
Display boundary of one data in terminal screen(The boundary of reality i.e. terminal screen)It is found in the first data with
Second interception position of two position relationships, the second position relationship are identical as first position relationship.The calculating process is above-mentioned step
Rapid 103 inverse process.
Step 104, according to the second interception position in first the second data of extracting data.
Wherein, the number of second interception position is identical as the number of the first interception position, if the second interception position is two
It is a or more than two, when second data of extraction, the data between two or more second interception positions can be extracted as
Two data.
If the second interception position is one, second interception position and predeterminated position can be extracted(Such as the terminal of setting
The a certain boundary of screen)Between data as the second data.
After extracting the second data, second data can be exported and shown, which can also carried out
It preserves, when in order to subsequently consult second data repeatedly, no longer needs to the first data of inquiry, but directly transfer the second of preservation
Data.
The first interception position that the embodiment of the present invention is inputted on a terminal screen by obtaining user, and determine this first section
The position relationship in on-screen display (osd) area is set in fetch bit, and then the position relationship is applied in the first data, so as to carry
Take out the second data for meeting same position relationship.The process is not necessarily to convert the first data to picture format, you can realizes the
The extraction of two data, the second data need not also be preserved with picture format.And the process can be applied not only to browser,
It can also be applied to a variety of data files, such as table data, web data, image data, pdf data, e-book.Further
, by storing the data of extraction, when needing to consult certain section of local data repeatedly, access efficiency can be promoted, promotes user
Experience.
In another embodiment, the mistake of the first position relationship between the first interception position and the boundary of terminal screen is determined
Journey can as shown in Fig. 2 a~2b, including:
Step 201, the first distance and the first interception position between the first interception position 21 and the first boundary 22 are calculated
Second distance between 21 and the second boundary 23.
Wherein, the first boundary 22 and two adjacent boundaries that the second boundary 23 is terminal screen.
Step 202, the first ratio and second distance and the first boundary of the first distance and 23 length of the second boundary are calculated
Second ratio of 22 length, and using the first ratio and the second ratio as between the first interception position 21 and the boundary of terminal screen
First position relationship.
Certainly there are many ways to first position relationship between first interception position of determination and terminal screen boundary, this
Place is only for example.
It is the flow chart of another kind data extraction method of the embodiment of the present invention referring to Fig. 3 a.
This method may include:
Step 301, it is the first interception position by the touch point location determination of user on a terminal screen.
As Fig. 3 b~3d show the contact position of user on a terminal screen under different situations.Two fingers of user with
The screen (capacitance plate or touch screens) of almost the same time point contact screen, terminal can measure user according to the variation of voltage
The position of click obtains touch point position, as the first interception position.It is two first interception that user, which needs the data extracted,
Data between position namely within the scope of interception as shown in the figure.
Such as Fig. 3 b~3d, the display area of the terminal screen is the rectangular area for including long side and short side, in Fig. 3 b, two
First interception position is along two touch points position of terminal long side direction;In Fig. 3 c, two the first interception positions are along terminal
Two touch points position of short side direction;In Fig. 3 d, two the first interception positions are the diagonal along terminal display area
Two touch points position.
Step 302, the first position relationship between the first interception position and the display area boundary of terminal screen is determined.
In the step, be referred in previous embodiment calculate first position relationship method.
As shown in Figure 3b, calculate separately two the first interception positions to the terminal screen any short side(Short side as above)'s
Then distance calculates first percentage of the distance between the distance and two relative short edges of screen, equally calculates separately two
Any long side of first interception position to the terminal screen(Such as left side long side)Distance, then calculate the two of the distance and screen
Second percentage of the distance between relatively short side, using corresponding first, second percentage of the first interception position as first section
The first position relationship in terminal screen is set in fetch bit.Similarly, two the first interception positions are calculated in Fig. 3 c in terminal screen
First position relationship.
As shown in Figure 3d, two the first interception positions are calculated separately to the cornerwise distance of the terminal screen, are then calculated
First percentage of the distance and the length of screen diagonal, it is any to the terminal screen then to calculate separately the first interception position
The distance on boundary, and second percentage of the distance between the distance and two retive boundaries of screen is calculated, intercept position by first
Set first position relationship of corresponding two percentage as the first interception position in terminal screen.
Step 303, the second interception position that there is second position relationship with terminal screen boundary is searched in the first data,
The second position relationship is identical as first position relationship.
After obtaining corresponding two percentage of the first interception position, you can two percentages are applied to the first number
According to, so obtain in the first data with second position relationship the second interception position, the second position relationship with first
It is identical to set relationship.
For example, in Fig. 3 b, the first data display area boundary is identical as the boundary of terminal screen, then by two relative short edges
Distance is multiplied by the first percentage and the second percentage respectively, obtains two distances, and the above short side and left side long side are starting respectively
Position can be obtained this two apart from corresponding second interception position, and the determination method class of another second interception position is seemingly.
The determination method of the second interception position is identical in Fig. 3 c, 3d.
Step 304, according to the second interception position in first the second data of extracting data.
After obtaining two the second interception positions, the data between two second interception position are extracted, as
Two data.
Then, output can be carried out to second data to show, can also be preserved, in order to subsequently consult repeatedly.
It is the flow chart of another kind data extraction method of the embodiment of the present invention referring to Fig. 4.
This method may include:
Step 401, the touch sliding trace of user on a terminal screen is obtained.
In the present embodiment, determine that the process of the touch point position of user on a terminal screen can specifically pass through step
401~403 complete.This step obtains the touch sliding trace of user on a terminal screen first, and the acquisition of the track still may be used
Position to measure user's click according to the variation of voltage by the screen of terminal (capacitance plate or touch screens) obtains continuous more
A touch point position, to obtain touch sliding trace.
Step 402, judge to touch whether sliding trace meets preset condition.
The preset condition of the touch sliding trace can be configured as needed, such as the shape of sliding trace can be arranged
Shape etc..
As shown in Fig. 5 a~5g, it is two that can set the preset condition for touching sliding trace to touch sliding trace, and
The distance of sliding is more than or equal to certain sliding threshold value.Following judgment step then can be executed according to the preset condition:
First, it is determined that touch sliding trace whether at least two.
Secondly, when it is at least two to touch sliding trace, judge that each continuously slipping distance for touching sliding trace is
It is no to be more than or equal to sliding threshold value.If so, touching sliding trace meets preset condition.
As shown in figure 5h, it is closed curve that can set the preset condition for touching sliding trace to touch sliding trace.
It then may determine that according to the preset condition and touch whether sliding trace is closed curve, meet in advance if so, touching sliding trace
If condition.The closed curve can be circle, triangle, rectangular, oval etc. or irregular figure.
After judging to meet preset condition, you can execute step 403.If being unsatisfactory for preset condition, user may indicate that
It is not in the relevant operation for carrying out data extraction.
Step 403, the initial position for touching sliding trace is obtained.
The embodiment as shown in Fig. 5 a~5e, two touch sliding trace and are only used for judging whether to meet preset condition, with
Determine whether to execute the correlation step for extracting data, this two touch sliding traces and almost overlap.It determines and touches in this step
When the initial position of sliding trace, can specifically select two touch first touch point in sliding traces any one,
Two can be selected to touch in sliding trace along first touch point touched on sliding trace extending direction.
The embodiment as shown in Fig. 5 f~5h is determining that the initial position for touching sliding trace is can to obtain each
The position of first touch point in sliding trace is touched as the initial position for touching sliding trace, also can be obtained at the beginning of two
Beginning position.
After obtaining the initial position for touching sliding trace, you can on a terminal screen using the initial position as user
Touch point position.
Step 404, the initial position for touching sliding trace is determined as the first interception position.
As shown in Fig. 5 a~5e, it is one to touch the initial position that sliding trace is determined according to two, to can get
One the first interception position, as shown in Fig. 5 f~5h, two touch sliding trace and can determine that two initial positions, to obtain
Two the first interception positions.
Step 405, the first position relationship between the first interception position and the display area boundary of terminal screen is determined.
First interception position or two the first interception positions no matter above are obtained in step, it can be according to aforementioned reality
The method for applying a step 302 obtains first position relationship.
Step 406, second section that there is second position relationship with the boundary of the terminal screen is determined in the first data
Fetch bit is set.Wherein, first position relationship is identical as second position relationship.
The step is similar with previous embodiment step 303.The number of the number of second interception position and the first interception position
It is corresponding.
Step 407, according to the second interception position in first the second data of extracting data.
In the embodiment as shown in Fig. 5 f~5h, the data between two second interception positions can be extracted as the second number
According to.
In the embodiment as shown in Fig. 5 a~5e, since only there are one the second interception positions, when extracting the second data,
The data between second interception position and preset a certain position can be extracted as the second data.
For example, as shown in Fig. 5 a, 5b, when touch sliding trace extends from left to right, coboundary and second could be extracted
Data between interception position are as the second data.As shown in Figure 5 c, when touch sliding trace extends from right to left, Ke Yiti
The data between boundary and the second interception position are removed as the second data.As fig 5d, when touch sliding trace on to
When lower extension, the data between right margin and the second interception position can be extracted as the second data.As depicted in fig. 5e, work as touch
When sliding trace extends from bottom to top, the data between left margin and the second interception position can be extracted as the second data.
Certainly, only there are one the second interception position when, the extraction scope of the second data can be arranged as required to other
Rule is not limited to upper type.
In another embodiment of the invention, the method for the first interception position of determination user on a terminal screen is specific
It can also be:Determine nearly contact of the user close to terminal screen, and using the nearly contact correspond to position on a terminal screen as
First interception position, nearly contact are less than or equal to pre-determined distance threshold value at a distance from terminal screen.
In the present embodiment, data extraction device can obtain the first interception position by proximity sensor or photosensitive sensors etc.
It sets.
As shown in fig. 6, when the finger of sensor sensing user enters in measurement range, obtains the close of the user's finger and touch
The position of point on a terminal screen, and using the position as the first interception position.Wherein, nearly contact is close to terminal screen, and with
The distance of terminal screen is less than or equal to pre-determined distance threshold value, above-mentioned measurement range namely less than or equal to the distance threshold.Work as user
When finger is again introduced into measurement range, second the first interception position is obtained.
After determining the first interception position, you can according to the step in previous embodiment, determine first interception position
First position relationship between the display area boundary of the terminal screen;It is searched and first data in the first data
Display area boundary there is the second interception position of second position relationship, second position relationship is identical as first position relationship;
Then according to the second interception position in first the second data of extracting data.The process is similar with previous embodiment.
In another embodiment of the invention, the method for the first interception position of determination user on a terminal screen has
Body can also be:Determine the first interception position that user is selected on a terminal screen by button.
As shown in fig. 7, a stop threshold value can be set first, if the time of button is more than or equal to the stop threshold of setting
Value then determines the correlation step for executing data extraction, then can also set the opereating specification and the step of button each time of button
It is long, pass through key press time and the multiple proportion of button step-length and the opereating specification of button, you can know that user is true by button
Fixed access position, and then using the access position as the first interception position.
After determining the first interception position, you can according to the step in previous embodiment, determine first interception position
First position relationship between the display area boundary of the terminal screen;The screen side with terminal is searched in the first data
Boundary has the second interception position of second position relationship, second position relationship identical as first position relationship;Then according to
Second interception position is in second data of the first extracting data.The process is similar with previous embodiment.
In the above various embodiments, the first interception position can be two or more, can also be one, when the first interception position
When being set to one, corresponding the second interception position obtained is also one, is carried in the first data according to the second interception position at this time
Can extract a certain display area boundary in first data to the number between second interception position when taking the second data
According to as the second data.
The embodiment of the present invention can be applied on intelligent terminal the data in need shown by multi-screen, including:
Table data, web data, image data, pdf data, e-book etc., pass through data intercept range, it may be convenient to will intercept
Data form individual interface, and can be repeatedly to these digital independents.
It is the description to the method for the present invention embodiment above, below to realizing that the device of the above method is introduced.
It is a kind of structural schematic diagram of data extraction device of the embodiment of the present invention referring to Fig. 8.
The device may include:
First position determination unit 801, the first interception position selected on a terminal screen for determining user.
Position relationship determination unit 802, the display area for determining first interception position and the terminal screen
First position relationship between boundary.
Second position determination unit 803, for determining there is second with the boundary of the terminal screen in the first data
Second interception position of position relationship, wherein first data are shown on the terminal screen, and the first position is closed
System is identical as the second position relationship.
Data extracting unit 804 is used for according to second interception position in second data of the first extracting data.
The device obtains the first interception position for inputting on a terminal screen of user by said units, and determine this first
Position relationship of the interception position in on-screen display (osd) area, and then the position relationship is applied in the first data, so as to
Extract the second data for meeting same position relationship.The device is not necessarily to convert the first data to picture format, you can realizes
The extraction of second data, the second data need not also be preserved with picture format.And the process can be applied not only to browse
Device can also be applied to a variety of data files, such as table data, web data, image data, pdf data, e-book.
In an alternative embodiment of the invention, the first position determination unit is specifically determined for user at the end
The touch point position on screen is held, and using the touch point position as first interception position;Alternatively, determining that user is close
The nearly contact of the terminal screen, and the nearly contact is corresponded into the position on the terminal screen as first interception
Position, the nearly contact are less than or equal to pre-determined distance threshold value at a distance from the terminal screen;Alternatively, determining that user passes through button
The first interception position selected on the terminal screen.
In another embodiment of the invention, as shown in figure 9, the first position determination unit 801 may include again:
Track obtains subelement 901, is used for the user in the first position determination unit in the terminal screen
On touch point location determination be first interception position before, obtain touch of the user on the terminal screen and slide rail
Mark;
Location determination subelement 902 is slided for when the touch sliding trace meets preset condition, obtaining the touch
Touch point position of the initial position of dynamic rail mark as user on the terminal screen.
The preset condition can be:The touch sliding trace at least two, and each touch sliding trace
Continuously slipping distance is more than or equal to sliding threshold value;Also it can also be that the touch sliding trace is closed curve.
In an alternative embodiment of the invention, position relationship determination unit may include:
First computation subunit, for calculating the first distance between first interception position and the first boundary, and
Second distance between first interception position and the second boundary, wherein first boundary and the second boundary are institute
State two adjacent boundaries of terminal screen;
Second computation subunit, the first ratio for calculating first distance and the second boundary length, and
Second ratio of the second distance and first boundary length, and using first ratio and second ratio as institute
State the first position relationship between the first interception position and the boundary of the terminal screen.
The embodiment of the present invention additionally provides a kind of data extraction device, including data/address bus, memory and processor,
In, one section of program code execution is stored in memory, processor obtains the program code in memory by data/address bus, and
Execute following steps:
Determine the first interception position that user selectes on a terminal screen;
Determine the first position relationship between first interception position and the boundary of the terminal screen;
The second interception position that there is second position relationship with the boundary of the terminal screen is determined in the first data,
In, first data are shown on the terminal screen, and the first position relationship is identical as the second position relationship;
According to second interception position in second data of the first extracting data.
Those of ordinary skill in the art may realize that lists described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, depends on the specific application and design constraint of technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit
It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be expressed in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment(Can be
People's computer, server or network equipment etc.)Or processor(processor)Execute side described in each embodiment of the present invention
The all or part of step of method.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory(ROM, Read-Only
Memory), random access memory(RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.