Embodiment
Below in conjunction with better embodiment wherein, the present invention program is described in detail.
The schematic flow sheet of video file transmission method embodiment of the present invention has been shown in Fig. 1.
As shown in Figure 1, the method in the present embodiment comprises step:
S101: enter operation interface; Enter in the present embodiment operation interface and be in order to ensure each electronic equipment (also can be called electronic installation, smart mobile phone, panel computer, pc can be as implement devices of the present invention at present) and have a common service network.After the annexation between clear and definite electronic equipment, its operation interface can be understood as any display page of electronic equipment.
S102: the first electronic equipment detects touch gestures, according to the glide direction Information generation request data package of touch gestures and send this packet in network; In the present embodiment, the first electronic equipment detects whether there is one or more fingers (or touch objects) touch screen, if (100ms) finger is slided left by touch point in Preset Time, the request instruction producing comprises the information moving to left.If there are a plurality of fingers to move toward different directions, and the request msg producing comprises the mobile message of different directions.Now, the first electronic equipment can be according to the different corresponding request data package of glide direction Information generation, and this request data package is sent in network, wait for the response of the second electronic equipment.Here the network of saying, comprises in LAN (Local Area Network) or wide area network.As preferred embodiment, adopted the wireless network in LAN (Local Area Network) here.In this step, request data package can not send in network, as just a flag data, preserves.
S103: if the first electronic equipment receives the response data packet by the second electronic equipment touch gestures glide direction Information generation in Preset Time, connect; The glide direction information of the second electronic equipment touch gestures in described response data packet is the first default glide direction information.
The second electronic equipment detects touch gestures, according to user's touch gestures directional information, generates response data packet and sends this packet in network.In general, the second electronic equipment after receiving the request bag of the first electronic equipment (if step S102 request data package does not send to network, there will not be this situation), have suggestedly, user need only be touched corresponding gesture or be pressed corresponding prompting button by prompting.But on the one hand this prompting is owing to may there be a plurality of users to send request simultaneously in the same time, prompting can be lost time one by one, also may allow the user that do not want the information that receives receive information indicating and cause user to perplex; On the other hand, the first electronic equipment user can not connect with the user who wants to be connected the very first time.Here the response data that said the second electronic equipment generates comprises the glide direction information that the second electronic equipment touch gestures detected.When the second electronic equipment detects touch gestures, touch gestures is included in to be placed one or more fingers on touch-screen and reaches schedule time amount, and toward the direction or one above direction moves, according to glide direction Information generation response data packet.In the present embodiment, the second electronic equipment does not adopt initiatively prompting mode.The second electronic equipment detects whether there are one or more fingers (or touch objects) in touch screen, and (100ms) finger is slided left by touch point in Preset Time.If there are a plurality of fingers to move toward different directions, and the request msg producing comprises the mobile message of each different directions.Now, the second electronic equipment can, according to the different corresponding response data packet of glide direction Information generation, send this packet in network.The first electronic equipment receives after response data packet, can judge whether the glide direction information in response data packet is the first default glide direction information, if so, connects, and if not, returns to S102.
When the glide direction information in response data packet is the desired glide direction information of the first electronic equipment, the first electronic equipment just can connect with the second electronic equipment.
In general, the glide direction information in response data packet has several situations below:
1, the second electronic user pushes button or touches screen key production response data packet and required data consistent by the first electronic user request data package;
2, the glide direction information of response data packet and the directional information of request data package are roughly the same or roughly contrary, if the moving direction information of request data package and response data packet is all " left side ", think that its directional information is roughly the same, the moving direction information of request data package is " left side ", the moving direction information of response data packet is " right side ", thinks that its directional information is roughly contrary;
3, the moving direction information of response data packet and the directional information of request data package substantially vertical upwards or substantially vertical downwards, if the moving direction information of request data package is " left side ", and the moving direction information of the response data packet requiring be " on ", think that its required direction information is " vertically upward " information;
4,, because finger repeatedly moves the moving direction information that produces request data package toward different directions, the repeatedly mobile directional information in response data packet is roughly the same or roughly contrary with the moving direction information in request data package.
Above-mentioned situation can think that the second electronic equipment mates with the first electronic equipment.These matched rules can be arranged to multiple match pattern, by user oneself, are selected.During use, the first electronic equipment user selects Corresponding matching pattern, and rule is informed to the second electronic equipment user, and the second electronic equipment user can produce corresponding gesture by its rule.Finally by data packet matched, connect.Certainly, matched rule or match pattern can be modified and improve according to actual conditions, are not limited to above-mentioned this several modes.
As better embodiment, the default glide direction information of first in response data packet is roughly the same or roughly contrary with the glide direction information of the first electronic equipment touch gestures.Because the first electronic equipment and the second electronic equipment are when the practical operation, can not obtain absolutely identical glide direction information, therefore, in the present invention, roughly the same or roughly refer on the contrary that the glide direction information of the first electronic equipment touch gestures and the angle of the first default glide direction information differ and be no more than 45
o(4 directions) or 22.5
o(8 directions).In other application scenarios, this angular range also can be different, in addition also can by system calibration glide direction information (as whether being greater than 45 by judgement " upper left " and the angle of horizontal direction
oif the system that is greater than is judged to be direction vertically upward, if the system that is less than is judged to be level direction left).An if link information of first default glide direction information spinner the first electronic equipment user and the second electronic equipment user agreement, such as the glide direction information of the first electronic equipment user touch gestures is " left side ", he can tell the operation that glide direction information that the second electronic equipment user carries out touch gestures on the second electronic equipment is " left side " (contrary is " right side ").If in like manner tell the 3rd electronic equipment user, quadrielectron equipment user simultaneously ... also can be connected with them easily.This is than searching out successively traditionally their user name, then the efficiency connecting has successively improved a lot.The first electronic equipment is classified other connected electronic equipments by described glide direction information, contributes to be connected to accurately targeted customer.By actual direction of operating (being glide direction information), user is classified, be useful on the Classification Management of contact data.
Due in same local network, the same time period produces identical glide direction information may be many, and response data packet adopts identical or contrary glide direction information, is because gesture is simply convenient to public use on the one hand, on the other hand, can reduce " mistake connects ".The technical program can allow specific user in LAN (Local Area Network) carry out the connection of " can identify " and mutual, and then improves the efficiency of linking up.
In above-mentioned steps, the first electronic equipment does not receive response data packet within the default time, or the time that receives response data packet exceeds the default time, return to step S102, if the first electronic equipment receives the response data packet that the second electronic equipment is replied within the default time, and the directional information in response data packet is the first preset direction information, and the match is successful for they, the first electronic equipment and the second electronic equipment establish a communications link.
When practical application, user's two electronic equipments are put together side by side (the first electronic equipment at left the second electronic equipment on the right side), then two fingers are placed on respectively in two corresponding touch-screens of electronic equipment, left side finger is turned right to slide and is touched in the first electronic equipment touch-screen, the right finger is turned left to slide and is touched in the second electronic equipment touch-screen, carry out the action of " uniting two into one ", if meet the first electronic equipment rule (the touch gestures directional information that is above-mentioned the second electronic equipment is default glide direction information) in advance, can connect like this.
As the example of multiple spot slip or multi-direction slip, the glide direction information of an above touch gestures refers to the glide direction information recording successively by touching time sequencing.As the first electronic equipment can be write successively the stroke order of " king " this word on screen, now, according to different time sequencings, the information of the glide direction that it is recorded to is first second " right side ", second second " right side ", the 3rd second D score, the 4th second " right side ", the second electronic equipment is when coupling, can obtain the authority being connected with the first electronic equipment by writing successively the stroke order of " king " this word, and then connect.And the same time, by a plurality of fingers while touch screen, then slide, may produce in chronological order on first second " left side ", first second " left side ", first second " on ", the second electronic equipment, when coupling, must produce first second " left side ", first second " left side ", first second " on " information, so just can obtain the authority that the first electronic equipment connects, and then connect.It is pointed out that the movement simultaneously of a plurality of fingers can produce reasonable identification effect, for multi-user, apply this technology simultaneously and there is certain secret protection effect.
According to above-mentioned steps, can produce following effect: first, by finger touch, move touch, possesses directional information, making its user that can establish a connection with it at least be divided into 4 classifications (is respectively four direction up and down, if customer relationship grouping can be divided into 8 directions in the time of many, be " rice " word shape), each classification can have a plurality of different electronic equipments.Like this, user just has certain purpose in shared file or data, can greatly improve the effective rate of utilization of resource; The second, gesture is simple, has simplified traditional attended operation; The 3rd, connect user need to predetermined slip touch gestures could with this electronic equipment, is connected, reduce in the same area the probability that " connection by mistake " occurs.
S104: if the first electronic equipment user selection is in progress video file, record the frame of video of current broadcasting, start transmitting video files to the second electronic equipment from described frame of video; The electronic equipment connecting by S101 to S103, user has possessed the information of having classified, need only operate and send according to button prompting, or find out equipment corresponding in classification, carry out again transmit operation and just can send corresponding file by network, or the action that the file of user's selection also can move to predeterminated position by the second default glide direction information of the first electronic equipment touch gestures is sent to the second electronic equipment.In actual applications, the user who is shared often will watch whole video file, and therefore, the current broadcasting frame in the present embodiment also can be substituted by the first frame of video file.
It is below the principle of directly transmitting displaying video.The essential information of the video that first transmitting terminal will transmit (Video coding mode, size, in progress frame number, afterwards the compression algorithm of every frame) is weaved into a transmission head, send in the lump receiving end with the video heads of transmission of video, it is empty video video that receiving end is set up data according to the two, and selects corresponding decompression algorithm.Then transmitting terminal by every frame algorithm with before the compression algorithm selected carry out compression algorithm and compress that (compression algorithm can be sky, when compression algorithm is that sky represents data not to be compressed), and by the location transmission of itself and whole video to receiving end, suppose that whole video has M frame, and current broadcasting is n frame, transmitting data is n, n+1, n+2 ... M, 0 ... n-1.The frame system of transmission success can give the sign that one has transmitted, and before next time, link was set up, having the frame that transmits sign will can not transmit again.When receiving end receives the frame information of transmitting terminal transmission can according to before the decompression algorithm selected carry out decompress(ion) (decompression algorithm can be sky, when decompression algorithm is that sky represents not decompress), according to the frame position receiving, present frame is inserted into the relevant position of video video afterwards.When the frame reading in is abundant, carry out play operation.If the user of receiving end moves broadcasting mark post, if the frame that mark post is corresponding does not receive receiving end before and frame number corresponding to mark post can be recorded and sent to video sending end, video sending end receives that after these data, (be assumed to be k frame) when send data next time, will to change sending order be k, k+1, k+2 ... M, 0 ... k-1.
As embodiment preferably, the action that the video file that user selects can move to predeterminated position by the second default glide direction information of the first electronic equipment touch gestures is sent to the second electronic equipment.Because the video of playing arranges button or interface operation, can affect the first electronic equipment user's viewing effect.And selecting the video transmitting in playing need to have individual trigger action.Trigger action can be that finger rests on touch-screen and triggers in the first Preset Time, after triggering, generates a translucent icons.If user moves to predeterminated position (can be that display screen edge can be also preset icon place) by translucent icons here by the second default glide direction information, record the frame of video of current broadcasting, from the frame of video (the first frame from video also can be set) of record, start transmission of video to the second electronic equipment.User can stop displaying video in the first Preset Time also can continue displaying video.
In above-mentioned steps, the first electronic equipment may have annexation with many other electronic equipments, for avoiding transfer files to occur " misinformation ", can to transmitted object, distinguish by the mobile message of different directions.If the matching connection relation of the first electronic equipment and the second electronic equipment is " left side " (being that directional information in request data package and corresponding data bag is " left side "), when it need to select the file of current interface or icon to point out movably, turns left and move to display screen edge.In like manner, the matching connection relation of the first electronic equipment and the 3rd electronic equipment is " right side " (being that directional information in request data package and corresponding data bag is " right side "), when it need to select the file of current interface or icon to point out movably, turn right and move to interfacial boundary, can realize copying or transmitting or share of file or picture.By that analogy, the file that user the selects action that all the second default glide direction information by the first electronic equipment touch gestures moves to interface edge is sent to the second electronic equipment.In order there to be better adaptability, the information of glide direction for the first time that the second default glide direction information of saying here adopts in the time of can using the first electronic equipment to be connected with the second electronic equipment, also can make user according to the glide direction information of the needs definition of oneself.As shown in Figure 2, as substituting of display screen edge, the present embodiment also can be according to the number of directional information (8), corresponding icon is set on the assigned address of screen, each icon correspondence different matched rules, while realizing, file need only be moved to preset icon place, can realize copying or transmitting or share of file or icon.Like this, because each directional information has an icon corresponding, during Transmit message, only need know which icon file moves to and can find corresponding electronic equipment.
For guaranteeing that the file of transmission can transmit smoothly, the first electronic equipment can trigger file transfer according to predetermined touch gestures, but can increase like this user's operation easier and running time.As the first electronic equipment can slide or the specified rule of example of multi-direction slip be carried out file transmission with reference to multiple spot in embodiment mono-after selecting files, difference is, it must directed edge slides or move to the action at preset icon place.
From step S101 to S104 describe video file transmission method file need only the first electronic equipment and the second electronic equipment First Contact Connections the match is successful, when transfer files, do not need to agree to or response through the second electronic equipment, can be by file transfer to the second electronic equipment of the first electronic equipment, some unnecessary interface operations have been greatly reduced, for user has saved the time.If but the file that the second electronic equipment need to select checking to accept increases the security of file, needs to add step S105, as shown in Figure 3.
S105: send response message if the second electronic equipment receives the file transmission order of the first electronic equipment, receive and playing video file.Here the response message of saying refers to that the second electronic equipment user agrees to accept file, agrees to accept the operation of file.In the present embodiment, response message refers to that the glide direction information that the second electronic equipment touch gestures detected is the 3rd default glide direction information.In order there to be better adaptability, the information of glide direction for the first time that the three default glide direction information of saying here adopt in the time of can using the first electronic equipment to be connected with the second electronic equipment, also can make user according to the glide direction information of the needs definition of oneself.
The structural representation of a kind of video file transmission system embodiment of the present invention has been shown in Fig. 3.
A transmission system, is applied to the first electronic equipment, comprising:
Touch gestures detection module, the positional information of the touch point after the touch point of clicking on touch-screen for detection of user and slip, and produce glide direction information according to the position of touch point;
Data processing module, for the request data package establishing a communications link according to request of described touch point glide direction Information generation and the second electronic equipment; After the first electronic equipment and the second electronic equipment connect, the second default glide direction information that data processing module is also used for the video file of selecting according to the first electronic equipment user is transmitted or is shared to the second electronic equipment.
Response detection module, for detection of the first electronic equipment, whether within the default time interval, receive the response data packet that the second electronic equipment is replied, the glide direction information of the second electronic equipment touch gestures in described response data packet is the first default glide direction information;
First communication module, for receiving the information of response detection module, connects according to information and described the second electronic equipment, also for send to the instruction of the second electronic equipment according to the file of the first electronic equipment user selection, carrys out Transmit message.
The action that the second default glide direction information of the video file that the first electronic equipment user selects by the first electronic equipment touch gestures moves to predeterminated position sends to the second electronic equipment, if what the first electronic equipment user selected is in progress video file, record the frame of video of current broadcasting, from described frame of video, start transmitting video files to the second electronic equipment.
A transmission system, is applied to the second electronic equipment, comprising:
Touch gestures detection module, the positional information of the touch point after the touch point of clicking on touch-screen for detection of user and slip, and produce glide direction information according to the position of touch point;
Whether response detection module, send corresponding document for detection of the first electronic equipment and send a command to the second electronic equipment.
It can be by the second default glide direction information of the first electronic equipment touch gestures, to move to the action of predeterminated position that above-mentioned file sends order.
Data processing module, for according to response data packet establishing a communications link with the first electronic equipment of described touch point glide direction Information generation, and is sent to network by this response data packet;
Second communication module, for when the first electronic equipment receives the response data packet of the second electronic equipment within the default time, establishes a communications link with the first electronic equipment, and can be used for receiving file.
In the present embodiment, the principle of work of modules is: the touch point that touch gestures detection module detection user clicks on touch-screen and the positional information of the touch point after slip, and produce glide direction information according to the position of touch point, data processing module receives the glide direction information that touch gestures detection module generates, and generate the request data package that a request and the second electronic equipment establish a communications link, this request data package is sent to network by first communication module.Now, the second electronic equipment receives this request data package, and it detects user's screen by touch gestures detection module and carries out operational motion, and according to the glide direction Information generation response data packet of touch gestures.The second electronic equipment sends to response data packet the response detection module of the first electronic equipment again by network, if the first electronic equipment detected, within the default time, receive the response data packet that the second electronic equipment is replied, and the glide direction information of the second electronic equipment touch gestures in response data packet is the first default glide direction information, control first communication module and communicate by letter with the second communication module of the second electronic equipment, and connect.
In addition, if do not receive while carrying out under the first electronic equipment requests packet at the second electronic equipment, the glide direction Information generation response data packet of the touch gestures that the second electronic equipment detects, if the first electronic equipment detected, within the default time, receive the response data packet that the second electronic equipment is replied, if the glide direction information of the second electronic equipment touch gestures in response data packet is the first default glide direction information, control first communication module and communicate by letter with the second communication module of the second electronic equipment, establish a communications link.
After establishing a connection, video file in the broadcasting that the first electronic equipment user selects by touch-screen, and the action that the second default glide direction information by the first electronic equipment touch gestures moves to predeterminated position sends to the second electronic equipment.During the file of user in select playing, can in Preset Time, rest on touch-screen and trigger (after triggering, generating a translucent icons), (by transparent icons) moves to predeterminated position by the second default glide direction information and sends the file in broadcasting again, and the Preset Time is here 1s.Such operation, can make the first electronic user be subject to Transmit message under the less condition affecting in result of broadcast.Here triggering can also be to push button or touch screen key to produce or click the predeterminated position generation that screen produced or clicked screen in Preset Time.
In order to strengthen security, the second electronic equipment can also receive the file transmission order of the first electronic equipment again and send response message, just rear reception playing video file.Here the response message of saying refers to that the second electronic equipment user agrees to accept file, agrees to accept the operation of file.In the present embodiment, response message refers to that the glide direction information that the second electronic equipment touch gestures detected is the 3rd default glide direction information.As embodiment preferably, the default glide direction information in above-mentioned response data packet is roughly the same or roughly contrary with the glide direction information of the first electronic equipment touch gestures.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.