Information processing method and related device

By adjusting the pattern of Bluetooth keyboard and mouse to match the type of target device, the problem that existing Bluetooth keyboard and mouse cannot meet user needs in multi-host application scenarios is solved, achieving higher function matching and flexibility in use.

CN119946910APending Publication Date: 2025-05-06LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510018882.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-05-06

Smart Images

  • Figure CN119946910A_ABST
    Figure CN119946910A_ABST
Patent Text Reader

Abstract

The invention discloses an information processing method and a related device, and relates to the technical field of information, and the method comprises the steps: obtaining the equipment information of target equipment; the mode of the input device is adjusted according to the device information, in different modes, for the same triggering operation, information of signals output by the input device is different, and the signals output by the input device are used for making the target device respond to the corresponding information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to an information processing method and related devices. Background Art

[0002] As important components of modern wireless peripherals, Bluetooth keyboards and Bluetooth mice can be wirelessly connected to electronic devices through Bluetooth technology, providing users with a flexible and convenient user experience.

[0003] In order to meet the user's multi-host application scenarios, the same Bluetooth keyboard and mouse can be switched back and forth between different hosts.

[0004] However, when the existing Bluetooth keyboard and mouse are connected to different hosts, the button functions are fixed, and some functions are not highly compatible with a certain host, resulting in failure to meet the user's usage needs. Summary of the invention

[0005] The first aspect of the present application provides an information processing method, comprising:

[0006] Get the device information of the target device;

[0007] The input device mode is adjusted according to the device information. In different modes, for the same trigger operation, the information of the signal output by the input device is different. The signal output by the input device is used to make the target device respond to the corresponding information.

[0008] In a possible implementation, adjusting the input device mode according to the device information includes:

[0009] Based on the device information, determining a device type of the target device;

[0010] Determining a target mode corresponding to the input device according to the device type of the target device;

[0011] Based on the function information pre-configured for each key in the input device in the target mode, target function information corresponding to the key operation is obtained.

[0012] In a possible implementation, the method further includes:

[0013] Based on the name of the target device also included in the device information, the name is parsed to obtain the target device type to which the target device belongs;

[0014] Based on the target device type being consistent with the device type of the target device, the step of determining the target mode corresponding to the input device according to the device type of the target device is triggered.

[0015] In a possible implementation, obtaining device information of the target device includes at least one of the following:

[0016] Obtaining connection information for establishing a connection between a target device and an input device, so as to determine device information of the target device based on the connection information; or

[0017] Based on a connection channel with a target device, device information of the target device is received.

[0018] In a possible implementation, receiving the device information of the target device based on the connection channel with the target device includes at least one of the following:

[0019] Obtaining a device type code of the target device of the target switching through a connection channel with the target device; or

[0020] A first signal is received through a connection channel with a target device, wherein the first signal indicates that the target device switches its device type; and a current device type code of the target device is determined based on the first signal.

[0021] In a possible implementation, obtaining connection information for establishing a connection between a target device and an input device to determine device information of the target device based on the connection information includes:

[0022] Based on the received switching instruction, determining connection information of a target device for the target switching;

[0023] When requesting the target device to establish a connection according to the connection information, device information fed back by the target device is received.

[0024] In a possible implementation, obtaining connection information for establishing a connection between a target device and an input device to determine device information of the target device based on the connection information includes:

[0025] Based on the received switching instruction, determining a target device for the target switching in the historical connection information, wherein the historical connection information includes device information of each device that has established a connection with the input device;

[0026] In the historical connection information, device information of a target device for target switching is determined, and the historical connection information includes the device information.

[0027] In a possible implementation, determining the target device for target switching in the historical connection information based on receiving the switching instruction includes:

[0028] Parsing the switching instruction and determining the key corresponding to the switching instruction;

[0029] Based on a preset correspondence between the button and the device, a target device corresponding to the switching instruction is determined in the historical connection information.

[0030] In a possible implementation, the method further includes:

[0031] Based on receiving a trigger operation, determining information corresponding to the trigger operation according to the mode of the input device;

[0032] The trigger operation includes triggering any button in the input device and triggering adjustment of the posture of the input device. When the input device is in different postures, the relative position relationship between the first body and the second body of the input device is different.

[0033] A second aspect of the present application provides an information processing device, including:

[0034] An acquisition module, used to obtain device information of a target device;

[0035] The adjustment module is used to adjust the input device mode according to the device information. In different modes, for the same trigger operation, the information of the signal output by the input device is different, and the signal output by the input device is used to make the target device respond to the corresponding information.

[0036] A third aspect of the present application provides a computer program product, comprising computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the information processing method of the first aspect or any implementation manner of the first aspect.

[0037] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0038] The memory is used to store computer programs;

[0039] The processor is used to execute the computer program so that the electronic device can implement the information processing method of the first aspect or any implementation manner of the first aspect.

[0040] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the information processing method of the first aspect or any implementation method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0042] Figure 1It is a flowchart of an information processing method provided by an embodiment of the present application;

[0043] Figure 2 is a flowchart of adjusting the input device mode according to the device information provided by an embodiment of the present application;

[0044] Figure 3 is a schematic diagram of a device type change of an electronic device provided in an embodiment of the present application;

[0045] Figure 4 is a schematic diagram of a device type change of an electronic device provided in an embodiment of the present application;

[0046] Figure 5 is a flowchart of obtaining connection information for establishing a connection between a target device and an input device, and determining device information of the target device based on the connection information, provided by an embodiment of the present application;

[0047] Figure 6 is a flowchart of obtaining connection information for establishing a connection between a target device and an input device, and determining device information of the target device based on the connection information, provided by an embodiment of the present application;

[0048] Figure 7 It is a flowchart of determining a target device for target switching in historical connection information based on receiving a switching instruction provided by an embodiment of the present application;

[0049] Figure 8 is a structural diagram of an input device provided in an embodiment of the present application;

[0050] Fig. 9 It is a structural diagram of an information processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0052] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0053] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0054] Reference Figure 1 , Figure 1 is a flow chart of an information processing method provided in an embodiment of the present application, and the information processing method is applied to an input device, such as Figure 1 As shown, an information processing method provided by an embodiment of the present application may include steps 101 to 102, and these steps are described in detail below.

[0055] 101. Obtain device information of the target device;

[0056] The target device is used in conjunction with an input device, and the two are connected wirelessly. After being connected to the input device, the target device can respond to a signal from the input device; and can also disconnect from the input device.

[0057] In a possible implementation, the target device and the input device may be connected via Bluetooth.

[0058] The timing for obtaining the device information of the target device may be when the input device is started and a connection is established with the target device; or when the device connected to the input device is switched from one device to another, and the target switched device is the target device.

[0059] The device information is information used to distinguish the target device from other devices, and the device information can affect the mode of the input device so that the input device is adjusted to a mode matching the target device.

[0060] 102. Adjust the input device mode according to the device information. In different modes, for the same trigger operation, the information of the signal output by the input device is different. The signal output by the input device is used to make the target device respond to the corresponding information.

[0061] Wherein, the input device mode is adjusted according to the device information of the target device.

[0062] Among them, the input device includes at least two modes, such as mobile phone mode and computer mode. The computer mode can be divided into more types, which will be explained in detail in subsequent embodiments and will not be described in detail in this embodiment.

[0063] Among them, in different modes, the input device outputs different information of the signal for the same trigger operation.

[0064] In a possible implementation, in the input device, for each mode of the input device, a set of information corresponding to when a key is triggered is set, and the information may be the key value of the key in the mode. Moreover, each mode of the input device is related to the device type of the target device to which it is connected.

[0065] As an example, the input device is a mouse, and the operation of scrolling up is triggered. In mobile phone mode, the signal output by the mouse is no corresponding information, and in computer mode, the information corresponding to the signal output by the mouse is scrolling up.

[0066] Among them, the trigger operation can be the triggering of an input button in the input device, or the posture adjustment of the input device. The specific process of determining the information corresponding to the trigger operation in different modes will be described in detail in subsequent embodiments, which will not be described in detail in this embodiment.

[0067] In a possible implementation, the device type can be determined based on the device information, and then the target mode of the target device can be determined, so as to adopt the function information of each key corresponding to the target mode, and then Figure 2 The process of adjusting the input device mode based on device information is described in detail in .

[0068] In this embodiment, the device information of the target device is obtained; the input device mode is adjusted according to the device information. In different modes, for the same trigger operation, the information of the signal output by the input device is different. The signal output by the input device is used to make the target device respond to the corresponding information. The input device can set different modes for different target devices. In different modes, the same trigger operation can achieve different functions, which is more compatible with the target device and meets the user's usage needs.

[0069] Figure 2 It is a flowchart of adjusting the input device mode according to the device information provided by an embodiment of the present application, which may include steps 201 to 203, and these steps are described in detail below.

[0070] 201. Determine a device type of the target device based on the device information;

[0071] The device information may be an AP (Appearance Category) in a GAP (Generic Access Profile) of the target device.

[0072] The device information may carry relevant information representing the device type of the target device, and different device types correspond to different device information.

[0073] The device type may include: a mobile phone, a computer, etc. The computer type may be divided into more detailed types, such as an all-in-one computer, a tablet, a generic computer, a laptop, etc.

[0074] As an example, bits 15 to 6 in the AP of the device's GPA are represented by different numerical values ​​for mobile phones and computers, respectively.

[0075] For example, 0×001 represents a mobile phone, and 0×002 represents a computer.

[0076] In order to further refine the classification of computer types, different values ​​are set in the 5th to 0th digits of the AP of the device's GPA to represent different types of computers.

[0077] For example, 0×01 represents a generic computer, 0×02 represents a desktop workstation, 0×03 represents a laptop, and so on.

[0078] In a possible implementation, the method further includes: based on the name of the target device also included in the device information, parsing the name to obtain a target device type to which the target device belongs; and triggering step 202 based on the target device type being consistent with the device type of the target device.

[0079] The device information may also include the name of the target device, and the device type to which the target device belongs may be determined by parsing the name.

[0080] In a possible implementation, the name of the target device may contain a specific word. For example, the specific word can represent the type of device. Then, by parsing the name of the target device, the type of device to which the target device belongs can be obtained.

[0081] The name may include Chinese or English names such as computer, mobile phone, tablet, phone, tablet, etc., and the target device type to which the target device belongs may be determined by parsing the name of the target device.

[0082] As an example, the name of the target device is "my phone", and parsing the name can determine that the type of the target device is "phone".

[0083] In a possible implementation, during the pairing connection process, the input device discovers the Device Information Service under the GATT (Generic Attribute Profile) Server of the target device, and can obtain the name of the target device in this way.

[0084] Of course, if the target device name is parsed and the target device type to which the target device belongs is not obtained, the result of parsing the target device name can be ignored, and the device type obtained by parsing the AP in the GAP of the target device is further executed in the subsequent 202.

[0085] The process of parsing the name of the target device to determine the type of device to which it belongs is to verify the device type determined based on the AP of the GAP in the device information.

[0086] In a possible implementation, if the target device name is parsed and the target device type to which the target device belongs is inconsistent with the device type of the aforementioned target device, a prompt may be given to allow the user to select the device type to which the target device belongs.

[0087] 202. Determine a target mode corresponding to the input device according to the device type of the target device;

[0088] Wherein, different modes are set in the input device for different device types.

[0089] Among them, a plurality of modes are pre-set in the input device, and after the device type of the target device is determined, the target mode corresponding to the device type is determined.

[0090] In different modes, corresponding function information is configured for each button in the input device.

[0091] As an example, when the left button of the mouse is triggered, in one mode, the entire page content may be selected, and in another mode, the page may be turned up.

[0092] As an example, when a command in the keyboard is triggered, in one mode, it may be used as a shortcut key in combination with other keys, but in another mode, it may not respond to the shortcut.

[0093] 203. Based on the function information pre-configured for each key in the input device in the target mode, obtain target function information corresponding to the key operation.

[0094] Among them, various functional information is pre-configured for each key in the input device, and the functional information corresponds to the device type of the target device connected to the input device.

[0095] Therefore, after determining the device type of the target device, the corresponding target function information is determined in the pre-configured multiple function information, so that when the input device subsequently receives an operation on its key trigger point, it responds based on the target function information and generates corresponding instructions to send to the target device.

[0096] In this embodiment, based on the device information, the device type of the target device is determined; based on the device type of the target device, the target mode corresponding to the input device is determined; based on the target mode, the function information pre-configured for each button in the input device is obtained to obtain the target function information corresponding to the button operation, thereby utilizing the device type of the target device to adjust the function information of each button in the input device to select the function information that matches the device type of the target device, thereby achieving a higher degree of match with the target device.

[0097] In a possible implementation, obtaining device information of the target device includes at least one of the following:

[0098] (1) obtaining connection information for establishing a connection between the target device and the input device, so as to determine device information of the target device based on the connection information;

[0099] When the target device is connected to the input device, information required for the connection is transmitted between the two, and the target device sends the connection information to the input device.

[0100] The connection information may include the device information of the target device, and the connection information may also be used to request the device information from the target device.

[0101] The connection between the target device and the input device may be the first connection or a non-first connection.

[0102] When the input device is connected to the target device for the first time, the target device can broadcast a signal as an active device, and the broadcast signal is used as connection information. The connection information can carry its device information, and the input device and the target device establish a connection through the connection information.

[0103] In a possible implementation, based on receiving the switching instruction, the connection information of the target device can be determined, and then the connection information is used to connect to the target device to obtain the device information of the target device. Figure 5 This process is described in detail in .

[0104] In a possible implementation, when an input device is connected to a target device and then disconnected, the input device may record a whitelist of target devices, and the whitelist may record historical connection information, which is information about devices that have been connected to the input device. When the input device switches to connect to the target device again through a switching action performed on the input device, the connection information of the target device may be obtained from the historical connection information stored in the whitelist. Figure 6 This process is described in detail in .

[0105] In a possible implementation, the corresponding target device may be determined based on the received switching instruction, and then the device type code of the target device may be determined. Figure 7 This process is described in detail in .

[0106] (ii) receiving device information of the target device based on a connection channel with the target device.

[0107] The target device may switch device types, such as switching from a tablet (also known as a handheld computer, tablet) to a laptop.

[0108] In a possible implementation, an electronic device can switch between different device types through a function key provided thereon. For example, a key is preset and a user switches between a tablet and a notebook by triggering the key.

[0109] Among them, the tablet uses the Android system and the notebook uses the Windows system. They are the same device, so its device ID information remains unchanged, but the device type code changes.

[0110] Figure 3 is a schematic diagram of a device type change of an electronic device provided in an embodiment of the present application, Figure 3 (a) is a schematic diagram of an electronic device used as a tablet. When the electronic device is used as a tablet, the Android system is used. Figure 3 (b) is a schematic diagram of the electronic device as a notebook. When the electronic device is used as a notebook, the Windows system is used. The icon arrangement and interaction methods on the desktop are different in the two systems.

[0111] In a possible implementation, a notebook device with dual systems can be connected to a keyboard via a USB (Universal Serial Bus) wire. When the notebook device is connected to the keyboard via the USB wire, the Windows system is in the foreground running state and the Android system is in the background running state; when the notebook device disconnects the keyboard connected to the USB wire, the Windows system switches to the background running state and the Android system switches to the foreground running state. The notebook device realizes the switching of the foreground and background of the two systems by plugging and unplugging the external keyboard.

[0112] In this implementation, the input device may be a mouse or a touch pad, which cooperates with the external keyboard as a peripheral of the dual-system notebook device.

[0113] When the system in the foreground running state of the notebook device changes, its device type changes. For the same device, by plugging in and out the external keyboard, its device ID information remains unchanged, but the device type code changes.

[0114] Figure 4 is a schematic diagram of a device type change of an electronic device provided in an embodiment of the present application, Figure 4 (a) is a schematic diagram of a notebook device 401 with dual systems connected to an external keyboard 402, and the desktop of the electronic device is an interface of the Windows system. Figure 4 (b) is a schematic diagram of the notebook device when it is disconnected from the external keyboard. The desktop of the electronic device is an interface of the Android system. The icon arrangement and interaction methods on the desktop of the two systems are different.

[0115] Correspondingly, after switching the device type, the target device sends device information to the input device through the connection channel with the input device to inform the input device of the change in device type.

[0116] When the target device switches the device type, it maintains the connection with the input device, and only changes the device type of the target device itself. Accordingly, the device type code of the target device changes.

[0117] When the target device switches the device type, the device name of the target device may also be changed. The specific content that is changed when the target device switches the device type may be set according to actual conditions.

[0118] In a possible implementation, receiving device information of the target device based on a connection channel with the target device includes at least one of the following:

[0119] (1) Obtaining a device type code of the target device to be switched through a connection channel with the target device;

[0120] When the target device switches the device type, based on the connection channel maintained between the target device and the input device, the target device sends new device information to the input device, where the device information includes a device type code.

[0121] The connection channel may be a Bluetooth transmission channel between the target device and the input device.

[0122] As an example, the target device is switched from a tablet to a laptop. The target device sends device information to the input device based on the connection channel between the target device and the input device. The device information includes a device type code of the laptop.

[0123] (2) receiving a first signal through a connection channel with the target device, the first signal indicating that the target device has switched to a different device type; and determining a current device type code of the target device based on the first signal.

[0124] When the target device switches the device type, based on the connection channel maintained between the target device and the input device, the target device sends a first signal to the input device, and the first signal is used to inform the input device of the switched device type.

[0125] The first information can represent the device type of the target device.

[0126] Among them, the first information may be a representation that the target device has switched the device type, for example, a device type switch has been performed. Accordingly, the input device can determine the device type code after the switch based on the previous device type of the target device and the preset switching order, and then subsequently use the device type code to determine the corresponding device type.

[0127] Subsequently, the input device obtains the target function information corresponding to the device type of the target device for the corresponding device type, thereby realizing that the input device can have different function information for the same physical device.

[0128] The connection channel may be a Bluetooth transmission channel between the target device and the input device.

[0129] As an example, the target device switches from a tablet to a laptop. The target device sends a first information to the input device based on the connection channel between the target device and the input device. The device information indicates that a device type switch has occurred. Accordingly, the input device determines the device type code after the switch based on the device type of the target device before the switch and a preset switching sequence, and then subsequently uses the device type code to determine the corresponding device type.

[0130] In this embodiment, obtaining the device information of the target device can be obtaining connection information for establishing a connection between the target device and the input device to determine the device information of the target device based on the connection information; or it can be receiving the device information of the target device based on the connection channel with the target device, thereby realizing switching between different physical devices and switching between different types of the same physical device, and realizing the ability to set different modes for target devices of different device types, thereby achieving a higher degree of match with the target device and satisfying the user's usage needs.

[0131] Figure 5 This is a flowchart for obtaining connection information for establishing a connection between a target device and an input device, and determining device information of the target device based on the connection information, provided by an embodiment of the present application. It may include steps 501 to 502, and these steps are described in detail below.

[0132] 501. Determine connection information of a target device for target switching based on a received switching instruction;

[0133] There may be multiple electronic devices at the site where the input device is located, and all of the multiple electronic devices can serve as target devices connected to the input device.

[0134] Wherein, a switching button (physical button or virtual button) is set in the input device, and a switching instruction is generated by triggering the switching button.

[0135] Among them, a switch button can be set in the input device, and a switch is triggered by triggering the switch button; multiple switch buttons can be set in the input device, and switching to a specific electronic device is triggered by triggering the switch button.

[0136] The input device may store connection information of various electronic devices that it has been connected to, and after receiving the switching instruction, the input device determines the connection information of the target device to be switched to this time. Through the connection information, the input device can establish a connection with the target device.

[0137] In a possible implementation, the connection information may include information such as an address of a corresponding electronic device. After determining the connection information of the target device, the input device actively requests to establish a connection with the target device using the address in the connection information.

[0138] In a possible implementation, when a switch button is triggered in an electronic device to trigger a switch, the input device can receive a connection signal sent by each device in the environment. The device that sends the connection signal may or may not have established a connection with the input device. The input device can determine one of them as the target device for the target switch based on the connection signal.

[0139] Among the connection signals sent by the devices, the connection information of a certain device carries a matching instruction. Based on the matching instruction, the input device can send a connection request message / connection confirmation message to the device to achieve connection with the device.

[0140] 502. When requesting the target device to establish a connection according to the connection information, receive device information fed back by the target device.

[0141] The input device sends a request to the target device according to the connection information, and the target device feeds back device information to establish a connection between the target device and the input device.

[0142] After receiving the device information fed back by the target device, the input device analyzes the device information to obtain the device type code of the target device, and then uses the device type code to determine the target mode of the input device to interact with the target device using the target mode.

[0143] In this embodiment, by inputting a switching operation on the input device, the input device generates a switching instruction, and based on the switching instruction, determines the connection information of the target device for the target switching, and then receives the device information fed back by the target device when requesting to establish a connection with the target device according to the connection information, thereby realizing a switching operation based on the input device side, switching the electronic device connected to the input device, and obtaining the device information of the target device, so as to subsequently determine the device type of the target device, provide the target device with a matching mode, and ensure a higher matching degree with the target device.

[0144] Figure 6 It is a flowchart provided by an embodiment of the present application for obtaining connection information for establishing a connection between a target device and an input device to determine the device information of the target device based on the connection information, which may include steps 601 to 602, and these steps are described in detail below.

[0145] 601. Based on the received switching instruction, determine a target device for the target switching in the historical connection information, where the historical connection information includes device information of each device that has established a connection with the input device;

[0146] The input device contains historical connection information of various devices with which it has established connections.

[0147] In a possible implementation, the devices may be sorted according to the connection time between each device and the input device, in order from far to near, and the connection information of each device may be recorded to obtain a historical connection information list.

[0148] In a possible implementation, the devices may be sorted according to the types of the devices and in a set type order, and the connection information to the devices may be recorded to obtain a historical connection information list.

[0149] After receiving the switching instruction, according to the switching instruction, a target device corresponding to the switching instruction is determined in the list of historical connection information.

[0150] In a possible implementation, the historical connection information list may be used as a white list of the input device, and after receiving a switching instruction, a target device for the target switching is determined in the white list.

[0151] In a possible implementation, the list of historical connection information includes a plurality of previously connected devices, and the target device for this target switching is determined according to the order of the historical connection information in the list of historical connection information.

[0152] The historical connection information may include a device identifier and a device type code, etc. The device identifier is used to represent the identity information of the device, and the device type code is used to represent the type of the device.

[0153] In a possible implementation, the list of historical connection information may include the connection time, device identification, and device type code of each device.

[0154] 602. Determine device information of a target device for target switching in the historical connection information, wherein the historical connection information includes the device information.

[0155] After the target device is determined, the device information of the target device is determined in the historical connection information.

[0156] The historical connection information of each device includes its device information, specifically including the device identification and device type code of the device. After the target device is determined, its device information is determined in the historical connection information of the target device.

[0157] In a possible implementation, the target device of the target switching may be searched in the historical connection information list by looking up a table, and then the device information of the target device may be searched in the remaining items of the historical connection information list.

[0158] In this embodiment, after receiving the switching instruction, the target device for the target switching is determined in the historical connection information of the input device, and the historical connection information includes the device information of each device that has established a connection with the input device; in the historical connection information, the device information of the target device for the target switching is determined, and the historical connection information includes the device information, so that after receiving the switching instruction, the input device determines one as the target device among the devices with which it has established a connection, and determines the device information of the target device in the historical connection information, which provides a basis for providing a matching mode for the target device after subsequently connecting to the target device.

[0159] Figure 7 This is a flowchart of determining a target device for target switching in historical connection information based on receiving a switching instruction provided by an embodiment of the present application, which may include steps 701 to 702, and these steps are described in detail below.

[0160] 701. Analyze the switching instruction and determine the key corresponding to the switching instruction;

[0161] The key may be a key combination or a single key.

[0162] In a possible implementation, the switch instruction corresponds to a key (including a key combination or a single key), which may be used only to trigger a switch once and is not targeted at a specific device.

[0163] The switching instruction may carry information such as a key value of a triggering button. After receiving the switching instruction, the switching instruction is parsed to determine the button corresponding to the switching instruction.

[0164] In a possible implementation, the key corresponding to the switching instruction may also be a key function set for a specific device.

[0165] The key combination may be a shortcut key switch formed by a key combination, and different key combinations may correspond to different devices / different types of devices to achieve direct switching to a specific device.

[0166] In a possible implementation, a key combination of a specific key and other keys may be used to achieve different key combinations corresponding to different devices.

[0167] As an example, the ctrl+key combination can be used, and different keys correspond to different devices. For example, ctrl+co means switching to a computer, and ctrl+ph means switching to a mobile phone. Of course, the combination is not limited to this. It can be set according to actual conditions in the specific implementation. This application does not limit the key combination method and the device corresponding to the key combination method.

[0168] Among them, different buttons can be set in the input device for different devices to achieve direct switching to a specific device.

[0169] 702. Based on a preset correspondence between a button and a device, determine a target device corresponding to the switching instruction in historical connection information.

[0170] Among them, the historical connection information includes all devices that have established connections with the input device. After the key corresponding to the switching instruction is determined, the device corresponding to the key can be determined based on the preset correspondence between the key and the device, and the target device corresponding to the switching instruction can be further determined in the historical connection information.

[0171] In a possible implementation, the correspondence between each button and the device is pre-set in the input device, and one or more devices corresponding to the button are first determined based on the button corresponding to the switching instruction; then, it is determined in the historical connection information whether there is a target device among the devices corresponding to the button.

[0172] When a device is determined based on the corresponding relationship and the device exists in the historical connection information, the device is used as the target device; when a device is determined based on the corresponding relationship and the device does not exist in the historical connection information, an error is prompted.

[0173] When the button corresponds to a type of device, it is possible to first determine that the button corresponds to a type of device based on the button corresponding to the switching instruction, and then determine the target device of the type in the historical connection information.

[0174] For example, the target device may be determined in the historical connection information in order of time from recent to far.

[0175] In a possible implementation, if the button is used only to trigger a switch, the correspondence between the button and the device is empty, and a device can be determined as the target device by using the order of the devices in the historical connection information.

[0176] Among them, in the historical connection information, according to the sorting order, the next device is selected as the target device.

[0177] For example, in the historical connection information, the device 1, the device 2 and the device 3 are sorted in order, and the device 2 is currently connected to the input device, so the device 3 is determined as the target device.

[0178] In this embodiment, the switching instruction is parsed to determine the key corresponding to the switching instruction. Based on the preset correspondence between the key and the device, the target device corresponding to the switching instruction is determined in the historical connection information. The preset correspondence between the key and the device and the historical connection information are implemented to determine the target device from two aspects, thereby improving the accuracy of the switching.

[0179] In a possible implementation, the method further includes: based on receiving a trigger operation, determining information corresponding to the trigger operation according to the mode of the input device;

[0180] The trigger operation includes triggering any button in the input device and triggering adjustment of the posture of the input device. When the input device is in different postures, the relative position relationship between the first body and the second body of the input device is different.

[0181] After the input device switches to the target mode and receives a trigger operation, information corresponding to the trigger operation is determined according to the current mode of the input device.

[0182] Each mode of the input device is related to the device type of the target device to which it is connected. Accordingly, in different modes of the input device, the function of the key is related to the device type of the target device to which it is connected.

[0183] A set of information corresponding to when a key is triggered is set for each mode of the input device, and the mode and the information corresponding to when the key is triggered are stored in the input device in a list form.

[0184] Among them, in different modes, the same trigger operation may correspond to different information.

[0185] As shown in Table 1 below, taking a Bluetooth mouse as an example, information corresponding to the same trigger operation in different modes is shown.

[0186] Table 1

[0187]

[0188] Among them, in Table 1 above, the mouse mode is that the input device is used as a mouse matching the target device (tablet, non-tablet); the mobile phone mode is that the input device is used as an input device matching the target device (mobile phone), which is different from a mouse.

[0189] As an example, when the input device is a keyboard, if the determined target device is a laptop, a specific key command value on the laptop is enabled, otherwise, the key is disabled.

[0190] Among them, when the trigger operation is received, the corresponding key is determined based on the key value of the trigger operation, and then combined with the mode of the input device, the corresponding information of the key in the current mode is determined, and the corresponding information is sent to the target device so that the target device responds according to the corresponding information.

[0191] The triggering operation of the input device includes triggering any key in the input device to determine corresponding information for each key.

[0192] In a possible implementation, the input device can trigger different information in different postures. When the input device is in different postures, the relative position relationship between the first body and the second body of the input device is different.

[0193] The change in posture of the input device is caused by the change in relative position of the first body and the second body, and the triggering of a function information is achieved by changing the relative position relationship between the first body and the second body.

[0194] Figure 8 801 is a schematic diagram of the structure of an input device provided in an embodiment of the present application. The input device includes a first body 801 and a second body 802. The first body and the second body are connected by adsorption. Figure 8 (a) indicates that the input device is in the first posture. Figure 8 (b) indicates that the input device is in the second posture. By applying a downward force (indicated by the arrow in the figure) in the area 803 corresponding to the connection between the first body and the second body, the input device can switch from the first posture to the second posture. When the force disappears, the input device changes back to the first posture from the second posture under the action of the adsorption force.

[0195] In this embodiment, after following the type of the target device and switching the mode of the input device, when a trigger operation is received, information corresponding to the trigger operation is determined based on the mode of the input device; the trigger operation includes triggering any key in the input device and triggering adjustment of the posture of the input device. When the input device is in different postures, the relative position relationship between the first body and the second body of the input device is different, so that in different modes of the input device, for the trigger operation of the input device, the information corresponding to the trigger operation is determined, and the corresponding information is transmitted to the target device. The target device responds based on the corresponding information, so as to provide the target device with an input mode that matches it.

[0196] An information processing method provided by an embodiment of the present application is introduced above, and a device for executing the above information processing method will be introduced below.

[0197] Fig. 9 Schematic diagram of the structure of an information processing device provided in an embodiment of the present application. Fig. 9 As shown, the information processing device 900 includes:

[0198] An acquisition module 901 is used to obtain device information of a target device;

[0199] The adjustment module 902 is used to adjust the input device mode according to the device information. In different modes, for the same trigger operation, the information of the signal output by the input device is different, and the signal output by the input device is used to make the target device respond to the corresponding information.

[0200] In a possible implementation, the adjustment module includes:

[0201] A first determining unit, configured to determine a device type of the target device based on the device information;

[0202] A second determining unit, configured to determine a target mode corresponding to the input device according to a device type of the target device;

[0203] The first obtaining unit is used to obtain target function information corresponding to the key operation based on the function information pre-configured for each key in the input device in the target mode.

[0204] In a possible implementation, the method further includes:

[0205] A parsing module, configured to parse the name of the target device based on the name of the target device also included in the device information, and obtain the target device type to which the target device belongs;

[0206] The adjustment module is triggered based on that the target device type is consistent with the device type of the target device.

[0207] In a possible implementation, obtaining a module includes at least one of the following:

[0208] A second obtaining unit is configured to obtain connection information for establishing a connection between the target device and the input device, so as to determine device information of the target device based on the connection information; or

[0209] The receiving unit is used to receive device information of the target device based on a connection channel with the target device.

[0210] In a possible implementation, the receiving unit is configured to perform at least one of the following:

[0211] Obtaining a device type code of the target device to be switched through a connection channel with the target device; or

[0212] A first signal is received through a connection channel with a target device, wherein the first signal indicates that the target device switches its device type; and a current device type code of the target device is determined based on the first signal.

[0213] In a possible implementation, the second obtaining unit is specifically configured to:

[0214] Based on the received switching instruction, determining connection information of a target device for the target switching;

[0215] When requesting the target device to establish a connection according to the connection information, device information fed back by the target device is received.

[0216] In a possible implementation, the second obtaining unit is specifically configured to:

[0217] Based on receiving the switching instruction, determining a target device for the target switching in the historical connection information, the historical connection information including device information of each device that has established a connection with the input device;

[0218] In the historical connection information, device information of a target device for target switching is determined, and the historical connection information includes the device information.

[0219] In a possible implementation, the second obtaining unit determines the target device for the target switching in the historical connection information based on the received switching instruction, specifically including:

[0220] Parse the switch command and determine the key corresponding to the switch command;

[0221] Based on the preset correspondence between the button and the device, the target device corresponding to the switching instruction is determined in the historical connection information.

[0222] In a possible implementation, the method further includes:

[0223] A determination module, configured to determine information corresponding to a trigger operation based on a received trigger operation and according to a mode of the input device;

[0224] The trigger operation includes triggering any button in the input device and triggering adjustment of the posture of the input device. When the input device is in different postures, the relative position relationship between the first body and the second body of the input device is different.

[0225] It should be noted that for the functional explanation of each component structure in an information processing device provided in an embodiment of the present application, please refer to the explanation in the aforementioned method embodiment, which will not be repeated in this embodiment.

[0226] In this embodiment, the acquisition module obtains the device information of the target device; the adjustment module adjusts the input device mode according to the device information. In different modes, for the same trigger operation, the information of the signal output by the input device is different. The signal output by the input device is used to make the target device respond to the corresponding information. The input device can set different modes for different target devices. In different modes, the same trigger operation can achieve different functions, which is more compatible with the target device and meets the user's usage needs.

[0227] An embodiment of the present application also provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0228] The memory is used to store computer programs;

[0229] The processor is used to execute the computer program so that the electronic device implements any information processing method provided in the embodiments of the present application.

[0230] A computer program product is also provided in an embodiment of the present application, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any information processing method provided in the embodiment of the present application.

[0231] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any information processing method provided in the embodiment of the present application.

[0232] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0233] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the method of each embodiment of the present application.

[0234] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0235] The computer program product includes one or more computer instructions. When the computer program instruction is loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. An information processing method, comprising: Get the device information of the target device; The input device mode is adjusted according to the device information. In different modes, for the same trigger operation, the information of the signal output by the input device is different. The signal output by the input device is used to make the target device respond to the corresponding information.

2. The information processing method according to claim 1, wherein adjusting the input device mode according to the device information comprises: Based on the device information, determining a device type of the target device; Determining a target mode corresponding to the input device according to the device type of the target device; Based on the function information pre-configured for each key in the input device in the target mode, target function information corresponding to the key operation is obtained.

3. The information processing method according to claim 2, further comprising: Based on the name of the target device also included in the device information, the name is parsed to obtain the target device type to which the target device belongs; Based on the target device type being consistent with the device type of the target device, the step of determining the target mode corresponding to the input device according to the device type of the target device is triggered.

4. The information processing method according to claim 1, wherein obtaining device information of the target device comprises at least one of the following: Obtaining connection information for establishing a connection between a target device and an input device, so as to determine device information of the target device based on the connection information; or Based on a connection channel with a target device, device information of the target device is received.

5. The information processing method according to claim 4, wherein receiving the device information of the target device based on the connection channel with the target device comprises at least one of the following: Obtaining a device type code of the target device of the target switching through a connection channel with the target device; or A first signal is received through a connection channel with a target device, wherein the first signal indicates that the target device switches its device type; and a current device type code of the target device is determined based on the first signal.

6. The information processing method according to claim 4, wherein obtaining connection information of the target device and the input device to determine the device information of the target device based on the connection information comprises: Based on the received switching instruction, determining connection information of a target device for the target switching; When requesting the target device to establish a connection according to the connection information, device information fed back by the target device is received.

7. The information processing method according to claim 4, wherein obtaining connection information of the target device and the input device to determine the device information of the target device based on the connection information comprises: Based on the received switching instruction, determining a target device for the target switching in the historical connection information, wherein the historical connection information includes device information of each device that has established a connection with the input device; In the historical connection information, device information of a target device for target switching is determined, and the historical connection information includes the device information.

8. The information processing method according to claim 7, wherein determining the target device for target switching in the historical connection information based on receiving the switching instruction comprises: Parsing the switching instruction and determining the key corresponding to the switching instruction; Based on a preset correspondence between the button and the device, a target device corresponding to the switching instruction is determined in the historical connection information.

9. The information processing method according to claim 1, further comprising: Based on receiving a trigger operation, determining information corresponding to the trigger operation according to the mode of the input device; The trigger operation includes triggering any button in the input device and triggering adjustment of the posture of the input device. When the input device is in different postures, the relative position relationship between the first body and the second body of the input device is different.

10. An information processing device, comprising: An acquisition module, used to obtain device information of a target device; The adjustment module is used to adjust the input device mode according to the device information. In different modes, for the same trigger operation, the information of the signal output by the input device is different, and the signal output by the input device is used to make the target device respond to the corresponding information.