CN113660636A - Method, device, equipment and storage medium for determining equipment type - Google Patents

Method, device, equipment and storage medium for determining equipment type Download PDF

Info

Publication number
CN113660636A
CN113660636A CN202110932468.4A CN202110932468A CN113660636A CN 113660636 A CN113660636 A CN 113660636A CN 202110932468 A CN202110932468 A CN 202110932468A CN 113660636 A CN113660636 A CN 113660636A
Authority
CN
China
Prior art keywords
configuration information
protocol
determining
vehicle
function
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.)
Pending
Application number
CN202110932468.4A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110932468.4A priority Critical patent/CN113660636A/en
Publication of CN113660636A publication Critical patent/CN113660636A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application discloses a method, a device, equipment and a storage medium for determining equipment types, and belongs to the technical field of Bluetooth. The method comprises the following steps: establishing a Bluetooth connection with a second device; acquiring protocol configuration information of a protocol supported by the second equipment according to the Bluetooth connection, wherein the protocol configuration information is used for describing the capability of the second equipment; determining that the second device is the vehicle-mounted device in the case that the protocol configuration information indicates that the second device supports the target function; wherein the target function is a function supported only by the in-vehicle apparatus. The method can quickly and accurately determine the vehicle-mounted equipment.

Description

Method, device, equipment and storage medium for determining equipment type
Technical Field
The embodiment of the application relates to the technical field of bluetooth, in particular to a method, a device, equipment and a storage medium for determining equipment types.
Background
Nowadays, intelligent terminals (shortly, "terminals") can locate the stopping position of a vehicle.
When the terminal locates the stop position of the vehicle, whether the equipment connected with the terminal is the vehicle-mounted equipment is identified. In the related art, the terminal may read a Class Device (Device of Class) defined by Bluetooth Special Interest Group (Bluetooth SIG) in an Inquiry Response (Inquiry Response), where the Device of Class identifies a Device type, and determines whether the Device is a vehicle-mounted Device or not by the Device of Class.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for determining an equipment type. The technical scheme is as follows:
according to an aspect of the present application, there is provided a method for determining a device type, applied to a first device, the method including:
establishing a Bluetooth connection with a second device;
acquiring protocol configuration information of a protocol supported by the second equipment according to the Bluetooth connection, wherein the protocol configuration information is used for describing the capability of the second equipment;
determining that the second device is the vehicle-mounted device in the case that the protocol configuration information indicates that the second device supports the target function; wherein the target function is a function supported only by the in-vehicle apparatus.
According to another aspect of the present application, there is provided an apparatus for determining a device type, the apparatus comprising:
the connection module is used for establishing Bluetooth connection with the second equipment;
the acquisition module is used for acquiring protocol configuration information of a protocol supported by the second equipment according to the Bluetooth connection, wherein the protocol configuration information is used for describing the capability of the second equipment;
the determining module is used for determining that the second equipment is the vehicle-mounted equipment under the condition that the protocol configuration information indicates that the second equipment supports the target function; wherein the target function is a function supported only by the in-vehicle apparatus.
According to another aspect of the present application, there is provided a terminal comprising a processor, a memory coupled to the processor, and program instructions stored on the memory, the processor, when executing the program instructions, implementing a method of determining a device type as provided in the various aspects of the present application.
According to another aspect of the present application, there is provided a computer readable storage medium having stored therein program instructions which, when executed by a processor, implement a method of determining a device type as provided in various aspects of the present application.
According to another aspect of the present application, a computer program product is provided that includes computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and the computer instructions are executed by the processor to cause the computer device to execute the method provided in various optional implementation modes of the method for determining the type of the device.
The beneficial effects brought by the technical scheme provided by the embodiment of the application can include:
according to the method, the first Device and the second Device are connected in a Bluetooth mode, the function supported by the second Device is obtained through the protocol configuration information of the second Device, whether the second Device is the vehicle-mounted Device or not is determined through the function supported by the second Device, when the protocol configuration information of the second Device indicates that the second Device supports the target function of the vehicle-mounted Device, the second Device can be determined to be the vehicle-mounted Device, the problem that the Device type identified through the Device of Class field is inaccurate due to inaccurate writing of the Device of Class field on a plurality of vehicle-mounted devices can be solved, all protocol lists and instruction types of the second Device do not need to be read, and finally the Device type of the second Device can be determined efficiently and accurately.
Drawings
In order to more clearly describe the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a bluetooth communication system provided by an exemplary embodiment of the present application;
FIG. 2 illustrates a flow chart of a method of device type determination provided by an exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of a method of device type determination provided by another exemplary embodiment of the present application;
FIG. 4 illustrates a flow chart of a method of device type determination provided by another exemplary embodiment of the present application;
fig. 5 is a block diagram illustrating an apparatus for determining a device type according to an exemplary embodiment of the present application;
FIG. 6 illustrates a block diagram of a computer device provided by an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is to be noted that, unless otherwise explicitly specified or limited, the terms "connected" and "connected" are to be interpreted broadly, e.g., as being fixed or detachable or integrally connected; can be mechanically or electrically connected; may be directly connected or indirectly connected through an intermediate. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In order to make the solution shown in the embodiments of the present application easy to understand, several terms appearing in the embodiments of the present application will be described below.
Bluetooth technology (bluetooth), a wireless connection technology that supports near field communication of devices. The essence of the method is to establish a universal Radio Air Interface (Radio Air Interface) for the communication environment between fixed devices or mobile devices, and further combine the communication technology with the computer technology, so that various 3C devices can realize mutual communication or operation in a short distance range without mutual connection of wires or cables. Briefly, bluetooth technology is a technology for transmitting data to each other between various 3C devices using low power radio. The 3C device refers to Communication products (Communication), Computer products (Computer), and Consumer electronics products (Consumer).
Bluetooth technology is widely used for: the automobile field, such as Bluetooth hands-free communication, vehicle-mounted Bluetooth entertainment systems, Bluetooth vehicle remote condition diagnosis, automobile Bluetooth anti-theft technology and the like; the method comprises the following steps of industrial production fields, such as wireless monitoring of a numerical control machine tool by technicians, detection of the abrasion degree of parts, power output standardization and real-time and complete recording of the running state of a numerical control system by a Bluetooth monitoring system; medical fields such as diagnostic result delivery, ward monitoring.
In the automobile field, when a parking position of an automobile is located through a mobile Device (including a terminal), whether the Device connected with the mobile Device is an in-vehicle Device must be identified, and at this time, the mobile Device can read a Device of Class defined by Bluetooth SIG in Inquiry Response and determine whether the Device is the in-vehicle Device through the Device of Class. However, the bluetooth specification is not strictly followed by the car equipment manufacturers on the market today, and many times the writing of Device of Class is inaccurate, so identifying the Device type by Device of Class lacks accuracy in many scenarios. Therefore, the present application provides a method for determining a device type, and please refer to the following embodiments for detailed steps of the method.
Fig. 1 shows a schematic diagram of a bluetooth communication system provided by an exemplary embodiment of the present application. The bluetooth communication system includes a first device 120 and a second device 140. Wherein the first device 120 and the second device 140 both have bluetooth functionality.
For example, in the case that the bluetooth function of the first device 120 is turned on and the bluetooth function of the second device 140 is turned on, the first device 120 searches for bluetooth devices within a distance-allowed range, and displays a list of the searched bluetooth devices on the display of the first device 120, wherein if the second device 140 is within the distance-allowed range, the list includes a selection control of the second device 140, and the selection control includes a device name of the second device 140; the first device 120 receives the triggered selection operation on the selection control of the second device 140, and establishes the bluetooth connection between the first device 120 and the second device 140.
Illustratively, a bluetooth automatic connection function is provided between the first device 120 and the second device 140; in the case where the bluetooth function of the first device 120 is turned on and the bluetooth function of the second device 140 is turned on, the first device 120 detects that the second device 140 is located within the distance allowable range, and the first device 120 automatically establishes a bluetooth connection with the second device 140.
The above distance allowable range refers to a distance range that allows bluetooth connection to be established between two bluetooth devices. The Bluetooth connection can be established between two Bluetooth devices within the distance allowable range, and the Bluetooth connection cannot be established between two Bluetooth devices outside the distance allowable range.
In this embodiment, the first device 120 supports the operation of the device type determination method provided in this embodiment to determine the device type of the second device 140. For example, the first device may include a mobile phone, a tablet computer, a laptop computer, smart glasses, a smart watch, an MP4(Moving Picture Experts Group Audio Layer IV, mpeg Audio Layer 4) playback terminal, an MP5(Moving Picture Experts Group Audio Layer V, mpeg Audio Layer 5) playback terminal, a Virtual Reality (VR) playback terminal, an Augmented Reality (AR) playback terminal, and the like. Illustratively, the second device may include a headset, a sound box, an in-vehicle device, a tablet computer, a mobile phone, a smart tv, a smart phone, and the like.
Illustratively, an application that supports a positioning function of a vehicle parking position is installed and executed in the first device 120. When the positioning function of the vehicle stopping position is used on the first device 120, a bluetooth connection is established between the first device 120 and the second device 140, protocol configuration information and Input Output (IO) configuration information of a protocol supported by the second device 140 are acquired through the bluetooth connection, whether the second device 140 is a vehicle-mounted device is determined based on the protocol configuration information and the IO configuration information, and if yes, the vehicle stopping position is positioned.
It should be noted that the present embodiment is only an exemplary illustration of an application scenario of the device type determination method.
Fig. 2 is a flowchart illustrating a method for determining a device type according to an exemplary embodiment of the present application. The method for determining the device type may be applied to the first device 120. In fig. 2, the method for determining the device type includes:
step 210: a bluetooth connection is established with the second device.
For example, when the bluetooth functions of the first device and the second device are both turned on, the first device receives a search operation for the bluetooth device, which is triggered by the input device, and searches for the second device within a distance allowable range; and receiving a connection operation between the first device and the second device, which is triggered by the input device, such as a click operation, a double click operation or a sliding operation on a selection control corresponding to the second device, and establishing a bluetooth connection between the first device and the second device.
For example, in a case that the bluetooth functions of the first device and the second device are both turned on and an automatic connection function is provided between the first device and the second device, the first device automatically searches for the second device within the allowable distance range and automatically establishes bluetooth connection with the second device.
For example, in a case where the bluetooth function of the first device is not turned on, first, the first device receives a bluetooth turn-on operation on the input device, and starts the bluetooth function of the first device. Illustratively, the input device includes at least one of a touch screen and a physical key.
Step 220: and acquiring protocol configuration information of the protocol supported by the second equipment according to the Bluetooth connection.
In the process of determining the device type, the first device communicates with the second device through the Bluetooth connection, and protocol configuration information is obtained from the second device, wherein the protocol configuration information is used for describing the capability and the characteristic of the second device. Illustratively, the protocol configuration information may also be referred to as "protocol support capability", which is a capability provided by a protocol supported by the second device. Illustratively, the first device acquires configuration information (profile) supported by the second device through a bluetooth connection.
Illustratively, after the first device and the second device establish the bluetooth connection, the first device and the second device perform information interaction through a transmission frame, wherein the information interaction is the capability information interaction after the bluetooth connection is established between the two bluetooth devices; the method comprises the steps that first equipment receives interactive information sent by second equipment through a transmission frame, and protocol configuration information of the second equipment exists on a first designated zone bit of the transmission frame; and the first equipment acquires the protocol configuration information of the second equipment from the first designated zone bit.
Optionally, the protocol configuration information includes protocol configuration information related to inter-device communication; therefore, the first device acquires the protocol configuration information of the second device related to the inter-device communication, and the protocol configuration information which is not related to the inter-device communication can be excluded, so that the data amount required to be processed is reduced, and the execution efficiency of the whole scheme is improved.
In some embodiments, the first device sends first specific information to the second device, the first specific information being an inter-device communication message supported by a target function, the target function being a function supported only by the in-vehicle device; the first equipment receives first feedback information sent by the second equipment, wherein the first feedback information is information fed back to the first equipment by the second equipment aiming at the first specified information; the first device determines that the second device supports the target function in a case where the first feedback information is first specified feedback information, the first specified feedback information being feedback information that matches the first specified information under the target function.
For example, target configuration information exists in the second device under the target function, and the first device requests the target configuration information from the second device; and under the condition that the second equipment returns the target configuration information to the first equipment, the first equipment determines that the protocol support capability supports the target function. Illustratively, the target configuration information may be at least one protocol configuration information of at least one protocol.
Step 230: determining that the second device is the vehicle-mounted device in the case that the protocol configuration information indicates that the second device supports the target function; wherein the target function is a function supported only by the in-vehicle apparatus.
Optionally, the target function comprises at least one of:
supporting a Message Access Profile (MAP);
and supports Browsing (Browsing) function in Audio Video Remote Control Profile (AVRCP).
Illustratively, the first device determines whether the protocol configuration information indicates that the second device supports MAP; in case the protocol configuration information indicates that the second device supports the MAP, it is determined that the second device is the in-vehicle device.
Or, the first device judges whether the protocol configuration information supports a Browsing function in the AVRCP; and in the case that the protocol configuration information indicates that the second device supports the Browsing function in the AVRCP, determining that the second device is the vehicle-mounted device.
It can also be described that the first device determines whether the second device supports MAP through the protocol configuration information; if the first equipment determines that the second equipment supports the MAP, determining that the second equipment is the vehicle-mounted equipment;
or, the first device determines whether the second device supports the Browsing function in the AVRCP through the protocol configuration information; and the first equipment determines that the second equipment supports the Browsing function in the AVRCP, and then determines that the second equipment is the vehicle-mounted equipment.
The method can also be described as that the first device determines that the protocol support capability of the second device supports the MAP, and then determines that the second device supports the MAP;
or the first device determines that the protocol support capability of the second device supports the Browsing function in the AVRCP, and then determines that the second device is the vehicle-mounted device.
In summary, according to the method for determining a Device type provided in this embodiment, a bluetooth connection between a first Device and a second Device is established, and then the first Device determines a function supported by the second Device through protocol configuration information of the second Device to determine whether the second Device is a vehicle-mounted Device, because the target function is a function supported only by the second Device, when the protocol configuration information of the second Device indicates that the second Device supports the target function, the second Device can be determined to be the vehicle-mounted Device.
There are some scenarios in which the vehicle-mounted device does not support the target function, and in this scenario, the flow of the device type determination method may be as shown in fig. 3, and the device type determination method may be applied to the first device 120. In fig. 3, the method for determining the device type includes:
step 310: a bluetooth connection is established with the second device.
And under the condition that the Bluetooth functions of the first device and the second device are both started, the first device establishes Bluetooth connection with the second device.
Step 320: and acquiring protocol configuration information and IO configuration information of the second device according to the Bluetooth connection.
In the process of determining the device type, the first device communicates with the second device through bluetooth connection, and acquires the protocol configuration information and the IO configuration information from the second device. The protocol configuration information refers to configuration information of a protocol supported by the second device, and the protocol configuration information is used for describing the capability and the characteristic of the second device; the protocol configuration information may also be referred to as "protocol support capability", i.e. a capability provided by a protocol supported by the second device. The IO configuration information is used to describe a function supported by an IO interface of the second device, and may also be referred to as an IO support capability, where the IO support capability is an IO capability supported by the second device.
Illustratively, after the first device and the second device establish the bluetooth connection, the first device and the second device perform information interaction through a transmission frame, wherein the information interaction is the capability information interaction after the bluetooth connection is established between the two bluetooth devices; the method comprises the steps that a first device receives interactive information sent by a second device through a transmission frame, wherein a first designated zone bit of the transmission frame is used for transmitting protocol configuration information of the second device, and a second designated zone bit of the transmission frame is used for transmitting IO configuration information of the second device; the first device obtains the protocol configuration information of the second device from the first designated flag bit, and obtains the IO configuration information of the second device from the second designated flag bit.
Or, the first device receives the interactive information sent by the second device through a transmission frame, where the transmission frame includes a first transmission frame and a second transmission frame, a first designated flag bit of the first transmission frame is used for transmission of protocol configuration information of the second device, and a second designated flag bit of the second transmission frame is used for transmission of IO configuration information of the second device; the first device obtains the protocol configuration information of the second device from the first designated zone bit, and obtains the IO configuration information of the second device from the second designated zone bit.
The information interaction is an information interaction process after the Bluetooth connection specified by the Bluetooth protocol is successful.
In some embodiments, the first device sends first specific information to the second device, the first specific information being an inter-device communication message supported by a target function, the target function being a function supported only by the in-vehicle device; the first equipment receives first feedback information sent by the second equipment, wherein the first feedback information is information fed back to the first equipment by the second equipment aiming at the first specified information; the first device determines that the second device supports the target function in a case where the first feedback information is first specified feedback information, the first specified feedback information being feedback information that matches the first specified information under the target function.
In some embodiments, the first device determines whether the second device supports the target function through the protocol configuration information, and on the premise that the protocol configuration information indicates that the second device does not support the target function, the first device sends second designation information to the second device, where the second designation information is used to determine whether the second device supports a screen Display function (Display); the first device receives second feedback information sent by the second device, wherein the second feedback information is information fed back to the first device by the second device aiming at the second specified information; the first device determines that the second device supports the screen display function in a case where the second feedback information is second specified feedback information, the second feedback information being feedback information that matches the second specified information in a case where the second device supports the screen display function. For example, the second specific information may be information related to IO configuration information, for example, the second specific information may be acquisition information of at least one item of IO configuration information.
In some embodiments, the first device sends third specific information to the second device, the third specific information being an inter-device communication message supported by a Hands Free Profile (HFP); the first device receives third feedback information sent by the second device, wherein the third feedback information is information fed back to the first device by the second device aiming at the third specified information; the first device determines that the second device supports HFP in a case where the third feedback information is third specification feedback information, which is feedback information matched with the third specification information in a case where the second device supports HFP. For example, the third specifying information may be acquisition information of protocol configuration information, and for example, the third execution information may be acquisition information of configuration information of HFP.
It should be noted that, after determining that the second device does not support the target function, the first device may further obtain the IO configuration information from the second device.
Step 330: determining that the second device is the vehicle-mounted device in the case that the protocol configuration information indicates that the second device supports the target function; wherein the target function is a function supported only by the in-vehicle apparatus.
Optionally, the target function comprises at least one of:
supporting a Message Access Profile (MAP);
and supports Browsing (Browsing) function in Audio Video Remote Control Profile (AVRCP).
Illustratively, the first device determines whether the second device supports the MAP through the protocol configuration information; and the first device determines that the second device supports the MAP, and then determines that the second device is the vehicle-mounted device.
Or, the first device judges whether the second device supports the Browsing function in the AVRCP through the protocol configuration information; and the first equipment determines that the second equipment supports the Browsing function in the AVRCP, and then determines that the second equipment is the vehicle-mounted equipment.
Step 340: and on the premise that the protocol configuration information indicates that the second device does not support the target function, determining that the second device supports the screen display function through the IO configuration information and determining that the second device supports the handheld hands-free protocol HFP through the protocol configuration information, and determining that the second device is the vehicle-mounted device.
In some embodiments, the first device determines, by the IO configuration information, whether the second device supports the screen display function, when the protocol configuration information indicates that the second device does not support the target function; under the condition that the IO configuration information indicates that the second device supports the screen display function, judging whether the second device supports HFP (HFP) or not through the protocol configuration information; in a case where the protocol configuration information indicates that the second device supports HFP, it is determined that the second device is an in-vehicle device.
In some embodiments, the first device determines whether the second device supports HFP through the protocol configuration information in case that the protocol configuration information indicates that the second device does not support the target function; under the condition that the protocol configuration information indicates that the second device supports HFP, judging whether the second device supports the screen display function or not through the IO configuration information; in a case where the IO configuration information indicates that the second device supports the screen display function, it is determined that the second device is the in-vehicle device.
In some embodiments, the first device determines whether the second device supports the screen display function through the IO configuration information and determines whether the second device supports HFP through the protocol configuration information, in a case where the protocol configuration information indicates that the second device does not support the target function; in a case where the IO configuration information indicates that the second device supports the screen display function and the protocol configuration information indicates that the second device supports HFP, it is determined that the second device is the in-vehicle device.
Step 350: and under the condition that the protocol configuration information indicates that the second device does not support the target function, determining that the second device does not support the screen display function through the IO configuration information, and determining that the second device is not the vehicle-mounted device.
The first equipment judges whether the second equipment supports the screen display function or not through the IO configuration information under the condition that the protocol configuration information indicates that the second equipment does not support the target function; and under the condition that the IO configuration information indicates that the second device does not support the screen display function, determining that the second device is not the vehicle-mounted device.
In some embodiments, the first device determines whether the second device supports HFP through the protocol configuration information in case that the protocol configuration information indicates that the second device does not support the target function; under the condition that the protocol configuration information indicates that the second device supports HFP, judging whether the second device supports the screen display function or not through the IO configuration information; and under the condition that the IO configuration information indicates that the second device does not support the screen display function, determining that the second device is not the vehicle-mounted device.
In some embodiments, the first device determines whether the second device supports the screen display function through the IO configuration information and determines whether the second device supports HFP through the protocol configuration information, in a case where the protocol configuration information indicates that the second device does not support the target function; in a case where the IO configuration information indicates that the second device does not support the screen display function, and the protocol configuration information indicates that the second device supports or does not support HFP, it is determined that the second device is not the in-vehicle device.
Step 360: in a case where the protocol configuration information indicates that the second device does not support the target function, in a case where it is determined that the second device does not support HFP through the protocol configuration information, it is determined that the second device is not the vehicle-mounted device.
The first device judges whether the second device supports HFP through the protocol configuration information under the condition that the protocol configuration information indicates that the second device does not support the target function; in the case where the protocol configuration information indicates that the second device does not support HFP, it is determined that the second device is not the in-vehicle device.
In some embodiments, the first device determines, by the IO configuration information, whether the second device supports the screen display function, when the protocol configuration information indicates that the second device does not support the target function; under the condition that the IO configuration information indicates that the second device supports the screen display function, judging whether the second device supports HFP (HFP) or not through the protocol configuration information; in the case where the protocol configuration information indicates that the second device does not support HFP, it is determined that the second device is not the in-vehicle device.
In some embodiments, the first device determines whether the second device supports the screen display function through the IO configuration information and determines whether the second device supports HFP through the protocol configuration information, in a case where the protocol configuration information indicates that the second device does not support the target function; in a case where the IO configuration information indicates that the second device supports or does not support the screen display function, and the protocol configuration information indicates that the second device does not support HFP, it is determined that the second device is not the in-vehicle device.
In summary, according to the method for determining the device type provided in this embodiment, when the second device does not support the target function, the first device determines whether the second device is the vehicle-mounted device through the protocol support capability in cooperation with the IO support capability, so that the vehicle-mounted device can be accurately identified, and the vehicle-mounted device is prevented from being mistakenly determined as the non-vehicle-mounted device because the second device does not support the target function.
A design idea of an overall scheme of the method provided in the present application is described, and fig. 4 shows a flowchart of a method for determining a device type according to an exemplary embodiment of the present application. The method for determining the device type may be applied to the first device 120. In fig. 4, the method for determining the device type includes:
step 410: a bluetooth connection is established with the second device.
And under the condition that the Bluetooth functions of the first device and the second device are both started, the first device establishes Bluetooth connection with the second device.
Step 420: and acquiring protocol configuration information and IO configuration information of the second device according to the Bluetooth connection.
After Bluetooth connection is established between first equipment and second equipment, information interaction is carried out between the first equipment and the second equipment according to the Bluetooth protocol, and the first equipment receives information sent by the second equipment through transmission frames; the first device obtains protocol configuration information from the first designated flag bit and obtains IO configuration information from the second designated flag bit. The first designated zone bit is used for transmitting protocol configuration information, and is configured in advance; the second designated flag bit is a flag bit for IO configuration information transmission, and the second designated flag bit is preconfigured.
It should be noted that, in this embodiment of the application, the order in which the first device acquires the protocol configuration information and the IO configuration information is not limited.
Step 430: and judging whether the second equipment supports the target function or not through the protocol configuration information.
The first device performs step 460 if the protocol configuration information indicates that the second device supports the target function; in case the protocol configuration information indicates that the second device does not support the target functionality, step 440 is performed.
Optionally, the target function comprises at least one of a Browsing function in MAP or AVRCP. For example, the first device determines, through the protocol configuration information, whether the second device supports a Browsing function in the MAP or AVRCP; in case the protocol configuration information indicates that the second device supports the Browsing function in the MAP or AVRCP, step 460 is performed; in case the protocol configuration information indicates that the second device does not support the Browsing function in the MAP or AVRCP, step 440 is performed.
Illustratively, the first device obtains the configuration information of the MAP from the first designated flag bit, and executes step 460; or, the first device obtains the configuration information of the Browsing function in the AVRCP from the first designated flag bit, and executes step 460.
The device type is judged through the target function, most vehicle-mounted devices can be efficiently screened out from various types of devices, and if the condition that the protocol support capability supports the target function is met, subsequent judging steps are not needed; if the protocol support capability does not support the target function, step 440 is executed to continue the determination of the device type.
Step 440: and judging whether the second equipment supports the screen display function or not through the IO configuration information.
The first device executes step 450 if the IO configuration information indicates that the second device supports the screen display function; in case the IO configuration information indicates that the second device does not support the screen display function, step 470 is performed.
Illustratively, the first device obtains the configuration information of the screen display function from the second designated flag, and executes step 450.
Because equipment such as bluetooth headset, bluetooth speaker carries on the display screen very seldom, and the mobile unit must carry on the display screen, consequently can read the input/output stream support characteristic of second equipment for get rid of a great deal of common audio equipment.
Step 450: and judging whether the second device supports HFP or not through the protocol configuration information.
The first device performs step 460 if the protocol configuration information indicates that the second device supports HFP; in case the protocol configuration information indicates that the second device does not support HFP, step 470 is performed.
Illustratively, the transmission frame includes a third designated flag, and the first device obtains the configuration information of HFP from the third designated flag, and executes step 460. Illustratively, the flag bit of the HFP configuration information is different from the flag bit of the target function configuration information.
The determination of whether the protocol support capability of the second device supports HFP is mainly used to exclude devices with bluetooth function, such as a television and a tablet, which cannot be screened out in step 440.
Step 460: it is determined that the second device is an in-vehicle device.
The first device determines that the second device is an in-vehicle device.
Step 470: it is determined that the second device is not an in-vehicle device.
The first device determines that the second device is not an in-vehicle device.
In summary, in the method for determining a device type provided in this embodiment, a bluetooth connection between a first device and a second device is established, and then the first device learns the functions supported by the second device through protocol configuration information of the second device, so as to determine whether the second device is a vehicle-mounted device through the functions supported by the second device, when the protocol configuration information of the second device indicates that the second device supports the target function provided by the in-vehicle device, namely, the second Device can be determined to be the vehicle-mounted Device, in this way, the problem that the writing of the Device of Class field on many vehicle-mounted devices is inaccurate, which leads to the inaccuracy of the Device type identified by the Device of Class field, in addition, in the method, all protocol lists and instruction types of the second equipment do not need to be read, and finally, the equipment type of the second equipment can be determined efficiently and accurately under the condition that the power consumption of the first equipment is not increased.
The first device determines whether the second device is the vehicle-mounted device or not through the protocol support capability and the IO support capability under the condition that the second device does not support the target function, so that the vehicle-mounted device can be accurately identified, and the vehicle-mounted device is prevented from being wrongly judged as the non-vehicle-mounted device due to the fact that the second device does not support the target function.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 5 is a block diagram illustrating a device type determining apparatus according to an exemplary embodiment of the present application. The means for determining the type of device may be implemented as all or part of the first device by software, hardware or a combination of both. The device includes:
a connection module 510, configured to establish a bluetooth connection with a second device;
an obtaining module 520, configured to obtain, according to the bluetooth connection, protocol configuration information of a protocol supported by the second device, where the protocol configuration information is used to describe capabilities of the second device;
a determining module 530, configured to determine that the second device is an in-vehicle device if the protocol configuration information indicates that the second device supports the target function; wherein the target function is a function supported only by the in-vehicle apparatus.
In some embodiments, the obtaining module 520 is configured to obtain the protocol configuration information of the second device related to the inter-device communication according to the bluetooth connection.
In some embodiments, the target function includes at least one of:
supporting a device information exchange protocol (MAP);
and supporting the browsing function in the audio video remote control protocol AVRCP.
In some embodiments of the present invention, the,
the obtaining module 520 is further configured to obtain IO configuration information of the second device according to the bluetooth connection, where the IO configuration information is used to describe a function supported by an IO interface of the second device;
the determining module 530 is further configured to determine that the second device supports the screen display function through the IO configuration information and determine that the second device supports the handsfree protocol HFP through the protocol configuration information, and determine that the second device is the in-vehicle device, in a case where the protocol configuration information indicates that the second device does not support the target function.
In some embodiments of the present invention, the,
the obtaining module 520 is further configured to obtain IO configuration information of the second device according to the bluetooth connection, where the IO configuration information is used to describe a function supported by an IO interface of the second device;
the determining module 530 is further configured to determine, through the IO configuration information, that the second device does not support the screen display function and determine that the second device is not a vehicle-mounted device, when the protocol configuration information indicates that the second device does not support the target function.
In some embodiments of the present invention, the,
the obtaining module 520 is further configured to obtain IO configuration information of the second device according to the bluetooth connection, where the IO configuration information is used to describe a function supported by an IO interface of the second device;
the determining module 530 is further configured to determine that the second device does not support HFP through the protocol configuration information and determine that the second device is not the vehicle-mounted device if the protocol configuration information indicates that the second device does not support the target function.
In summary, the apparatus for determining a device type provided in this embodiment establishes a bluetooth connection between a first device and a second device, and then learns the functions supported by the second device through protocol configuration information of the second device, so as to determine whether the second device is a vehicle-mounted device through the functions supported by the second device, when the protocol configuration information of the second device indicates that the second device supports the target function provided by the in-vehicle device, namely, the second Device can be determined as the vehicle-mounted Device, so that the problem that the writing of the Device of Class field on many vehicle-mounted devices is inaccurate, which causes the inaccuracy of the Device type identified by the Device of Class field can be avoided, and all protocol lists and instruction types of the second equipment do not need to be read, and finally the equipment type of the second equipment can be determined efficiently and accurately under the condition that the power consumption of the first equipment is not increased.
The device determines whether the second equipment is the vehicle-mounted equipment or not through the protocol support capability and the IO support capability under the condition that the second equipment does not support the target function, can accurately identify the vehicle-mounted equipment, and avoids that the vehicle-mounted equipment is wrongly judged as the non-vehicle-mounted equipment because the second equipment does not support the target function.
Fig. 6 shows a schematic structural diagram of a computer device provided in an exemplary embodiment of the present application. The computer device may be a device which performs the method of determining a device type as provided herein, and the computer device may be a terminal. Specifically, the method comprises the following steps:
the computer apparatus 600 includes a Central Processing Unit (CPU) 601, a system Memory 604 including a Random Access Memory (RAM) 602 and a Read Only Memory (ROM) 603, and a system bus 605 connecting the system Memory 604 and the Central Processing Unit 601. The computer device 600 also includes a basic Input/Output System (I/O System)606 for facilitating information transfer between devices within the computer, and a mass storage device 607 for storing an operating System 613, application programs 614, and other program modules 615.
The basic input/output system 606 includes a display 608 for displaying information and an input device 609 such as a mouse, keyboard, etc. for user input of information. Wherein a display 608 and an input device 609 are connected to the central processing unit 601 through an input output controller 610 connected to the system bus 605. The basic input/output system 606 may also include an input/output controller 610 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input/output controller 610 may also provide output to a display screen, a printer, or other type of output device.
The mass storage device 607 is connected to the central processing unit 601 through a mass storage controller (not shown) connected to the system bus 605. The mass storage device 607 and its associated computer-readable media provide non-volatile storage for the computer device 600. That is, mass storage device 607 may include a computer-readable medium (not shown) such as a hard disk or Compact Disc Read Only Memory (CD-ROM) drive.
Computer-readable media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash Memory or other Solid State Memory technology, CD-ROM, Digital Versatile Disks (DVD), or Solid State Drives (SSD), other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage, or other magnetic storage devices. The Random Access Memory may include a resistive Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM). Of course, those skilled in the art will appreciate that computer storage media is not limited to the foregoing. The system memory 604 and mass storage device 607 described above may be collectively referred to as memory.
According to various embodiments of the present application, the computer device 600 may also operate as a remote computer connected to a network through a network, such as the Internet. That is, the computer device 600 may be connected to the network 612 through the network interface unit 611 connected to the system bus 605, or may be connected to other types of networks or remote computer systems (not shown) using the network interface unit 611.
The memory further includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.
In an alternative embodiment, a computer device is provided that includes a processor and a memory having at least one instruction, at least one program, set of codes, or set of instructions stored therein, which is loaded and executed by the processor to implement the method of determining a device type as described above.
In an alternative embodiment, a computer readable storage medium is provided having stored therein at least one instruction, at least one program, set of codes, or set of instructions that is loaded and executed by a processor to perform a method of device type determination as described above.
Optionally, the computer-readable storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a Solid State Drive (SSD), or an optical disc. The Random Access Memory may include a resistive Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM). The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The embodiment of the present application further provides a computer-readable medium, which stores at least one instruction, where the at least one instruction is loaded and executed by the processor to implement the method for determining a device type according to the above embodiments.
It should be noted that: in the device type determining apparatus provided in the foregoing embodiment, when the device type determining method is executed, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for determining a device type and the method for determining a device type provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the implementation of the present application and is not intended to limit the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (14)

1. A method for determining a device type, applied to a first device, includes:
establishing a Bluetooth connection with a second device;
acquiring protocol configuration information of a protocol supported by the second device according to the Bluetooth connection, wherein the protocol configuration information is used for describing the capability of the second device;
determining that the second device is an in-vehicle device if the protocol configuration information indicates that the second device supports a target function; wherein the target function is a function supported only by the in-vehicle apparatus.
2. The method of claim 1, wherein the obtaining protocol configuration information of a protocol supported by the second device according to the bluetooth connection comprises:
and acquiring the protocol configuration information of the second equipment related to the communication between the equipment according to the Bluetooth connection.
3. The method of claim 2, wherein the target function comprises at least one of:
supporting a device information exchange protocol (MAP);
and supporting the browsing function in the audio video remote control protocol AVRCP.
4. The method of any of claims 1 to 3, further comprising:
acquiring input/output (IO) configuration information of the second device according to the Bluetooth connection, wherein the IO configuration information is used for describing functions supported by an IO interface of the second device;
and under the condition that the protocol configuration information indicates that the second device does not support the target function, determining that the second device supports the screen display function through the IO configuration information, determining that the second device supports the hand-held handsfree protocol HFP through the protocol configuration information, and determining that the second device is the vehicle-mounted device.
5. The method of any of claims 1 to 3, further comprising:
obtaining IO configuration information of the second device according to the Bluetooth connection, wherein the IO configuration information is used for describing functions supported by an IO interface of the second device;
and under the condition that the protocol configuration information indicates that the second device does not support the target function, determining that the second device does not support the screen display function through the IO configuration information, and determining that the second device is not the vehicle-mounted device.
6. The method of any of claims 1 to 3, further comprising:
obtaining IO configuration information of the second device according to the Bluetooth connection, wherein the IO configuration information is used for describing functions supported by an IO interface of the second device;
and determining that the second device does not support HFP through the protocol configuration information and determining that the second device is not the vehicle-mounted device, in the case that the protocol configuration information indicates that the second device does not support the target function.
7. An apparatus for determining a device type, the apparatus comprising:
the connection module is used for establishing Bluetooth connection with the second equipment;
the acquisition module is used for acquiring protocol configuration information of a protocol supported by the second equipment according to the Bluetooth connection, wherein the protocol configuration information is used for describing the capability of the second equipment;
a determining module, configured to determine that the second device is an in-vehicle device if the protocol configuration information indicates that the second device supports a target function; wherein the target function is a function supported only by the in-vehicle apparatus.
8. The apparatus of claim 7,
the acquisition module is used for acquiring the protocol configuration information of the second device related to the inter-device communication according to the Bluetooth connection.
9. The apparatus of claim 8, wherein the target function comprises at least one of:
supporting a device information exchange protocol (MAP);
and supporting the browsing function in the audio video remote control protocol AVRCP.
10. The apparatus according to any one of claims 7 to 9,
the obtaining module is further configured to obtain IO configuration information of the second device according to the bluetooth connection, where the IO configuration information is used to describe a function supported by an IO interface of the second device;
the determining module is further configured to determine, through the IO configuration information, that the second device supports a screen display function and determine, through the protocol configuration information, that the second device supports a hands-free protocol HFP, and determine that the second device is the in-vehicle device, when the protocol configuration information indicates that the second device does not support the target function.
11. The apparatus according to any one of claims 7 to 9,
the obtaining module is further configured to obtain IO configuration information of the second device according to the bluetooth connection, where the IO configuration information is used to describe a function supported by an IO interface of the second device;
the determining module is further configured to determine, through the IO configuration information, that the second device does not support a screen display function and determine that the second device is not the vehicle-mounted device, when the protocol configuration information indicates that the second device does not support the target function.
12. The apparatus according to any one of claims 7 to 9,
the obtaining module is further configured to obtain IO configuration information of the second device according to the bluetooth connection, where the IO configuration information is used to describe a function supported by an IO interface of the second device;
the determining module is further configured to determine, by the protocol configuration information, that the second device does not support HFP and determine that the second device is not the vehicle-mounted device, when the protocol configuration information indicates that the second device does not support the target function.
13. A terminal, characterized in that the terminal comprises a processor, a memory connected to the processor, and program instructions stored on the memory, which when executed by the processor implement the method for determining the type of device according to any one of claims 1 to 6.
14. A computer readable storage medium having stored thereon program instructions which, when executed by a processor, implement a method of determining a device type as claimed in any one of claims 1 to 6.
CN202110932468.4A 2021-08-13 2021-08-13 Method, device, equipment and storage medium for determining equipment type Pending CN113660636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110932468.4A CN113660636A (en) 2021-08-13 2021-08-13 Method, device, equipment and storage medium for determining equipment type

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110932468.4A CN113660636A (en) 2021-08-13 2021-08-13 Method, device, equipment and storage medium for determining equipment type

Publications (1)

Publication Number Publication Date
CN113660636A true CN113660636A (en) 2021-11-16

Family

ID=78491600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110932468.4A Pending CN113660636A (en) 2021-08-13 2021-08-13 Method, device, equipment and storage medium for determining equipment type

Country Status (1)

Country Link
CN (1) CN113660636A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123730A (en) * 2006-07-28 2008-02-13 三星电子株式会社 Apparatus and method for transmitting moving picture stream using bluetooth
US20170060260A1 (en) * 2015-08-28 2017-03-02 Xiaomi Inc. Method and device for connecting external equipment
CN107770760A (en) * 2017-10-18 2018-03-06 维沃移动通信有限公司 A kind of method and mobile terminal of the type for identifying bluetooth equipment
CN110784846A (en) * 2019-10-10 2020-02-11 RealMe重庆移动通信有限公司 Vehicle-mounted Bluetooth device identification method and device, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123730A (en) * 2006-07-28 2008-02-13 三星电子株式会社 Apparatus and method for transmitting moving picture stream using bluetooth
US20170060260A1 (en) * 2015-08-28 2017-03-02 Xiaomi Inc. Method and device for connecting external equipment
CN107770760A (en) * 2017-10-18 2018-03-06 维沃移动通信有限公司 A kind of method and mobile terminal of the type for identifying bluetooth equipment
CN110784846A (en) * 2019-10-10 2020-02-11 RealMe重庆移动通信有限公司 Vehicle-mounted Bluetooth device identification method and device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
US11086596B2 (en) Electronic device, server and control method thereof
KR101777984B1 (en) Method and device for displaying wifi list
KR101807286B1 (en) Method and apparatus for performing function in mobile terminal using short range communication
JP2018515818A5 (en)
CN105487389A (en) Method and device for controlling intelligent equipment
US20150242381A1 (en) Data transition processing method and electronic device supporting the same
US11157231B2 (en) Method and apparatus for controlling sound signal output
CN104853336A (en) Method for discovering intelligent equipment, method for accessing to internet and devices thereof
CN105163366A (en) Wireless network connection method and device
CN110493729B (en) Interaction method and device of augmented reality device and storage medium
CN104156284A (en) File backup method and device
CN110855534B (en) Method and apparatus for searching and controlling controllee in smart home system
CN105575086A (en) Display apparatus, controlling method and display system
CN105677338A (en) Application program display method and device
CN110555155B (en) Article information recommendation method, device and storage medium
CN106416126B (en) Robot for controlling intelligent equipment and intelligent equipment control system based on robot
CN107483993B (en) Voice input method of television, television and computer readable storage medium
CN105636238A (en) Wireless fidelity WiFi connection control method and device
US20200272678A1 (en) Electronic device and method for obtaining content information based on connected external device
CN113660636A (en) Method, device, equipment and storage medium for determining equipment type
WO2021139592A1 (en) Method and device for information processing, and computer storage medium
CN104156387A (en) Display method and device
KR102404364B1 (en) Electronic apparatus paired with external electronic apparatus and control method thereof
CN104869538A (en) Positioning method and positioning apparatus
CN114187897A (en) User intention identification method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination