CN105120447B - A kind of terminal connection method and device - Google Patents

A kind of terminal connection method and device Download PDF

Info

Publication number
CN105120447B
CN105120447B CN201510405675.9A CN201510405675A CN105120447B CN 105120447 B CN105120447 B CN 105120447B CN 201510405675 A CN201510405675 A CN 201510405675A CN 105120447 B CN105120447 B CN 105120447B
Authority
CN
China
Prior art keywords
scanning
terminal
scanned
adb
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510405675.9A
Other languages
Chinese (zh)
Other versions
CN105120447A (en
Inventor
蔡锐
李刚
宋堃
姜振宇
罗亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510405675.9A priority Critical patent/CN105120447B/en
Publication of CN105120447A publication Critical patent/CN105120447A/en
Application granted granted Critical
Publication of CN105120447B publication Critical patent/CN105120447B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Small-Scale Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention provides a kind of terminal connection method and device, method therein includes: to receive the request of multi-screen interactive;At least two scanning modes are scanned terminal in scheduled thread;Connection type is determined according to scanning result, and the terminal is connected by the determining connection type.This method is scanned simultaneously by least two scanning modes, scanning speed greatly improved, and determine that connection type also substantially reduces the time of terminal connection by scanning mode, to improve joint efficiency.

Description

A kind of terminal connection method and device
Technical field
The present invention relates to computer field more particularly to a kind of terminal connection methods and device.
Background technique
Currently used terminal discovery method is only capable of carrying out the discovery of terminal by single scanning mode, but can not protect It demonstrate,proves the terminal being found and also supports the corresponding agreement of the scanning mode, therefore again using other scanning sides only after discovery failure Formula results in a finding that terminal velocity is slow, and connection has some setbacks.
Summary of the invention
One of the technical problems solved by the present invention is to existing terminal discovery methods can not use a variety of scanning sides simultaneously The discovery of formula progress terminal.
According to an aspect of the invention, there is provided a kind of terminal connection method, comprising:
Receive the request of multi-screen interactive;
At least two scanning modes are scanned terminal in scheduled thread;
Connection type is determined according to scanning result, and the terminal is connected by the determining connection type.
According to another aspect of the present invention, a kind of terminal connection device is provided, comprising:
For receiving the device of the request of multi-screen interactive;
The device that terminal is scanned in scheduled thread at least two scanning modes;
For determining connection type according to scanning result, and the dress of the terminal is connected by the determining connection type It sets.
Since the terminal connection method and device of the present embodiment pass through at least two scanning modes when multi-screen interactive connects It is scanned simultaneously, scanning speed greatly improved, and determine that connection type also substantially reduces terminal by scanning mode The time of connection, to improve joint efficiency.
Those of ordinary skill in the art will understand that although following detailed description carries out referenced in schematic embodiment, attached drawing, But the present invention is not limited to these embodiments.But the scope of the present invention is extensive, and is intended to only through appended right It is required that limiting the scope of the invention.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other Feature, objects and advantages will become more apparent upon:
Fig. 1 shows the flow chart of terminal connection method according to an embodiment of the invention.
Fig. 2 shows the flow charts of terminal connection method according to another embodiment of the present invention.
Fig. 3 shows the block diagram of terminal connection device according to an embodiment of the invention.
Fig. 4 shows the block diagram of terminal connection device according to another embodiment of the present invention.
The same or similar appended drawing reference represents the same or similar component in attached drawing.
Specific embodiment
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although operations are described as the processing of sequence by flow chart, therein to be permitted Multioperation can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of operations can be rearranged.When it The processing can be terminated when operation completion, it is also possible to have the additional step being not included in attached drawing.The processing It can correspond to method, function, regulation, subroutine, subprogram etc..
Alleged " terminal " within a context, also referred to as " computer ", referring to can be by running preset program or referring to Enable to execute numerical value and calculate and/or the smart electronics terminal of the predetermined process process such as logic calculation, may include processor with Memory executes the survival prestored in memory instruction by processor to execute predetermined process process, or by ASIC, The hardware such as FPGA, DSP execute predetermined process process, or are realized by said two devices combination.Terminal includes but unlimited In server, PC, laptop, tablet computer, smart phone etc..
The terminal includes user terminal and the network terminal.Wherein, the user terminal includes but is not limited to electricity Brain, smart phone, PDA etc.;The network terminal includes but is not limited to that single network server, multiple network servers form Server group or the cloud consisting of a large number of computers or network servers for being based on cloud computing (Cloud Computing), In, cloud computing is one kind of distributed computing, a super virtual computer consisting of a loosely coupled set of computers. Wherein, the terminal can isolated operation realize the present invention, also can access network and by with other meters in network The present invention is realized in the interactive operation of calculation machine terminal.Wherein, network locating for the terminal includes but is not limited to interconnect Net, wide area network, Metropolitan Area Network (MAN), local area network, VPN network etc..
It should be noted that the user terminal, the network terminal and network etc. are only for example, other are existing or from now on may be used The terminal or network that can occur such as are applicable to the present invention, should also be included within the scope of protection of the present invention, and to draw It is incorporated herein with mode.
Method (some of them are illustrated by process) discussed hereafter can be by hardware, software, firmware, centre Part, microcode, hardware description language or any combination thereof are implemented.Implement when with software, firmware, middleware or microcode When, program code or code segment to implement necessary task can be stored in machine or computer-readable medium and (for example deposit Storage media) in.Necessary task can be implemented in (one or more) processor.
Specific structure and function details disclosed herein are only representative, and are for describing the present invention show The purpose of example property embodiment.But the present invention can be implemented by many alternative forms, and be not interpreted as It is limited only by the embodiments set forth herein.
Although it should be understood that may have been used term " first ", " second " etc. herein to describe each unit, But these units should not be limited by these terms.The use of these items is only for by a unit and another unit It distinguishes.For example, without departing substantially from the range of exemplary embodiment, it is single that first unit can be referred to as second Member, and similarly second unit can be referred to as first unit.Term "and/or" used herein above include one of them or Any and all combinations of more listed associated items.
It should be understood that when a unit referred to as " connects " or when " coupled " to another unit, can directly connect Another unit is connect or be coupled to, or may exist temporary location.In contrast, " directly connect when a unit is referred to as Connect " or " direct-coupling " to another unit when, then temporary location is not present.It should explain in a comparable manner and be used to retouch State the relationship between unit other words (such as " between being in ... " compared to " between being directly in ... ", " and with ... it is adjacent Closely " compared to " with ... be directly adjacent to " etc.).
Term used herein above is not intended to limit exemplary embodiment just for the sake of description specific embodiment.Unless Context clearly refers else, otherwise singular used herein above "one", " one " also attempt to include plural number.Also answer When understanding, term " includes " and/or "comprising" used herein above provide stated feature, integer, step, operation, The presence of unit and/or component, and do not preclude the presence or addition of other one or more features, integer, step, operation, unit, Component and/or combination thereof.
It should further be mentioned that the function action being previously mentioned can be attached according to being different from some replace implementations The sequence indicated in figure occurs.For example, related function action is depended on, the two width figures shown in succession actually may be used Substantially simultaneously to execute or can execute in a reverse order sometimes.
Present invention is further described in detail with reference to the accompanying drawing.
Fig. 1 is the flow chart of terminal connection method according to an embodiment of the invention.
In conjunction with shown in Fig. 1, terminal connection method described in the present embodiment includes the following steps:
S110, the request for receiving multi-screen interactive;
S120, at least two scanning modes are scanned terminal in scheduled thread;
S130, connection type is determined according to scanning result, and the terminal is connected by the determining connection type.
Each step is described in further detail below.
In step S110, the request for the multi-screen interactive that other user terminals (hereinafter referred to as " terminal ") is sent is received, or is connect Receive the request of the multi-screen interactive of user's operation.
In step S120, scanning mode be can include but is not limited to such as under type: mDNS (multicast domain name system, Multicast Domain Name System) (Android debugs bridge, Android by scanning, the scanning of fixed port poll and ADB Dedug Bridge)。
Wherein, mDNS scanning is scanned terminal by way of multicast in scheduled thread.MDNS scanning passes through Multicast mode carries out the lookup and discovery of terminal in local area network in itself independent thread, can not be sent due to some terminals or Receive multicast, if therefore the method that is found by existing equipment will lead to using single scanning mode through mDNS scanning mistake Scanning is re-started using other scanning modes again after losing, and the embodiment of the present invention is scanned simultaneously using a variety of scanning modes, it can With determine fastest sweep to terminal scanning mode be scan successfully, and pass through the corresponding connection type of the scanning mode directly into The connection of row terminal while improving scanning success rate, improves the successful speed of scanning.
Wherein, fixed port poll scanning is scanned terminal by way of IP poll in scheduled thread.Gu Determining port polling scanning is polled by the IP in pre-defined algorithm local area network, generally compared with ADB scanning, fixed port The priority of poll scanning is higher than ADB scanning, therefore when distributing the number of thread pool, distribute to the scanning of fixed port poll The thread pool number that thread pool number generally can be scanned mostly with ADB, therefore the speed of fixed port poll scanning is also that can sweep than ADB It retouches fast.
Wherein, Android debugging bridge ADB scanning is scanned terminal by ADB agreement in scheduled thread.ADB scanning Priority generally can be minimum in three scanning modes, and be only found terminal system support ADB and have protect Card does not distort ADB port and protocol, can scan scanning by ADB and be found terminal to corresponding.
As optional, if being found to be equipped with predetermined software in terminal, mDNS scanning and fixed port wheel can be passed through Scanning is ask directly to be scanned the service of the predetermined software, if by mDNS scanning and the scanning failure of fixed port poll, The push then serviced by ADB scanning mode, i.e., by ADB scanning without being found in terminal equipped with predetermined software, only The system for being found terminal supports ADB.
As optional, determine in mDNS scanning, the scanning of fixed port poll and ADB scanning and scan sweeping to terminal at first Mode is retouched to scan successfully, but is scanned since the speed of mDNS scanning and the scanning of fixed port poll is faster than ADB, therefore general mDNS There is a scanning to discoverable device in scanning and the scanning of fixed port poll, then it is assumed that scan successfully.
As optional, if mDNS scanning and the scanning of fixed port poll scan simultaneously is arrived terminal, basis is preset Priority, determine the high scanning mode of priority be scan successfully.Wherein, pre-set priority can be user setting , it is also possible to system setting, can also be manufacturer terminal setting, generally can all select and the most matched scanning side of terminal Formula is set as highest priority.
In step S130, if being scanned successfully by mDNS, it is connect by random port with the terminal.Ordinary circumstance Under, after being scanned successfully by mDNS, it is attached by the predetermined software in discovery terminal, IP can be parsed and with generator terminal Mouthful, what it is due to selection is random port, therefore will not encounter the occupied situation in port, and IP with random port generally by registering Service side has set, therefore the problems such as IP conflict will not occurs.
In step S130, if being scanned successfully by fixed port poll, it is connect by fixed port with the terminal.One As in the case of, after being scanned successfully by fixed port poll, by discovery terminal in predetermined software be attached, due to adopting It is fixed port, therefore can learns the corresponding port numbers of fixed port in advance, for example, port numbers is 22222.
In step S130, if scanning successfully by ADB, start book server, and by the book server with The terminal connection.Wherein, book server can be the ADB daemon module of system in terminal, pass through two terminals The ADB daemon module of middle system establishes connection.Wherein, connection type after ADB is scanned successfully using fixed port, Therefore the corresponding port numbers of fixed port can be learnt in advance, for example, port numbers are 55555.
As optional, if receiving the request of N number of multi-screen interactive, wherein N is positive integer, then according to pre-defined rule by institute The request for stating N number of multi-screen interactive is added to task queue.Wherein, scheduled rule can be according to the time sequencing for receiving request It adds requests in task queue;Such as: 9:00 receives request A, and 9:02 receives request B, then the sequence of task queue It is: 1, requests A, 2, request B.Scheduled rule is also possible to classify to request, by the request in the high classification of priority It is added to the front end of task queue, such as: the priority of terminal A is higher than terminal B, and 9:00 receives the connection request of terminal A, and 9: 00 receives the connection request of terminal B, then the sequence of task queue is: 1, the connection request of terminal A, and 2, the connection of terminal B asks It asks.The request of a multi-screen interactive is successively determined according to putting in order for task queue.The request of every one multi-screen interactive of determination Just handled according to above-mentioned terminal connection method.
Terminal described in the embodiment of the present invention is both needed to have display device, such as: handle with display screen has display Bracelet, mobile phone, TV or pad of screen etc..
In conjunction with shown in Fig. 2, another terminal connection method described in the present embodiment carries out multi-screen with Terminal A requests terminal B For interaction, include the following steps:
S210, terminal A send multi-screen interactive and request to give terminal B.
Wherein, multi-screen interactive refer generally to by be connected to the network carried out between different terminals the transmission of multimedia content, parsing, The operation such as displaying and control, realization is shared simultaneously in different platform equipment shows content.Such as: by television presentation mobile phone Video file etc..
S220, terminal B receive multi-screen interactive request after, while in the independent thread of mDNS carry out mDNS scanning, It distributes to and port polling scanning is fixed in the thread of fixed port poll, ADB is swept in the thread for distributing to ADB carries out It retouches.
If S2301, terminal A are mounted on the scheduled APP connected for multi-screen interactive with terminal B, terminal B passes through Terminal A is arrived in scanning at first for mDNS scanning, is scanned successfully then determining that by mDNS.
If S2302, terminal A are mounted on the scheduled APP connected for multi-screen interactive with terminal B, terminal B passes through solid Determining port polling scanning, scanning is scanned successfully then determining that by fixed port poll to terminal A at first.
If S2303, terminal A and terminal B wherein at least one terminal are not installed with and scheduled connect for multi-screen interactive APP, then terminal B can be scanned scanning at first by ADB and arrive terminal A, be scanned successfully then determining that by ADB.
S2401, if it is determined that scanned successfully by mDNS, then terminal B establishes connection by random port and terminal A.
S2402, it is scanned successfully if it is determined that passing through fixed port poll, then terminal B passes through fixation used in scanning to terminal A Port and terminal A establish connection.
S2403, if it is determined that scanned successfully by ADB, then terminal B passes through fixed port and end used in scanning to terminal A End A establishes connection.
In conjunction with shown in Fig. 3, terminal connection device described in the present embodiment be can be set in subscriber terminal side, including such as Lower device:
For receiving the device (hereinafter referred to as " reception device ") 110 of the request of multi-screen interactive.
Device (hereinafter referred to as " the scanning that terminal is scanned in scheduled thread at least two scanning modes Device ") 120.
For determining connection type according to scanning result, and the dress of the terminal is connected by the determining connection type Set (hereinafter referred to as " port connecting apparatus ") 130.
Each step is described in further detail below.
In reception device 110, the request for the multi-screen interactive that other user terminals are sent is received, or receive the more of user's operation Shield the request of interaction.
In scanning means 120, scanning mode may include: mDNS (multicast domain name system, Multicast Domain Name System) scanning, the scanning of fixed port poll and ADB (Android debugs bridge, Android Dedug Bridge) etc..
As shown in connection with fig. 4, scanning means 120 may include at least one following device:
The device being scanned by way of multicast to terminal in scheduled thread for mDNS scanning is (hereinafter referred to as " mDNS scanning means ") 1201.MDNS scanning carries out terminal in local area network by multicast mode in itself independent thread It searches and finds, since some terminals can not send or receive multicast, if therefore being used by the method that existing equipment is found single One scanning mode will lead to by re-starting scanning using other scanning modes again after mDNS scanning failure, and of the invention Embodiment is scanned simultaneously using a variety of scanning modes, can determine fastest sweep to terminal scanning mode to scan successfully, and The connection that terminal is directly carried out by the corresponding connection type of the scanning mode improves while improving scanning success rate Scan successful speed.
The dress being scanned by way of IP poll to terminal in scheduled thread is scanned for fixed port poll Set (hereinafter referred to as " fixed port poll scanning means ") 1202.The scanning of fixed port poll is by pre-defined algorithm local area network Interior IP is polled, and generally compared with ADB scanning, the priority of fixed port poll scanning is higher than ADB scanning, therefore is dividing When number with thread pool, thread pool that the thread pool number for distributing to the scanning of fixed port poll generally can mostly with ADB scanning Number, therefore the speed of fixed port poll scanning is also that can scan fastly than ADB.
The device being scanned by ADB agreement to terminal in scheduled thread for ADB scanning is (hereinafter referred to as " ADB scanning means ") 1203.The priority of ADB scanning generally can be minimum in three scanning modes, and only be found The system of terminal is supported ADB and is had to guarantee not distorting ADB port and protocol, can be scanned by ADB to corresponding It is found terminal.
As optional, if being found to be equipped with predetermined software in terminal, mDNS scanning and fixed port wheel can be passed through Scanning is ask directly to be scanned the service of the predetermined software, if by mDNS scanning and the scanning failure of fixed port poll, The push then serviced by ADB scanning mode, i.e., by ADB scanning without being found in terminal equipped with predetermined software, only The system for being found terminal supports ADB.
As shown in connection with fig. 4, the terminal connection device can also include at least one following device:
The scanning mode for arriving terminal is scanned in mDNS scanning, the scanning of fixed port poll and ADB scanning at first for determining To scan successful device (hereinafter referred to as " the first scanning determining device ") 410.But due to mDNS scanning and fixed port poll The speed of scanning is faster than ADB scanning, therefore has a scanning in general mDNS scanning and the scanning of fixed port poll to being found to set It is standby, then it is assumed that scan successfully.
If for mDNS scanning and the scanning of fixed port poll while scanning to terminal, according to pre-set preferential Grade determines the high scanning mode of priority to scan successful device (hereinafter referred to as " the second scanning determining device ") 420.Its In, pre-set priority can be user setting, be also possible to system setting, can also be that manufacturer terminal is arranged , it generally can all select to be set as highest priority with the most matched scanning mode of terminal.
As shown in connection with fig. 4, port connecting apparatus 130 may include at least one following device:
If the device being connect with the terminal by random port is (hereinafter referred to as being scanned successfully by mDNS " mDNS attachment device ") 1301.Under normal circumstances, after scanning successfully by mDNS, pass through the predetermined software in discovery terminal It is attached, IP and random port can be parsed, what it is due to selection is random port, therefore will not encounter the occupied feelings in port Condition, and IP has generally been set by registration service side with random port, therefore the problems such as IP conflict will not occur.
If for by fixed port poll scan successfully, pass through fixed port connect with the terminal device (with Lower abbreviation " fixed port poll attachment device ") 1302.Under normal circumstances, logical after being scanned successfully by fixed port poll The predetermined software crossed in discovery terminal is attached, and due to using fixed port, therefore can learn that fixed port is corresponding in advance Port numbers, for example, port numbers be 22222.
If starting book server, and pass through the book server and the terminal for scanning successfully by ADB The device (hereinafter referred to as " ADB attachment device ") 1303 of connection.Wherein, book server can be the ADB of system in terminal Daemon module establishes connection by the ADB daemon module of system in two terminals.Wherein, after ADB is scanned successfully Connection type can learn the corresponding port numbers of fixed port using fixed port in advance, for example, port numbers are 55555.
As shown in connection with fig. 4, the terminal connection device can also include following device:
If the request for receiving N number of multi-screen interactive, wherein N is positive integer, then will be described N number of more according to pre-defined rule The request of screen interaction is added to the device (hereinafter referred to as " queue adding set ") 440 of task queue.Wherein, scheduled rule can To be added requests in task queue according to the time sequencing for receiving request;Such as: 9:00 receives request A, and 9:02 connects Request B is received, then the sequence of task queue is: 1, requesting A, 2, request B.Scheduled rule is also possible to divide terminal The request that terminal in the high classification of priority is sent is added to the front end of task queue by class, such as: the priority of terminal A is high The connection request of terminal A is received in terminal B, 9:00,9:00 receives the connection request of terminal B, then the sequence of task queue It is: 1, the connection request of terminal A, 2, the connection request of terminal B.
Device for the request for successively determining a multi-screen interactive that puts in order according to task queue is (hereinafter referred to as " determining request unit ") 430.The request of every one multi-screen interactive of determination is just handled according to above-mentioned terminal connection device.
Terminal connection device described in the embodiment of the present invention can be integrated into for the terminal of Android system by jar packet In the apk of APP, it can be integrated into the ipa of APP by static library .a for ios system, terminal generally passes through Tele Device Manager carries out the operation of a variety of scannings, can obtain Tele by Tele Device Manager Device, and the Tele Device by obtaining is attached operation.
Terminal connection method and device provided in an embodiment of the present invention, using mDNS scanning, fixed port poll scanning and ADB scans the scanning that three kinds of modes carry out terminal simultaneously, and the probability and speed of the discovery terminal greatly accelerated ensure that discovery Speed, for connection aspect, by the way of the random port of fixed port and mDNS, it is ensured that the speed of connection.For Using the terminal of multi-screen interactive software development kit, without by hardware integration, can easier calling can be realized Multi-screen interactive.
It should be noted that the present invention can be carried out in the assembly of software and/or software and hardware, for example, this hair Specific integrated circuit (ASIC) can be used in bright each device or any other is realized similar to hardware terminal.In one embodiment In, software program of the invention can be executed to implement the above steps or functions by processor.Similarly, of the invention Software program (including relevant data structure) can be stored in computer readable recording medium, for example, RAM memory, Magnetic or optical driver or floppy disc and similar terminal.In addition, some of the steps or functions of the present invention may be implemented in hardware, example Such as, as the circuit cooperated with processor thereby executing each step or function.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This Outside, it is clear that one word of " comprising " does not exclude other units or steps, and odd number is not excluded for plural number.That states in system claims is multiple Unit or device can also be implemented through software or hardware by a unit or device.The first, the second equal words are used to table Show title, and does not indicate any particular order.
Although front is specifically shown and describes exemplary embodiment, it will be understood to those of skill in the art that It is that without departing substantially from the spirit and scope of claims, can be varied in terms of its form and details.Here Sought protection illustrates in the dependent claims.

Claims (10)

1. a kind of terminal connection method, comprising:
Receive the request of multi-screen interactive;
At least two scanning modes are carried out while being scanned to terminal in respective scheduled thread;
Connection type is determined according to scanning result, and the terminal is connected by the determining connection type.
2. according to the method described in claim 1, wherein, at least two scanning mode is scanned in scheduled thread The step of include:
Multicast domain name system mDNS scanning is scanned terminal by way of multicast in scheduled thread;And/or
The scanning of fixed port poll is scanned terminal by way of IP poll in scheduled thread;And/or
Android debugging bridge ADB scanning is scanned terminal by ADB agreement in scheduled thread.
3. according to the method described in claim 2, further include:
The scanning mode for determining scanning at first to terminal in mDNS scanning, the scanning of fixed port poll and ADB scanning is to be scanned into Function;Or
If mDNS scanning and the scanning of fixed port poll while scanning are arrived terminal and are determined excellent according to pre-set priority The high scanning mode of first grade is to scan successfully.
4. according to the method described in claim 3, described determine connection type according to scanning result, and passing through the determining company The step of mode of connecing is attached include:
If being scanned successfully by mDNS, it is connect by random port with the terminal;Or
If being scanned successfully by fixed port poll, it is connect by fixed port with the terminal;Or
If scanning successfully by ADB, start book server, and connect with the terminal by the book server.
5. according to the method described in claim 1, further include:
If receiving the request of N number of multi-screen interactive, wherein N is positive integer, then according to pre-defined rule by N number of multi-screen interactive Request is added to task queue;
The request of a multi-screen interactive is successively determined according to putting in order for task queue.
6. a kind of terminal connection device, comprising:
For receiving the device of the request of multi-screen interactive;
The device that terminal is carried out in respective scheduled thread at least two scanning modes while being scanned;
For determining connection type according to scanning result, and the device of the terminal is connected by the determining connection type.
7. device according to claim 6, wherein described to be used at least two scanning modes in scheduled thread to terminal The device being scanned includes:
The device being scanned by way of multicast to terminal in scheduled thread is scanned for multicast domain name system mDNS; And/or
The device being scanned by way of IP poll to terminal in scheduled thread is scanned for fixed port poll; And/or
The device being scanned by ADB agreement to terminal in scheduled thread is scanned for Android debugging bridge ADB.
8. device according to claim 7, further includes:
For determining that the scanning mode of scanning at first to terminal in mDNS scanning, the scanning of fixed port poll and ADB scanning is to sweep Retouch successful device;Or
If for mDNS scanning and the scanning of fixed port poll while scanning to terminal, according to pre-set priority, really The high scanning mode of priority is determined to scan successful device.
9. device according to claim 8, described for determining connection type according to scanning result, and passes through determining institute It states connection type and connects the device of the terminal and include:
If for being scanned successfully by mDNS, the device being connect by random port with the terminal;If or for by solid Determine port polling to scan successfully, then the device connecting by fixed port with the terminal;Or
If starting book server, and connect with the terminal by the book server for scanning successfully by ADB Device.
10. device according to claim 6, further includes:
If the request for receiving N number of multi-screen interactive, wherein N is positive integer, then according to pre-defined rule that N number of multi-screen is mutual Dynamic request is added to the device of task queue;
For successively determining the device of the request of a multi-screen interactive according to putting in order for task queue.
CN201510405675.9A 2015-07-10 2015-07-10 A kind of terminal connection method and device Active CN105120447B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510405675.9A CN105120447B (en) 2015-07-10 2015-07-10 A kind of terminal connection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510405675.9A CN105120447B (en) 2015-07-10 2015-07-10 A kind of terminal connection method and device

Publications (2)

Publication Number Publication Date
CN105120447A CN105120447A (en) 2015-12-02
CN105120447B true CN105120447B (en) 2019-04-12

Family

ID=54668282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510405675.9A Active CN105120447B (en) 2015-07-10 2015-07-10 A kind of terminal connection method and device

Country Status (1)

Country Link
CN (1) CN105120447B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268486B (en) * 2016-12-30 2022-04-19 中兴通讯股份有限公司 Multimedia content association and playing method and device, and terminal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338139A (en) * 2013-06-18 2013-10-02 华为技术有限公司 Multi-screen interaction method and device, and terminal equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9516355B2 (en) * 2013-09-04 2016-12-06 Qualcomm Incorporated Discovering and controlling multiple media rendering devices utilizing different networking protocols

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338139A (en) * 2013-06-18 2013-10-02 华为技术有限公司 Multi-screen interaction method and device, and terminal equipment

Also Published As

Publication number Publication date
CN105120447A (en) 2015-12-02

Similar Documents

Publication Publication Date Title
US8856355B2 (en) Systems and methods for facilitating communication between mobile devices and display devices
US20170163580A1 (en) Interactive method and device for playback of multimedia
CN109729040B (en) Method, apparatus and computer readable medium for selection of a protocol
CN106303735B (en) A kind of barrage display system, method, apparatus and service customer end
US11843674B2 (en) Virtual workspace experience visualization and optimization
CN111694646A (en) Resource scheduling method and device, electronic equipment and computer readable storage medium
CN109510878B (en) Long connection session keeping method and device
CN108933829A (en) A kind of load-balancing method and device
CN106059959A (en) Bandwidth prioritization
US8924478B2 (en) Virtual desktop infrastructure (VDI) login acceleration
CN108900434A (en) Data collection distribution method and device
CN103561063A (en) Method and terminal for logging onto set top box
CN116431282A (en) Cloud virtual host server management method, device, equipment and storage medium
US20170188214A1 (en) Method and electronic device for sharing multimedia information
CN105550196A (en) Interaction method and device
CN102891851A (en) Access control method, equipment and system of virtual desktop
CN105120447B (en) A kind of terminal connection method and device
US10116773B2 (en) Packet processing method and related device that are applied to network device
US20170171357A1 (en) Apparatus and method for assisting in downloading file successfully
CN106453677A (en) Address allocation method and apparatus
CN111008146A (en) Method and system for testing safety of cloud host
CN107888677B (en) Communication implementation method, control terminal, intelligent device and system
CN106130893B (en) A kind of data packet sending method and electronic equipment
CN103618746A (en) Pushed instruction-based communication method for client server
CN112637254B (en) Data processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant