Service connection method and apparatus, device and storage medium
By establishing a service lookup table between devices to record historical service information and determining the target service connection based on broadcast signals, the inefficiency caused by the complexity of service connection methods in existing technologies is solved, and fast and simplified service connection is achieved.
Patent Information
- Application Number
- PCT/CN2025/096963
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-28
- Filing Date
- 2025-05-23
- Publication Date
- 2026-01-02
AI Technical Summary
In existing technologies, when determining whether to re-establish a service connection between the same device, different connection methods are often used, resulting in a complex and inefficient connection process.
By establishing a service lookup table between devices to record historical service information, and based on the target service information in the broadcast signal, it is determined whether it is a reconnection, and a service connection is established using the corresponding fast connection method.
It improves the efficiency of service connections between devices, reduces connection time, and simplifies the connection process.
Smart Images

Figure CN2025096963_02012026_PF_FP_ABST
Abstract
Description
Service connection method and device, equipment, and storage medium
[0001] The present application claims priority to the Chinese patent application No. CN202410865657.8 filed on June 28, 2024 and entitled "Service connection method and device, equipment, and storage medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] Embodiments of the present application relate to communication connection technology, and in particular, but not exclusively, to a service connection method and device, equipment, and storage medium. BACKGROUND
[0003] Different terminal devices can establish service connections, and different service connection methods can be used in the process of establishing connections. SUMMARY
[0004] Therefore, the service connection method and device, equipment, and storage medium provided by the embodiments of the present application are implemented as follows.
[0005] In an aspect of the embodiments of the present application, a service connection method is provided, which is applied to a first device, and the method comprises:
[0006] receiving a broadcast signal sent by a second device, the broadcast signal comprising service information of a target service to be connected;
[0007] initiating a target service connection with the second device in a case where the service information is service information in a service correspondence table, the target service connection being used for the target service, and the service correspondence table being used for recording service information of at least one historical service, the historical service being a service established by the first device and another device.
[0008] In another aspect of the embodiments of the present application, a service connection device is also provided, which is applied to a first device, and the device comprises a receiving module and a connection module.
[0009] The receiving module is configured to receive a broadcast signal sent by a second device, the broadcast signal comprising service information of a target service to be connected.
[0010] The connection module is configured to initiate a target service connection with the second device in a case where the service information is service information recorded in a service correspondence table, the target service connection being used for the target service, and the service correspondence table being used for recording service information of at least one historical service, the historical service being a service established by the first device and another device.
[0011] The terminal device provided in the embodiments of the present application comprises a memory and a processor, the memory stores a computer program capable of running on the processor, and the processor implements the method of the embodiments of the present application when executing the program.
[0012] The computer readable storage medium provided in the embodiments of the present application stores a computer program, and the computer program is executed by a processor to implement the method provided in the embodiments of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0014] FIG. 1 is a schematic diagram of an application scenario of a service connection method provided in the embodiments of the present application;
[0015] FIG. 2 is a schematic diagram of a software architecture of a first device provided in the embodiments of the present application;
[0016] FIG. 3 is a schematic diagram of a hardware structure of the first device provided in the embodiments of the present application;
[0017] FIG. 4 is a schematic diagram of a flow of the service connection method provided in the embodiments of the present application;
[0018] FIG. 5 is a schematic diagram of a flow of initiating a target service connection with a second device provided in the embodiments of the present application;
[0019] FIG. 6 is a schematic diagram of a flow of establishing a service connection between the first device and the second device in different situations provided in the embodiments of the present application;
[0020] FIG. 7 is a schematic diagram of construction of service information provided in the embodiments of the present application;
[0021] FIG. 8 is a schematic diagram of establishing a service connection between the first device and the second device provided in the embodiments of the present application;
[0022] FIG. 9 is a schematic diagram of a structure of a service connection prediction model provided in the embodiments of the present application;
[0023] FIG. 10 is a schematic diagram of a work flow based on the service connection prediction model provided in the embodiments of the present application;
[0024] FIG. 11 is a schematic diagram of work of a parameter screening model provided in the embodiments of the present application;
[0025] FIG. 12 is a schematic diagram of a structure of a service connection apparatus provided in the embodiments of the present application;
[0026] FIG. 13 is a structural schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the specific technical solutions of the present application will be further described in detail below with reference to the drawings in the embodiments of the present application. The following embodiments are used to explain the present application, but are not used to limit the scope of the present application.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
[0029] In the following description, "some embodiments" are related to a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0030] It should be noted that the terms "first", "second", "third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific order of the objects. It can be understood that "first", "second", "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0031] In the related art, for different types of service connections, a faster connection establishment mode can be adopted according to whether it is re-established. However, for a certain service between the same two devices, since whether each service connection mode is re-established is independent of each other, if different service connection modes are adopted in the process of establishing the connection, it may lead to the first establishment of each service connection mode.
[0032] For example, for service 1, the first device and the second device can establish a service connection in the mode of Bluetooth connection, or can establish a service connection in the mode of local area network connection. If the service connection has been established in the mode of local area network connection, in the process of establishing the service connection again, if the mode of local area network connection is still adopted, it is determined that the service connection is re-established, and a faster connection establishment mode can be adopted. However, if the mode of Bluetooth connection is adopted in the process of establishing the service connection again, since different types of service connections are independent of each other, the present connection will be determined as the first connection in the related art, which leads to the need to adopt a more complex mode to establish the service connection, thereby leading to a longer time required for service establishment and reducing the efficiency of service connection establishment.
[0033] In order to solve the problems in the related art, the embodiment of the present application provides a service connection method, which can make the service connection between two devices more quickly.
[0034] The actual scene to which the service connection method provided in the embodiment of the present application is applied and the objects contained in the scene are explained as follows.
[0035] FIG. 1 is a schematic diagram of an application scene of the service connection method provided in the embodiment of the present application. Referring to FIG. 1, the scene can include a first device 110 and a second device 120.
[0036] It should be noted that the first device 110 and the second device 120 can be two devices that have established a physical connection but have not established a service connection.
[0037] The physical connection refers to a connection that can be established between the first device 110 and the second device 120 through a wireless network, Bluetooth, near field communication, or the like, or can be a connection that is established through a physical interface such as a network cable, that is, the first device 110 and the second device 120 are two devices that have established a communication connection and can realize information interaction.
[0038] The service connection refers to a connection through which the first device 110 and the second device 120 realize information transmission, for example, if the first device 110 and the second device 120 establish a screen projection service connection, a corresponding screen projection service channel can be established, and the screen projection function can be realized through the service channel, for example, the content displayed in the first device 110 can be displayed on the second device 120 through the screen projection function; or if the first device 110 and the second device 120 establish an audio playing connection, a corresponding audio playing service channel can be established, and the audio playing function can be realized through the service channel, for example, the song selected in the first device 110 can be played by the second device 120 through the audio playing function.
[0039] The service connection can be a connection mode used on the basis of the physical connection, for example, if the physical connection is a Bluetooth connection, the service connection can adopt the Bluetooth connection; if the physical connection includes a Bluetooth connection and a local area network connection, the service connection can adopt any one of the Bluetooth connection or the local area network connection.
[0040] Optionally, the first device 110 and the second device 120 can be any type of terminal device, which can include but is not limited to a mobile phone, a wearable device (such as a smart watch, a smart bracelet, smart glasses, etc.), a tablet computer, a notebook computer, a vehicle terminal, a PC (Personal Computer), and the like. The functions implemented by the method can be implemented by a processor in the terminal device invoking program code, and of course the program code can be stored in a computer storage medium. Therefore, the first device 110 and the second device 120 at least include a processor and a storage medium.
[0041] For example, if the service is to implement a screen projection function, the first device 110 can be a projector, and the second device 120 can be a notebook computer; if the service is to implement an audio playback function, the first device 110 can be a headset or a sound box, and the second device 120 can be a mobile phone. That is, for different services, the corresponding entity terminal devices of the first device 110 and the second device 120 can also be different, which is not specifically limited here, and can be set according to actual needs.
[0042] It should be noted that in the embodiments of the present application, the first device is taken as the execution subject, and in the actual implementation process, the second device can also complete the same steps as the execution subject, which is not limited. For example, in the case where the second device initiates a broadcast to the first device, the first device can be the execution subject in the embodiments of the present application; in the case where the first device initiates a broadcast to the second device, the second device can be the execution subject in the embodiments of the present application.
[0043] In the following, the software architecture of the first device is explained in the case where the first device is the execution subject.
[0044] FIG. 2 is a schematic diagram of the software architecture of the first device provided in the embodiments of the present application. Referring to FIG. 2, the software architecture of the first device can include a business layer 210, a framework layer 220, and a communication layer 230.
[0045] The business layer 210 can include corresponding business functions, such as a mobile phone relocation service, an application continuation service, a wireless communication service, a screen projection service, a clipboard sharing service, a material flow service, a device search service, and a communication virtualization service, and the like.
[0046] In the case where the first device is a mobile phone, a notebook computer, a tablet computer, or a desktop computer, and the like, the corresponding business can be executed, and the services required to be called by different businesses are also different. For example, the screen projection service needs to establish a corresponding transmission channel through a screen projection service, so as to complete the screen projection function between two devices.
[0047] The framework layer 220 can be a connection framework, and a corresponding learning framework can also be arranged in the framework layer 220. For example, a service connection prediction model can be stored in the framework layer 220, and the model can be used to predict the service to which the first device is about to connect. In addition, the framework layer 220 can also include a plurality of modules, such as a discovery module for discovering other devices, a connection module for establishing a service connection, an account center for storing account information, a connection service layer for completing a service connection function, a collaborative scheduling module for extracting service features, and the like. In addition, a data bus and a core software tool development package can also be arranged in the framework layer 220.
[0048] The service connection prediction model in the framework layer can be used to predict the service connection to be established by the first device, so as to determine the service to which the first device is about to connect, and then the connection module can be used to establish a service connection channel in advance, so that the establishment of the service connection can be more quickly realized.
[0049] The communication layer 230 can include a network module, a Bluetooth module, a near field communication module, and a communication port module. The first device can communicate with the second device or other devices through the communication layer 230, and different communication modes can be used to complete the communication.
[0050] The network module can be used to realize local area network connection. When the WIFI switch of the first device is turned on, the WIFI mode can be used to establish a communication connection between the first device and the second device or other devices. The Bluetooth module can be used to realize Bluetooth connection. When the Bluetooth switch of the first device is turned on, the Bluetooth mode can be used to establish a communication connection between the first device and the second device or other devices. The near field communication module (NFC, Near Field Communication) can be used to realize the communication connection between the first device and the second device or other devices through near field communication. The communication port module can be used to realize the communication connection between the first device and the second device or other devices through a network cable connection, such as a USB (Universal Serial Bus, Universal Serial Bus).
[0051] Through the above software architecture, the service connection between the first device and the second device or other devices can be realized.
[0052] The above explains the software architecture of the first device. In order to more comprehensively explain the structure of the first device, the hardware structure of the first device will be explained below.
[0053] FIG. 3 is a schematic diagram of the hardware structure of the first device according to an embodiment of the present application. As shown in FIG. 3, the first device includes a processor 310, a memory 320, a transceiver 330, a display unit 340, an input unit 350, and the like.
[0054] The processor 310 is the control center of the first device, which connects the whole first device with various interfaces and lines, and performs various functions and processes data of the first device by running or executing software programs and / or modules stored in the memory 320 and calling data stored in the memory 320, thereby monitoring the whole first device. Optionally, the processor 310 can include one or more processing units; optionally, the processor 310 can integrate an application processor, which mainly processes operating devices, user interfaces, and application programs, and of course, can also include other processors, which are not listed here.
[0055] The memory 320 can be used to store software programs and modules, and the processor 310 executes various functions and data processing of the first device by running the software programs and modules stored in the memory 320. The memory 320 mainly includes a program storage area and a data storage area, wherein the program storage area can store operating devices, application programs required by at least one function (such as sound playing function, image playing function, etc.), and the like; the data storage area can store data created according to the use of the terminal device (such as audio data, phone book, etc.), and the like. In addition, the memory 320 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, flash memory device, or other volatile solid-state memory device.
[0056] The transceiver 330 can provide wireless communication solutions applied on the first device, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like. The transceiver 330 can be one or more devices integrating at least one communication processing module, for example, an antenna and a baseband processor integrated transceiver 330, or an antenna and a modem processor integrated transceiver 330, and the like, which are not limited here.
[0057] The display unit 340 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc., without being limited herein.
[0058] The input unit 350 can be configured to receive inputted digital or character information, and to generate key signal inputs related to user settings and function controls of the first device. The input unit 350 can collect operations on or near the user and drive corresponding connection devices according to a pre-set program. In addition, the input unit 350 can include a touch panel, which can be implemented in various types such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type. In addition to the touch panel, the input unit 350 can include other input devices. The other input devices can include, but are not limited to, one or more of a function key (such as a volume control button, a switch button, etc.), a trackball, a jog wheel, etc.
[0059] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the first device. In other embodiments of the present application, the first device can include more or fewer components than those illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0060] It should be noted that the above explanation is for the software architecture and hardware structure of the first device, and in actual implementation, the second device or other devices that can be in communication connection with the first device can also have the above software architecture and hardware structure, which is not specifically limited herein.
[0061] In order to solve the problems existing in the related art, a service connection method is provided in the embodiments of the present application. The specific implementation process of the service connection method will be explained in detail below.
[0062] FIG. 4 is a flowchart of a service connection method provided in the embodiments of the present application. Referring to FIG. 4, the method includes the following steps.
[0063] S410: receiving a broadcast signal sent by a second device.
[0064] It should be noted that the execution subject of the method can be the first device described above, and the first device can receive the broadcast signal sent by the second device.
[0065] Optionally, the broadcast signal can be a plurality of different types of signals, for example, can be a Bluetooth broadcast, or a plurality of types of broadcasts such as network service discovery multicast (NSD), etc. Since the broadcast signal is broadcast in the form of broadcast, the devices within the broadcast propagation range can receive the signal. If the first device is within the broadcast signal propagation range, the corresponding broadcast signal can be received.
[0066] The broadcast signal can include service information of a target service to be connected. If the broadcast signal is the broadcast signal sent by the second device, the target service to be connected refers to the service to be established between the first device and the second device, and the service information of the target service can be information recording the related data of the target service.
[0067] That is, after receiving the broadcast signal sent by the second device, the first device can obtain the service information of the target service to be connected, so as to further determine whether to establish a service connection corresponding to the target service with the second device.
[0068] S420: In the case that the service information is the service information recorded in the service correspondence table, initiating the target service connection with the second device.
[0069] The target service connection is used for the target service, for example, the target service is a screen projection service, and the target service connection is a service connection of the screen projection service.
[0070] Optionally, the service correspondence table is used for recording service information of at least one historical service.
[0071] It should be noted that the service correspondence table can be a correspondence table pre-stored in the first device and / or the second device. After each service connection is established, the related service information of the established service connection can be stored in the service correspondence table, for example, if the first device and the second device are connected based on a service, the corresponding service information can be stored in the service correspondence table in the first device and the second device respectively; if the first device and other devices are connected based on a service, the corresponding service information can be stored in the service correspondence table in the first device and the other devices respectively.
[0072] For example, after the first device and the second device establish the target service connection, the service information of the established target service can be stored in the service correspondence table.
[0073] It should be noted that there can be various manners for the device to establish a service with another device, for example, device A can initiate a connection with device B for a certain service, and the connection is established; or device B can initiate a connection with device A for a certain service, and the connection is established; or a request for establishing a connection is sent first, and then the connection is initiated, and the connection is established, and no specific limitation is made herein.
[0074] In an embodiment, the historical service can be a service established by the first device with another device, for example, the first device and the second device have established a connection for service 1, and the first device and the third device have established a connection for service 2, and service 1 and service 2 can both be historical services, and the service information of service 1 and the service information of service 2 can be stored in the service correspondence table as the service information of the historical service.
[0075] After the first device receives the broadcast signal, it can determine whether the service information of the target service in the broadcast signal is the service information recorded in the service correspondence table, for example, it can be determined by whether the service information of the target service hits the service correspondence table, that is, whether the service information is one of the service information stored in the service correspondence table. If yes, it can be determined that the service is a service for which a connection has been established, that is, a historical service, and the service connection can be established in the manner of establishing the service connection again; if no, it can be determined that the service is a service for which a connection has not been established, that is, not a historical service, and the service connection can be established in the manner of establishing the service connection for the first time.
[0076] It should be noted that in the case where it is determined that the service information hits the service correspondence table, the type of the broadcast signal and the connection relationship between the first device and the second device for the target service can be determined.
[0077] The type of the broadcast signal can be, for example, the Bluetooth broadcast or the network service discovery multicast, and no specific limitation is made herein, and it can be any type of broadcast.
[0078] In an embodiment, after the connection for the target service is established with the second device, the service information of the target service is stored in the service correspondence table.
[0079] It should be noted that the first device can store the service information of the service after establishing the service connection each time, for subsequent query.
[0080] Optionally, the service connection can be established in different manners according to different types of broadcast signals, for example, the Bluetooth broadcast establishes a Bluetooth channel connection, and the network service discovery multicast establishes a local area network channel connection.
[0081] That is to say, in the embodiment of the application, whether the service to be connected is a service connection to be established again is determined based on the service correspondence table, and even if the connection mode of the service is different, whether the service connection to be established again is determined based on the service correspondence table, so that the service to be connected is determined to be a service connection to be established for the first time after the different connection mode is used.
[0082] In the service connection method provided by the embodiment of the application, the broadcast signal sent by the second device can be received, and the broadcast signal includes service information of a target service to be connected; in the case that the service information is service information recorded in a service correspondence table, a target service connection with the second device is initiated, and the target service connection is used for the target service, and the service correspondence table is used for recording service information of at least one historical service, and the historical service is a service established by the first device and other devices. In the service connection method provided by the embodiment of the application, whether the target service is a service for which a service connection has been established can be determined by querying the service correspondence table, and in the case that the service information hits the service correspondence table, it can be determined that the first device and the second device are establishing a service connection again, so that the service connection can be established in a more rapid manner, that is, the target service connection with the second device is initiated, and the efficiency of service connection establishment can be further improved.
[0083] The specific implementation process of initiating the connection implemented in the embodiment of the application will be explained below.
[0084] FIG. 5 is a flowchart of initiating the target service connection with the second device provided in the embodiment of the application, and please refer to FIG. 5. Initiating the target service connection with the second device includes:
[0085] S510: establishing a target connection channel with the second device according to historical channel connection information of the second device.
[0086] The historical channel connection information includes device information of the second device.
[0087] It should be noted that the historical channel connection information can be information pre-stored in the first device, for example, if the first device and the second device have established a service connection, information required in the process of establishing the service connection can be stored in the first device and the second device as the historical channel connection information respectively.
[0088] The historical channel connection information can be information stored separately or information stored in the above-mentioned service correspondence table, and is not specifically limited here, and one of the two modes can be selected for storage according to actual needs.
[0089] It should be noted that the historical channel connection information can record the channel establishment of the first device, for example, the first device has established a Bluetooth connection with a certain device, and the information used to establish the Bluetooth connection with the device can be recorded as an item in the historical channel connection information.
[0090] In a case where the first device determines to initiate the target service connection, the first device can determine the manner of establishing the connection channel according to the historical channel connection information, that is, the first device can establish the target connection channel with the second device based on the historical channel connection information of the second device.
[0091] For example, if the first device and the second device have established a local area network connection for the target service, the first device and the second device can determine the information required to establish a Bluetooth connection for the target service according to the historical channel connection information, so that the first device can initiate a Bluetooth connection with the second device without additional Bluetooth pairing and other work.
[0092] The target connection channel matches the type of the broadcast signal, for example, if the broadcast signal is a Bluetooth broadcast, the target connection channel established can be a Bluetooth connection channel; if the broadcast signal is a network service discovery multicast, the target connection channel established can be a local area network connection channel.
[0093] S520: Initiating the target service connection with the second device according to the target connection channel.
[0094] It should be noted that after the target connection channel is established based on the above manner, the target service connection with the second device can be initiated. That is, the first device initiates the service connection with the second device, thereby establishing the service connection between the first device and the second device.
[0095] The service connection and the service can have a certain association relationship, for example, if the target service is a screen projection service and the target connection channel is a Bluetooth connection channel, the target service connection is a screen projection service connection realized based on the Bluetooth connection.
[0096] In the service connection method provided in the embodiments of the present application, the target connection channel with the second device can be established according to the historical channel connection information of the second device, and the target service connection with the second device can be initiated according to the target connection channel. The historical channel connection information can be used to more accurately and quickly establish the target connection channel, thereby further improving the efficiency of establishing the target service connection.
[0097] The implementation process of establishing the service connection between the first device and the second device in various cases will be explained in detail below.
[0098] FIG. 6 is a flow diagram illustrating a process of establishing a service connection between a first device and a second device in different cases according to an embodiment of the present application. As shown in FIG. 6, a target connection channel is established with the second device according to historical channel connection information of the second device, including:
[0099] In the case where the type of the broadcast signal is a Bluetooth broadcast, a Bluetooth connection request is sent to the second device to establish a Bluetooth connection channel after Bluetooth pairing is completed according to the historical channel connection information of the second device.
[0100] Alternatively, in the case where the type of the broadcast signal is a network service discovery multicast, a local area network connection request is sent to the second device to establish a local area network connection channel after local area network access is completed according to the historical channel connection information of the second device.
[0101] In the case where the type of the broadcast signal is a Bluetooth broadcast, the result of Bluetooth pairing can be determined by the first device according to the historical channel connection information, and then the first device can send a Bluetooth connection request to the second device to establish a Bluetooth connection channel without sending a pairing request to the second device. In the case where the type of the broadcast signal is a network service discovery multicast, the first device can implement local area network access according to the historical channel connection information, and then the first device can send a local area network connection request to the second device to establish a local area network connection channel without sending an access request to the second device.
[0102] It should be noted that in actual implementation, the connection establishment method used in the historical channel connection information is not fixed, for example, it can be Bluetooth pairing information or a local area network access request, and the first device can perform corresponding conversion processing based on this information, for example, if the historical channel connection information is established by Bluetooth connection, and the target connection channel to be established this time is a local area network connection channel, the corresponding local area network access request can be determined based on the Bluetooth pairing information in the historical channel connection information, so as to establish the target connection channel.
[0103] In one embodiment, in the case where the service information is not the service information recorded in the service correspondence table, the method further includes: initiating a target authentication process to the second device; and after the target authentication process is completed, initiating a target service connection with the second device.
[0104] It should be noted that in the case where the service information is not the service information recorded in the service correspondence table, it can be determined that the service information does not hit the service correspondence table, that is, it can be determined that the target service is a service that is connected for the first time, and then the channel establishment can be completed according to the process of establishing the service for the first time, that is, the target authentication process is initiated to the second device first, and after the authentication is completed, the target service connection with the second device can be initiated.
[0105] Wherein, in the case that the type of the broadcast signal is Bluetooth broadcast, the target authentication procedure is Bluetooth pairing, that is, initiating Bluetooth pairing to the second device; in the case that the type of the broadcast signal is network service discovery multicast, the target authentication procedure is local area network access, that is, initiating local area network access request to the second device.
[0106] That is to say, in the case that the service information hits the service comparison table, the authentication procedure, such as Bluetooth pairing or local area network access, can be implemented by the first device itself based on historical channel connection information; in the case that the service information does not hit the service comparison table, the authentication procedure can be implemented by the first device sending a target authentication request to the second device.
[0107] It should be noted that, no matter which of the above-mentioned multiple ways is used to establish a service connection, it is necessary to first determine whether the service information hits the service comparison table. The specific construction relationship of the service information provided in the embodiments of the present application will be explained below.
[0108] FIG. 7 is a construction diagram of the service information provided in the embodiments of the present application. Please refer to FIG. 7, which is the content included in the service information.
[0109] Optionally, the service information includes: an identification of a target service, a port identification of a service connection, a protocol supported by the target service, and account information.
[0110] It should be noted that, in the service information, the identification of the target service, the port identification of the service connection, the protocol supported by the target service, and the account information are necessary information, and the extension information is optional information.
[0111] Wherein, the identification of the target service can be a service name, and the specific implementation can be a field composed of an application name used and a corresponding service name, wherein the service name can be a hash value of the field.
[0112] The port identification of the service connection can be a port number, for example, in the process of registering mdns (multicast DNS), a random TCP (Transmission Control Protocol) port name will be generated, which is used for subsequent TCP connection, and the port name is the above-mentioned port number.
[0113] The protocol supported by the target service can be a TCP protocol supported by the local area network capability in the framework layer of the terminal device.
[0114] The account information can record the account information of the terminal device logged in. It should be noted that the account information of the account logged in by the first device is the same as the account information of the account logged in by the second device, that is, the first device and the second device are devices logging in the same account.
[0115] Optionally, in addition to the above information, the extension information can be included, wherein the extension information can be used to record other information that needs to be additionally recorded.
[0116] It should be noted that the identification of the target service shown in FIG. 7 can be a hash value composed of an application name and a service name; the port identification of the service connection can be a port name; the protocol supported by the target service can be a TCP protocol; the account information can be an ID or an identification of an account; and the extension information can be additional information.
[0117] The following will explain the specific implementation process of the establishment of the service connection between the first device and the second device provided in the embodiment of the application by taking a specific example.
[0118] FIG. 8 is a schematic diagram of the establishment of the service connection between the first device and the second device provided in the embodiment of the application. Referring to FIG. 8, in the case shown in FIG. 8, the first device and the second device have established the service connection for service 1 through the local area network connection mode before, and have saved the corresponding service correspondence table after the establishment of the service connection, which can be stored in the first device and the second device respectively.
[0119] In the case where the second device turns on the Bluetooth switch, the second device can send a Bluetooth broadcast. After receiving the Bluetooth broadcast, the first device can determine whether the service information in the Bluetooth broadcast hits the service correspondence table, and then determine whether the service to be connected is the service 1. If yes, the first device can directly initiate the Bluetooth connection to the second device, that is, the channel of the Bluetooth connection is established. If not, the first device can perform the Bluetooth pairing work.
[0120] In the case where the second device turns off the Bluetooth switch, if the WLAN switch of the second device is turned on and the network point is connected, the second device can send a network service discovery multicast. After receiving the network service discovery multicast, the first device can determine whether the service information in the network service discovery multicast hits the service correspondence table, and then determine whether the service to be connected is the service 1. If yes, the first device can directly initiate the local area network connection to the second device, that is, the channel of the local area network connection is established. If not, the first device can send a local area network access request.
[0121] It should be noted that the flow shown in FIG. 8 is only one example, and in actual implementation, different connection modes can be used in different orders, and the like, which are not specifically limited here.
[0122] In the embodiment of the present application, the service table of the first device can store service information in the service table after the first device establishes a connection with other devices. The specific process of establishing a service connection with other devices before establishing a target service connection with the second device will be explained below.
[0123] For example, if the first device needs to actively establish a service connection with other devices, such as any other device, the target service that needs to be established can be determined before establishing the service connection.
[0124] For example, the first device is a mobile phone, and the other device is a computer. The first device can establish a screen projection service connection with the other device, so that the display screen of the other device plays the video that needs to be projected in the first device. The first device can also establish an audio playback service connection with the other device, so that the audio amplifier of the other device plays the audio that needs to be played in the first device. That is, for the same two devices, there can be multiple service connections. In order to more accurately and quickly implement the application of the corresponding service connection, the first device can be predicted to determine the target service that will establish a service connection.
[0125] It should be noted that service prediction means that before a user uses a certain service, a terminal device (which can be the first device described above or the second device or other devices) can predict the service that the user will use according to the user's usage habits or historical information of the device, so as to establish a corresponding service connection channel in advance, thereby realizing faster data transmission when the user actually uses the service and shortening the time of establishing a service connection channel after determining to use the service.
[0126] In one embodiment, when the first device discovers at least one other device, the target prediction result can be obtained according to the device information of the first device, the service information of the historical services of the first device, the device information of each other device, the service information of the historical services of each other device, and a preset service connection prediction model.
[0127] In order to more clearly explain the process of determining the target service provided in the embodiment of the present application, the specific structure relationship of the service connection prediction model described above will be explained below.
[0128] FIG. 9 is a structural diagram of a service connection prediction model provided in an embodiment of the present application. Referring to FIG. 9, it should be noted that the service connection prediction model can be a graph neural model, the input of the model can include device information of the first device, service information of the historical service, and device information of the second device, service information of the historical service, and the output of the model can be a target prediction result.
[0129] The target prediction result is used for a target service in which the first device and the second device can establish a service connection, and the at least one other device includes the first device.
[0130] That is, the target prediction result includes the first device and the target service, and according to the target result, the first device that needs to be connected with the second device and the target service that needs to be established with the first device can be determined.
[0131] The device information includes a device identifier and a service provided by the device.
[0132] The device identifier specifically can include a type identifier of the device and an identity identifier of the device, for example, the type identifier of the device can represent a general category of the device or a specific model of the device; and the identity identifier of the device can be a unique identity ID representing the device. In addition, the device identifier can also represent the type of the device, and the type of the device specifically can include the type of the device itself and the type of the channel used by the device, for example, the type of the device itself can include a mobile phone, a tablet computer, a headset, etc.; and the type of the channel of the device can be a Bluetooth channel, a wireless network channel, an end-to-end channel, a near field communication channel, etc., which is not specifically limited here.
[0133] The service information of the historical service can record services that the device has connected, and the number of times each service has been connected, the specific time of each connection, and other related information.
[0134] When the execution subject is the first device, the device information of the first device and the service information of the historical service can be stored by the device itself and can be directly obtained, for example, the service information of the historical service can be obtained from the service table; and the device information of the second device or any other device and the service information of the historical service can be sent by the second device or any other device to the first device, or can also be issued to the first device by a server connected by these devices through the Internet, etc., which is not specifically limited here.
[0135] After the first device discovers the at least one other device, a physical connection can be established between the first device and the other device, and then after the target prediction result is determined in the above manner, a target service connection with the target device can be established.
[0136] It should be noted that the preset service connection prediction model is obtained by training an initial neural network model according to sample data of sample devices, and the sample data includes device information, service information of historical services, and service connection conditions, and the sample devices are any devices that establish service connections with other sample devices.
[0137] In actual implementation, the initial neural network model that has been trained by sample data can be used as the preset service connection prediction model, or the related data generated during use can also be used as sample data to continuously optimize and train the preset service connection prediction model being used. No specific limitation is made herein, and one of the two modes can be selected according to actual needs to train the service connection prediction model.
[0138] In the service connection method provided in the embodiments of the present application, when at least one other device is discovered, a target prediction result can be obtained according to a preset service connection prediction model; and a service connection of the target service can be established with the other device according to the target prediction result. Since the preset service connection prediction model is obtained by training an initial neural network model according to multiple sample data, the target prediction result can be more accurately and quickly determined through the model, so that data can be buffered in advance, and accordingly, the time consumed for service connection can be reduced, and the efficiency of establishing service connection can be further improved.
[0139] The specific implementation process of the service connection prediction model in the embodiments of the present application will be explained below.
[0140] In one embodiment, the preset service connection prediction model includes a neighboring device modeling module, a service feature extraction module, and a service connection selection module, the device information includes a device identifier and a service provided by the device, and the target prediction result is obtained according to the device information of the first device, the service information of the historical services of the first device, the device information of each other device, the service information of the historical services of each other device, and the preset service connection prediction model, wherein:
[0141] The neighboring device modeling module is configured to obtain a connection topology relationship between the second device and at least one other device according to the device identifier of the second device and the device identifier of each other device.
[0142] It should be noted that the other device can be a device within a distance range of the second device, i.e., a neighboring device of the second device, for example, a device in a same room, or within a spherical space with the second device as a center and a certain distance as a radius, which is not limited herein, and any device that can be discovered by the device discovery function can be used as the other device, and the first device can be used as one of the neighboring devices of the second device.
[0143] The connection topology relationship between the second device and the at least one other device can be determined according to the device identifier in the device information of each device, for example, the second device is connected to the first device, the third device, and the fourth device, respectively, and the connection relationship between the second device and the first device, the connection relationship between the second device and the third device, and the connection relationship between the second device and the fourth device can be recorded in the topology relationship, and these connection relationships constitute the topology relationship.
[0144] That is, the topology relationship reflects the connection relationship between the second device and the other devices adjacent to the second device. The connection relationship herein can be a physical connection, i.e., a service connection has not been established between the devices. The connection topology relationship can be established by the neighboring device modeling module.
[0145] In an embodiment, the service feature extraction module is configured to obtain at least one service discovery feature according to the connection topology relationship, the service provided by the second device, the service information of the historical service of the second device, the service provided by each other device, and the service information of the historical service of each other device.
[0146] Each service discovery feature is a service discovery feature between the second device and one of the other devices.
[0147] Optionally, the service provided by the device can represent each service that can be provided by the device, for example, a projector can provide a projection service, and a headset can provide an audio playback service; and the service information of the historical service can determine a historical service connection of the device, for example, the second device has established a projection service with the first device, and the service discovery feature can be determined by the service feature extraction module according to the connection topology relationship, the service provided by the second device, the service information of the historical service of the second device, the service provided by each other device, and the service information of the historical service of each other device.
[0148] The service discovery feature can be a feature extracted from multiple services, for example, the second device can provide three different services, i.e., service 1, service 2, and service 3, and the service discovery feature can be a service discovery feature of service 1, or a service discovery feature of service 2, or a service discovery feature of service 3.
[0149] The service discovery feature of each service can be determined by the service feature extraction module from the corresponding service based on pre-set extraction rules.
[0150] It should be noted that the service discovery feature can be, for example, the use time of a certain service, the use frequency of a certain service, etc., and is not limited specifically herein, and any feature that can represent the characteristics of a certain service can be used as the service discovery feature.
[0151] In an embodiment, the service connection selection module is configured to determine the target prediction result based on the at least one service discovery feature.
[0152] Optionally, after obtaining the at least one service discovery feature, the target prediction result can be determined based on the service discovery feature, for example, the service connection selection module can determine whether the service to which the service discovery feature belongs can be used as the target prediction result based on the frequency of occurrence of the service discovery feature or the impact of the service discovery feature, and if so, the service to which the service discovery feature belongs can be used as the target prediction result, i.e., the target service for establishing a connection between the second device and another device.
[0153] For example, if it is determined based on the service discovery feature of the screen projection service that the screen projection service can be used as the target prediction result, and the other device with which the screen projection service can be established is the first device, then the screen projection service connection between the second device and the first device can be established, and in this case, the screen projection service can be used as the target service.
[0154] In the service connection method provided in the embodiments of the present application, the connection topology relationship between the second device and at least one other device can be obtained by the neighboring device modeling module based on the device identifier of the second device and the device identifier of each other device; at least one service discovery feature can be obtained by the service feature extraction module based on the connection topology relationship, the service provided by the second device, the service information of the historical service of the second device, the service provided by each other device, and the service information of the historical service of each other device, each service discovery feature being a service discovery feature between the first device and one of the other devices; and the target prediction result can be determined by the service connection selection module based on the at least one service discovery feature. In this way, the topology relationship between the second device and the other devices can be more accurately established by the neighboring device modeling module, and the service discovery feature can be more accurately extracted by the service feature extraction module, and the target prediction result can be accurately and quickly obtained by the service connection selection module, and in the case where the other device is the first device, the target service between the second device and the first device can be more quickly and accurately established.
[0155] The following explains the specific implementation process of the service discovery feature extraction provided in the embodiments of the present application.
[0156] In an embodiment, the service feature extraction module comprises a personalized service feature extraction submodule and a common service feature extraction submodule, wherein:
[0157] The personalized service feature extraction submodule is configured to process the connection topology relationship, the service provided by the second device, the service information of the historical service of the second device, the service provided by each other device, and the service information of the historical service of each other device, to obtain personalized service features between the second device and each other device.
[0158] The common service feature extraction submodule is configured to process the personalized service features between the second device and each other device, to obtain common service features.
[0159] The common service features are the same service features in the personalized service features between the second device and each other device and the pre-stored plurality of personalized service features.
[0160] It should be noted that the personalized service features can be personalized service features under a certain account after the device logs in the account, and the common service features can be the same features in the personalized service features of different accounts. For the second device, the personalized service features of other accounts except the current login account can be taken as the pre-stored plurality of personalized service features, and then after obtaining the personalized service features of the current account, the common service features can be determined from the personalized service features of the current account and the same service features in the pre-stored plurality of personalized service features.
[0161] The process of specific implementation processing can be screening or extraction of different features. The following explains the determination process of the personalized service features and the common service features with specific examples.
[0162] For example, according to the connection topology relationship, the service provided by the second device, the service information of the historical service of the second device, the service provided by each other device, and the service information of the historical service of each other device, it can be determined that the time when the user of account A uses service 1 to establish a connection is usually 2 pm, and then the service connection established at 2 pm can be taken as a personalized service feature of service 1.
[0163] For example, according to the personalized service features between the second device and each other device and the pre-stored plurality of personalized service features, it can be determined that the user of account A usually establishes a connection of service 1 at 2 pm, the user of account B usually establishes a connection of service 1 at 3 pm, and the user of account C usually establishes a connection of service 1 at 2:30 pm, and the connection of service 1 established in the afternoon can be determined as a common service feature of service 1.
[0164] That is to say, for each service, the corresponding personalized service features and common service features can be determined.
[0165] The service connection method provided in the embodiments of the present application can process the connection topology relationship, the service provided by the second device, the service information of the historical service of the second device, the service provided by each other device and the service information of the historical service of each other device through the personalized service feature extraction submodule to obtain the personalized service features between the second device and each other device. The personalized service features between the first device and each other device are processed through the common service feature extraction submodule to obtain the common service features. Through the above-mentioned manner, the personalized service features and the common service features are determined respectively, different target prediction results can be obtained according to the use conditions of different users, and the applicability and universality of determining the target prediction results can be improved.
[0166] In an embodiment, the service connection selection module is specifically configured to process the personalized service features and the common service features between the second device and each other device to determine the target service that can be established between the second device and the other device.
[0167] It should be noted that the service connection selection module can process the above-mentioned two features through the personalized collaborative model and the common collaborative model in the processing process, and the first output result and the second output result can be obtained respectively, and the target service can be further determined based on the first output result and the second output result.
[0168] It should be noted that after the personalized service features and the common service features are determined through the above-mentioned manner, the target service can be determined based on the personalized service features and the common service features. For example, through the personalized service features, it can be determined that account A will establish a service connection of service 1 with other devices every day at a certain time during the use of the second device, and through the common service features, it can be determined that most accounts will also establish a service connection of service 1 with other devices every day during the use of the first device, and the service 1 can be determined as the above-mentioned target service, that is, the target service that can be established between the second device and the other device.
[0169] For example, the first output result and the second output result can be the connection state of a service. For example, after the personalized service features of a service are input into the personalized collaborative model, the connection state of the service can be obtained, such as: the connection can be established or the connection cannot be established, and the probability that the service can establish the connection can be calculated, and the probability can be taken as the first output result. Correspondingly, after the common service features of a service are input into the common collaborative model, the connection state of the service can be obtained, such as: the connection can be established or the connection cannot be established, and the probability that the service can establish the connection can be calculated, and the probability can be taken as the second output result.
[0170] After the first output result and the second output result are obtained, the probability that the service can establish the connection can be further determined according to the preset weight. For example, the weight of the first output result can be set as 2 / 3, and the weight of the second output result can be set as 1 / 3, and after weighted calculation, the final probability that the connection can be established is determined, and then the connection state of each service to be established is determined according to the size of the probability.
[0171] For example, when the weighted probability is greater than or equal to 80%, it can be determined that the connection can be established; and when the weighted probability is less than 80%, it can be determined that the connection cannot be established.
[0172] That is to say, whether each service can be the target service can be determined by the above method, and after the target service is determined, the service connection of the target service between the second device and the corresponding other device is established. When the other device is the first device, the second device can send a broadcast message to the first device.
[0173] In order to more clearly explain the above process, the following will take the second device as an example to explain the specific implementation process of working based on the above service connection prediction model.
[0174] FIG. 10 is a working flowchart based on the service connection prediction model provided in the embodiments of the present application. Referring to FIG. 10, the second device can first call the collaborative scheduling module through the short-range protocol stack therein, and then the collaborative scheduling module can determine the personalized service features and the common service features of the service to be established from the service to be established. The personalized service features can be input into the personalized collaborative model, and the common service features can be input into the common collaborative model, and the first output result and the second output result can be output by the two collaborative models respectively, and then the connection state of the service to be established can be obtained based on the first output result and the second output result, and the connection state can be returned to the collaborative scheduling module.
[0175] It should be noted that the above process is only one of the possible examples, and the corresponding adjustment can be made according to the actual needs in the actual implementation process, and it is not limited to this.
[0176] Optionally, in the process of determining the service discovery feature, since the number of service discovery features is large, a preset parameter screening model can be used to determine the target service discovery feature, and the specific screening process of the parameter screening model is as follows:
[0177] FIG. 11 is a working schematic diagram of the parameter screening model provided in the embodiment of the present application. Referring to FIG. 11, the preset service connection prediction model further includes a parameter screening model, wherein the parameter screening model is configured to screen at least one service discovery feature to obtain a target service discovery feature; and the service connection selection module is specifically configured to determine a target prediction result according to the target service discovery feature.
[0178] The input of the parameter screening model can be the at least one service discovery feature, and the output of the parameter screening model can be the target service discovery feature.
[0179] The parameter screening model is a reversible neural network model, and the parameter screening model is configured to screen part of the service discovery features that can improve the model accuracy of the parameter screening model from a plurality of service discovery features.
[0180] It should be noted that for different terminal devices, since there are differences in the discovery connection mode, and sometimes there are great fluctuations in the wireless environment, the influence of different service features is often overwhelmed in these influences, so that the model is difficult to capture the influence of different service features on the adjustment of the optimization target during training. In view of this situation, the parameter screening model of the reversible neural network in the embodiment of the present application retains the action information of the input service feature in the model, which can better capture the influence of the service feature action change on the optimization target.
[0181] In the service connection method provided in the embodiment of the present application, at least one service discovery feature can be screened by the parameter screening model to obtain a target service discovery feature; and a target prediction result is determined according to the service connection selection module and the target service discovery feature. Wherein, by screening the service discovery feature through the parameter screening model, a more suitable service discovery feature can be obtained, and the robustness of the determined target prediction result can be improved.
[0182] It should be understood that although each step in the above flowcharts is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless explicitly stated herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least part of the steps in the above flowcharts can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or sub-steps or stages of other steps.
[0183] Based on the foregoing embodiments, the embodiments of the present application provide a service connection apparatus, which comprises the modules included therein and the units included in the modules, and can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0184] FIG. 12 is a structural schematic diagram of a service connection apparatus provided in the embodiments of the present application. Referring to FIG. 12, the apparatus comprises: a receiving module 1410, a connection module 1420;
[0185] The receiving module 1410 is configured to receive a broadcast signal sent by a second device, wherein the broadcast signal comprises service information of a target service to be established.
[0186] The connection module 1420 is configured to initiate a target service connection with the second device in a case where the service information is service information recorded in a service correspondence table, wherein the target service connection is used for the target service, and the service correspondence table is used for recording service information of at least one historical service, and the historical service is a service established by the first device and other devices.
[0187] In an embodiment, the connection module 1420 is specifically configured to establish a target connection channel with the second device according to historical channel connection information with the second device, wherein the target connection channel matches a type of the broadcast signal, and the historical channel connection information comprises device information of the second device; and initiate the target service connection with the second device according to the target connection channel.
[0188] In an embodiment, the connection module 1420 is specifically configured to, in a case where the type of the broadcast signal is a Bluetooth broadcast, send a Bluetooth connection request to the second device to establish a Bluetooth connection channel after completing Bluetooth pairing according to historical channel connection information with the second device; or, in a case where the type of the broadcast signal is a network service discovery multicast, send a local area network connection request to the second device to establish a local area network connection channel after completing local area network access according to historical channel connection information with the second device.
[0189] In an embodiment, the connection module 1420 is further configured to initiate a target authentication process to the second device, wherein, in a case where the type of the broadcast signal is a Bluetooth broadcast, the target authentication process is Bluetooth pairing; in a case where the type of the broadcast signal is a network service discovery multicast, the target authentication process is local area network access; and after completing the target authentication process, initiate a target service connection with the second device.
[0190] In an embodiment, in the apparatus, the service information includes: an identification of the target service, a port identification of the service connection, a protocol supported by the target service, and account information.
[0191] In an embodiment, in the apparatus, the first device and the second device are devices logged in a same account.
[0192] In an embodiment, the connection module 1420 is further configured to, after establishing the target service connection with the second device, store service information of the target service into a service correspondence table.
[0193] In an embodiment, the broadcast signal is sent by the second device according to a target prediction result of a preset service connection prediction model in a case of discovering at least one other device, the target prediction result is used to indicate the first device and a target service capable of establishing a service connection with the first device, the at least one other device includes the first device, the preset service connection prediction model is obtained by training an initial neural network model according to sample data of a sample device, the sample data includes device information, service information of a historical service, and a service connection situation, and the sample device is any one device capable of establishing a service connection with other sample devices.
[0194] In an embodiment, the preset service connection prediction model comprises a neighboring device modeling module, a service feature extraction module, and a service connection selection module, the device information comprises device identifiers and services provided by the devices, and the target prediction result is obtained according to the device information of the second device, the service information of the historical services of the second device, the device information of each other device, the service information of the historical services of each other device, and the preset service connection prediction model, wherein: the neighboring device modeling module is configured to obtain a connection topology relationship between the second device and at least one other device according to the device identifier of the second device and the device identifier of each other device; the service feature extraction module is configured to obtain at least one service discovery feature according to the connection topology relationship, the service provided by the second device, the service information of the historical services of the second device, the service provided by each other device, and the service information of the historical services of each other device, each service discovery feature being a service discovery feature between the second device and one of the other devices; and the service connection selection module is configured to determine the target prediction result according to the at least one service discovery feature.
[0195] In an embodiment, the service feature extraction module comprises a personalized service feature extraction submodule and a common service feature extraction submodule, wherein: the personalized service feature extraction submodule is configured to process the connection topology relationship, the service provided by the second device, the service information of the historical services of the second device, the service provided by each other device, and the service information of the historical services of each other device to obtain personalized service features between the second device and each other device; and the common service feature extraction submodule is configured to process the personalized service features between the second device and each other device to obtain common service features, the common service features being the personalized service features between the second device and each other device and the same service features in a plurality of pre-stored personalized service features.
[0196] In an embodiment, the service connection selection module is specifically configured to process the personalized service features and the common service features between the second device and each other device to determine a target service that can be connected between the second device and the other devices.
[0197] In an embodiment, the preset service connection prediction model further comprises a parameter screening model, wherein: the parameter screening model is configured to screen the at least one service discovery feature to obtain target service discovery features; and the service connection selection module is specifically configured to determine the target prediction result according to the target service discovery features.
[0198] The above device embodiments are similar to the descriptions of the method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of the present application, please refer to the descriptions of the method embodiments of the present application for understanding.
[0199] It should be noted that the division of the service connection device shown in Figure 12 in the embodiments of the present application is illustrative, and is only a logical functional division. In actual implementation, another division manner can be used. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or can be physically separated, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of a software functional unit. The integrated unit can also be realized in the form of a combination of software and hardware.
[0200] It should be noted that if the above method is realized in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing an electronic device to execute all or part of the method described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various storage media that can store program codes. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0201] Figure 13 is a structural schematic diagram of a computer device provided in the embodiments of the present application. Referring to Figure 13, the embodiments of the present application provide a computer device, which can be any terminal device, for example, can be the first device described above, or can be the second device described above or any other device, and the internal structure diagram can be as shown in Figure 13. The computer device includes a processor 1520, a memory and a network interface 1540 connected through a system bus 1510. The processor 1520 of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium 1531 and an internal memory 1532. The non-volatile storage medium 1531 stores an operating system, a computer program and a database. The internal memory 1532 provides an environment for the running of the operating system and the computer program in the non-volatile storage medium 1531. The database of the computer device is used to store data. The network interface 1540 of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor 1520 to implement the above method.
[0202] The embodiments of the present application provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in the method provided in the above embodiments.
[0203] The embodiment of the present application provides a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the steps in the method provided by the above method embodiment.
[0204] Those skilled in the art can understand that the structure shown in Figure 13 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0205] In one embodiment, the service connection apparatus provided by the present application can be implemented in the form of a computer program, which can run on the computer device shown in Figure 13. The memory of the computer device can store various program modules constituting the above apparatus. The computer program constituted by the various program modules causes the processor to perform the steps in the method of various embodiments of the present application described in the specification.
[0206] It should be pointed out here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects to the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0207] It should be understood that the "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "in some embodiments" appearing throughout the specification does not necessarily mean the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above processes does not mean the execution order, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The sequence number of the above embodiments of the present application is only for description, not representing the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between each embodiment, and the same or similar parts can be referred to each other. For the sake of brevity, this paper will not repeat here.
[0208] The term "and / or" in this paper is only to describe the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, object A and / or object B, which can represent three cases of existence of object A, existence of object A and object B, and existence of object B.
[0209] It should be noted that, in the present document, the terms "comprising", "containing" or any other similar term are intended to encompass non-exclusive inclusion, such that processes, methods, articles, or apparatuses that comprise a list of elements are not limited to those elements, but can also include other elements not expressly listed, or inherent to such processes, methods, articles, or apparatuses. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0210] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The above-described embodiments are merely illustrative, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, such as: a plurality of modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed components can be indirect coupling or communication connection between some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0211] The modules described above as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules; they can be located in one place or distributed on multiple network units; some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment.
[0212] In addition, each functional module in each embodiment of the present application can be integrated in one processing unit, or each module can be a separate unit, or two or more modules can be integrated in one unit; the integrated module can be realized in the form of hardware or hardware plus software function unit.
[0213] Those skilled in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program executes the steps of the above method embodiments when executed; and the foregoing storage medium includes: mobile storage device, read only memory (Read Only Memory, ROM), magnetic disc or optical disc and various storage program codes.
[0214] Alternatively, the above-mentioned integrated units of the present application, if realized in the form of software function modules and sold or used as independent products, can also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several instructions for causing an electronic device to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes: mobile storage devices, ROM, magnetic disks or optical disks, and various media capable of storing program codes.
[0215] The methods disclosed in the several method embodiments provided by the present application can be combined arbitrarily without conflict, to obtain new method embodiments.
[0216] The features disclosed in the several product embodiments provided by the present application can be combined arbitrarily without conflict, to obtain new product embodiments.
[0217] The features disclosed in the several method or device embodiments provided by the present application can be combined arbitrarily without conflict, to obtain new method or device embodiments.
[0218] The above is only an implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A service connection method, characterized in that, Applied to a first device, the method includes: Receive broadcast signals sent by the second device, wherein the broadcast signals include: service information of the target service to which a connection is to be established; If the service information is the service information recorded in the service lookup table, a target service connection with the second device is initiated. The target service connection is used for the target service. The service lookup table is used to record service information of at least one historical service. The historical service is a service that the first device has established with other devices.
2. The method according to claim 1, characterized in that, The initiation of a target service connection with the second device includes: Based on the historical channel connection information with the second device, a target connection channel is established with the second device. The target connection channel is matched with the type of the broadcast signal. The historical channel connection information includes the device information of the second device. Based on the target connection channel, initiate a target service connection with the second device.
3. The method according to claim 2, characterized in that, The step of establishing a target connection channel with the second device based on historical channel connection information with the second device includes: When the broadcast signal is of type Bluetooth broadcast, after completing Bluetooth pairing based on the historical channel connection information with the second device, a Bluetooth connection request is sent to the second device to establish a Bluetooth connection channel.
4. The method according to claim 2, characterized in that, The step of establishing a target connection channel with the second device based on historical channel connection information with the second device includes: When the type of the broadcast signal is network service discovery multicast, after completing the local area network access based on the historical channel connection information with the second device, a local area network connection request is sent to the second device to establish a local area network connection channel.
5. The method according to claim 1, characterized in that, If the service information is not the service information recorded in the service lookup table, the method further includes: Initiate a target authentication process to the second device, wherein, if the type of the broadcast signal is Bluetooth broadcast, the target authentication process is Bluetooth pairing; if the type of the broadcast signal is network service discovery multicast, the target authentication process is LAN access. After completing the target authentication process, a target service connection with the second device is initiated.
6. The method according to any one of claims 1-5, characterized in that, The service information includes: the identifier of the target service, the port identifier of the service connection, the protocols supported by the target service, and account information.
7. The method according to any one of claims 1-5, characterized in that, The first device and the second device are devices logged into the same account.
8. The method according to any one of claims 1-5, characterized in that, The method further includes: After establishing a target service connection with the second device, the service information of the target service is stored in the service lookup table.
9. The method according to any one of claims 1-5, characterized in that, The target service is a service predicted based on the user's usage habits or the device's historical information.
10. The method according to claim 1, characterized in that, The broadcast signal is sent by the second device based on the target prediction result of a preset service connection prediction model when it discovers at least one other device. The target prediction result is used to indicate the first device and the target service that can establish a service connection with the second device. The first device is included among the at least one other device. The preset service connection prediction model is obtained by training an initial neural network model based on sample data of sample devices. The sample data includes device information, service information of historical services, and service connection status. The sample device is any device that has established a service connection with other sample devices.
11. The method according to claim 10, characterized in that, The preset service connection prediction model includes a proximity device modeling module, a service feature extraction module, and a service connection selection module. The device information includes device identifiers and the services provided by the devices. The target prediction result is obtained based on the device information of the second device, the service information of the second device's historical services, the device information of each of the other devices, the service information of each of the other devices' historical services, and the preset service connection prediction model, wherein: The neighbor device modeling module is used to obtain the connection topology between the second device and the at least one other device based on the device identifier of the second device and the device identifier of each of the other devices; The service feature extraction module is used to obtain at least one service discovery feature based on the connection topology, the services provided by the second device, the service information of the historical services of the second device, the services provided by each of the other devices, and the service information of the historical services of each of the other devices. Each service discovery feature is a service discovery feature between the second device and one of the other devices. The service connection selection module is used to determine the target prediction result based on the at least one service discovery feature.
12. The method according to claim 11, characterized in that, The device information and historical service information of the first device are stored in the first device; the device information and historical service information of the second device are sent from the second device to the first device; the device information and historical service information of each of the other devices are sent from each of the other devices to the first device.
13. The method according to claim 11, characterized in that, The service feature extraction module includes a personalized service feature extraction submodule and a public service feature extraction submodule, wherein: The personalized service feature extraction submodule is used to process the connection topology, the services provided by the second device, the service information of the historical services of the second device, the services provided by each of the other devices, and the service information of the historical services of each of the other devices to obtain personalized service features between the second device and each of the other devices. The public service feature extraction submodule is used to process the personalized service features between the second device and each of the other devices to obtain public service features. The public service features are the personalized service features between the second device and each of the other devices, and the same service features among a plurality of pre-stored personalized service features.
14. The method according to claim 13, characterized in that, The service connection selection module is specifically used for: The personalized service features between the second device and each of the other devices, as well as the public service features, are processed to determine the target service for which a connection can be established between the second device and the other devices.
15. The method according to claim 14, characterized in that, The process of processing the personalized service features and public service features between the second device and each of the other devices to determine the target service for which a connection can be established between the second device and the other devices includes: The personalized service features between the second device and each of the other devices are processed to obtain a first output result; The public service characteristics between the second device and each of the other devices are processed to obtain a second output result; The target service is determined based on the first output result and the second output result.
16. The method according to claim 15, characterized in that, Both the first output and the second output represent the probability that a connection can be established for each service. Determining the target service based on the first and second outputs includes: Based on the first output result, the second output result, and the preset weights, determine the final probability of establishing a connection for each service; The target service is determined based on the probability that a connection can eventually be established for each service.
17. The method according to claim 11, characterized in that, The preset service connection prediction model also includes a parameter filtering model, wherein: The parameter filtering model is used to filter the at least one service discovery feature to obtain the target service discovery feature; The service connection selection module is specifically used to determine the target prediction result based on the target service discovery characteristics.
18. A service connection device, characterized in that, Applied to a first device, the device includes: a receiving module and a connection module; The receiving module is used to receive a broadcast signal sent by the second device, the broadcast signal including: service information of the target service to which a connection is to be established; The connection module is used to initiate a target service connection with the second device when the service information is the service information recorded in the service lookup table. The target service connection is used for the target service. The service lookup table is used to record service information of at least one historical service. The historical service is a service that the first device has established with other devices.
19. A computer device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 17.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 17.
Citation Information
Patent Citations
Application connection method and electronic equipment
CN115568036A
Equipment connection method and device, electronic equipment and computer readable storage medium
CN117135759A
Service connection method and device, equipment and storage medium
CN118632385A
Centralized service discovery management
US20240031923A1
Bluetooth connection method, mobile terminal, and storage medium
WO2024113982A1