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) a common service network is arranged.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 one or more fingers (or touch objects) touch screen is arranged, if (100ms) finger is slided left by touch point in Preset Time, the request instruction produced comprises the information moved to left.If have a plurality of fingers to move toward different directions, and the request msg produced 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, comprise in LAN (Local Area Network) or wide area network.As preferred embodiment, adopted the wireless network in the 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, not there will be this situation), have suggestedly, the user need only touch corresponding gesture or press corresponding prompting button by prompting and get final product.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 the user to perplex; On the other hand, the first electronic equipment user can not be connected 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 on touch-screen to be placed one or more fingers 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 one or more fingers (or touch objects) are arranged in touch screen, and (100ms) finger is slided left by touch point in Preset Time.If have a plurality of fingers to move toward different directions, and the request msg produced 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.After the first electronic equipment receives response data packet, can judge whether the glide direction information in response data packet is the first default glide direction information, if, connect, if not, return 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 following several situation:
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 is roughly the same with the directional information of request data package or roughly contrary, as 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 substantially vertical with the directional information of request data package upwards or substantially vertical downwards, as the moving direction information of request data package is " left side ", and the moving direction information of the response data packet required 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 the 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, connected.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.Due to the first electronic equipment and the second electronic equipment when the practical operation, can not obtain absolutely identical glide direction information, therefore, in the present invention, roughly the same or angle that roughly refer on the contrary the glide direction information of the first electronic equipment touch gestures and the first default glide direction information differs and is no more than 45o(4 directions) or 22.5o(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 the angle by judging " upper left " and horizontal direction is greater than 45oif 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 ", the operation that the glide direction information that he can tell the second electronic equipment user to carry 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 with them, be connected easily.This is than searching out successively traditionally their user name, then the efficiency connected 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 the targeted customer.By actual direction of operating (being glide direction information), the 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 simply is convenient to public use on the one hand, on the other hand, can reduce " mistake connects ".The connection that the technical program can allow the interior specific user of LAN (Local Area Network) carry out " can identify " is with mutual, and then the efficiency of raising communication.
In above-mentioned steps, the first electronic equipment does not receive response data packet within the default time, the time that perhaps 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 recorded 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 be connected with the first electronic equipment by the stroke order of writing successively " king " this word, and then connect.And the same time, by a plurality of fingers while touch screen, then slided, may be produced 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, apply this technology for the multi-user simultaneously and there is certain secret protection effect.
According to above-mentioned steps, can produce following effect: first, move touch by finger 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 the 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, the 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 the 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, from described frame of video, start transmitting video files to the second electronic equipment; The electronic equipment connected by S101 to S103, the user has possessed the information of having classified, need only be operated and be sent according to button prompting and be got final product, perhaps 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 at first transmitting terminal will transmit (Video coding mode, size, in progress frame number, the compression algorithm of every frame) is afterwards 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 compressed that (compression algorithm can be sky, when compression algorithm is that sky means data not to be compressed), and by the location transmission of itself and whole video to receiving end, suppose that whole video has the M frame, and current broadcasting is the 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 means not decompress), present frame is inserted into to the relevant position of video video according to the frame position received afterwards.When the frame read in is abundant, carry out play operation.If the user of receiving end moves the broadcasting mark post, if not receiving frame number that receiving end can be corresponding mark post before frame corresponding to mark post records and sends to video sending end, after video sending end receives these data, (be assumed to be the k frame) will change sending order when send data next time is k, k+1, k+2 ... M, 0 ... k-1.
As embodiment preferably, the action that the video file that the 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 is arranged button or interface operation, can affect the first electronic equipment user's viewing effect.And the video in selecting the transmission broadcasting need to have individual trigger action.Trigger action can be that finger rests on touch-screen and triggered in the first Preset Time, after triggering, generates a translucent icons.If the user moves to predeterminated position (can be that the display screen edge can be also the 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.The 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, " misinformation " occur, can to transmitted object, be distinguished by the mobile message of different directions.As the matching connection relation of the first electronic equipment and the second electronic equipment is " left side " (is directional information be " left side ") in request data package and corresponding data bag, when it needs to select the file of current interface or icon to point out movably, turns left and move to the 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 "), turn right and move to interfacial boundary when the file of its needs selection current interface or icon are pointed out movably, can realize copying or transmitting or share of file or picture.By that analogy, the file that the 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.For better adaptability is arranged, 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 the glide direction information of user according to 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 (8) of directional information, corresponding icon is set on the assigned address of screen, each icon correspondence different matched rules, file need only be moved to the preset icon place while realizing and get final product, can realize copying or transmitting or share of file or icon.Like this, because each directional information has an icon corresponding, only need know during Transmit message which icon file moves to and can find corresponding electronic equipment.
For the file that guarantees 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 the file transmission with reference to the 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 the video file transmission method file need only the first electronic equipment and the second electronic equipment First Contact Connections the match is successful gets final product, when transfer files, do not need to agree 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 the 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.For better adaptability is arranged, 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 the glide direction information of user according to 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 kind of video file transmission system, be applied to the first electronic equipment, comprising:
The touch gestures detection module, the positional information of the touch point after the touch point of clicking on touch-screen for detection of the user and slip, and produce glide direction information according to the position of touch point;
Data processing module, for the request data package established 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.
The response detection module, whether within the default time interval, receive for detection of the first electronic equipment 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, connect according to information and described the second electronic equipment, and the instruction that also for the file according to the first electronic equipment user selection, sends to the second electronic equipment 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 kind of video file transmission system, be applied to the second electronic equipment, comprising:
The touch gestures detection module, the positional information of the touch point after the touch point of clicking on touch-screen for detection of the user and slip, and produce glide direction information according to the position of touch point;
Whether the 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 to move to the action of predeterminated position by the second default glide direction information of the first electronic equipment touch gestures that above-mentioned file sends order.
Data processing module, for according to response data packet established a communications link with the first electronic equipment of described touch point glide direction Information generation, and be 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, establish 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 the 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 the 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, receive if the first electronic equipment detected the response data packet that the second electronic equipment is replied within the default time, 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 under the first electronic equipment requests packet while carrying out at the second electronic equipment, the glide direction Information generation response data packet of the touch gestures that the second electronic equipment detects, receive if the first electronic equipment detected the response data packet that the second electronic equipment is replied within the default time, 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 be triggered (generating a translucent icons after triggering), (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 here is 1s.Such operation, can make the first electronic user be subject to Transmit message under the less condition affected in result of broadcast.Here triggering can also be to push button or touch the predeterminated position that screen key produces or the click screen produces or click screen in Preset Time to produce.
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.