Networking method, system and related device
Patent Information
- Application Number
- CN202510572117.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]然而,目前的技术方案中,智能车辆中的多个屏幕中仅允许中控屏与周边设备(例如,手机)组网并通信,无法支持智能车辆中的多个屏幕与周边多个设备组网
[0006]本申请实施例中,通过第一设备分时广播包含不同账号的多个心跳广播,使得该多个广播与多个周边设备通信,并可以基于该多个广播使得第一设备中的多个屏幕与多个周边设备组网。
Smart Images

Figure CN123021078A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and in particular to a networking method, system and related equipment. Background Technology
[0002] In related technologies, intelligent vehicles may include multiple screens, such as a central control screen, a passenger-side screen, and rear-seat screens. Each screen can be logged into an independent account, and each screen can have its own independent and isolated user space.
[0003] However, current technical solutions only allow the central control screen to network and communicate with peripheral devices (such as mobile phones) among the multiple screens in smart vehicles, and cannot support multiple screens in smart vehicles to network with multiple peripheral devices. Summary of the Invention
[0004] This application provides a networking method, system, and related equipment that can support networking between a device with multiple screens and multiple peripheral devices.
[0005] In a first aspect, embodiments of this application provide a networking method applied to a first device, the first device including multiple screens, the method comprising: in response to a user logging into a first target screen in the first device with a first account, broadcasting a first message, the first target screen being any one of the multiple screens in the first device, the first message including the first account; in response to receiving a second message broadcast by a second device, the first target screen and the second device forming a network, the second message including the first account, the second device being a single-screen device logged into by the user using the first account; in response to a user logging into a second target screen in the first device with a second account, broadcasting a third message, the second target screen being any one of the multiple screens in the first device other than the first target screen, the third message including the second account; in response to receiving a fourth message broadcast by a third device, the second target screen and the third device forming a network, the fourth message including the second account, the third device being a single-screen device logged into by the user using the second account.
[0006] In this embodiment of the application, the first device broadcasts multiple heartbeats from different accounts in a time-sharing manner, enabling these multiple broadcasts to communicate with multiple peripheral devices, and enabling multiple screens in the first device to network with multiple peripheral devices based on these multiple broadcasts.
[0007] In one possible implementation, after the second target screen and the third device are networked, the method further includes: broadcasting a fifth message, which is used to inquire whether the second device and the third device are online.
[0008] In this embodiment of the application, the online status of the networked devices can be queried by the broadcast information sent by the first device after the network is formed.
[0009] In one possible implementation, the fifth message includes a first sub-message and a second sub-message. The first sub-message includes the first account and is used to inquire whether the second device is online. The second sub-message includes the second account and is used to inquire whether the third device is online.
[0010] In this embodiment, there is no need to store the device-related information of the networked devices; the online status of the networked devices can be queried simply by using the account information logged in on the networked devices.
[0011] In one possible implementation, the fifth message includes the device identifier of the second device and the device identifier of the third device.
[0012] In this embodiment, the online status of multiple networked devices can be queried with a single broadcast message using the device identifiers of the networked devices, eliminating the need to broadcast multiple messages to multiple networked devices and improving query efficiency.
[0013] In one possible implementation, after the first target screen and the second device are networked, the method further includes: storing the device identifier of the second device; after the second target screen and the third device are networked, the method further includes: storing the device identifier of the third device.
[0014] In one possible implementation, after broadcasting the fifth message, the method further includes: receiving a broadcast sixth message, the sixth message being used to notify the first device that the device that sent the sixth message is online, the sixth message containing an account logged in on the device that sent the sixth message.
[0015] In one possible implementation, the user space of the first target screen is independent of the user space of the second target screen.
[0016] In this embodiment of the application, the security of user data can be improved by isolating the user space among multiple screens of the first device.
[0017] Secondly, embodiments of this application provide a networking device applied to a first device, comprising one or more functional modules, wherein the one or more functional modules are used to implement the networking method as described in the first aspect.
[0018] Thirdly, embodiments of this application provide a first device, including: a processor and a memory, wherein the memory is used to store a program; and the processor is used to run the program to implement the networking method as described in the first aspect.
[0019] Fourthly, embodiments of this application provide a networking system, including a first device, a second device, and a third device as described in the third aspect.
[0020] Fifthly, embodiments of this application provide a readable storage medium storing a program that, when run on a first device, causes the first device to implement the networking method as described in the first aspect.
[0021] In a sixth aspect, embodiments of this application provide a program that, when run from the processor of a first device, causes the first device to execute the networking method as described in the first aspect.
[0022] In one possible design, the program in the sixth aspect may be stored wholly or partially on a storage medium packaged with the processor, or it may be stored wholly or partially on a memory not packaged with the processor. Attached Figure Description
[0023] Figure 1 This is a network topology diagram for related technologies;
[0024] Figure 2 A schematic diagram of the broadcast message format for related technologies;
[0025] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0026] Figure 4 This is a schematic diagram of the system architecture provided for an embodiment of this application;
[0027] Figure 5 A flowchart illustrating an embodiment of the networking method provided in this application;
[0028] Figure 6 A schematic diagram of an embodiment of the heartbeat broadcast message format provided in this application;
[0029] Figure 7 A schematic diagram of another embodiment of the heartbeat broadcast message format provided in this application;
[0030] Figure 8 A schematic diagram of another embodiment of the heartbeat broadcast message format provided in this application;
[0031] Figure 9 This is a schematic diagram of the structure of one embodiment of the networking device provided in this application. Detailed Implementation
[0032] In this embodiment of the application, unless otherwise stated, the character " / " indicates that the preceding and following objects are in an OR relationship. For example, A / B can represent A or B. "AND / OR" describes the relationship between the associated objects, indicating that three relationships can exist. For example, A AND / OR B can represent: A existing alone, A and B existing simultaneously, and B existing alone.
[0033] It should be noted that the terms "first" and "second" used in the embodiments of this application are used only for distinguishing descriptive purposes and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated, nor should they be construed as indicating or implying order.
[0034] In the embodiments of this application, "at least one" refers to one or more items, and "more than one" refers to two or more items. Furthermore, "at least one of the following" or similar expressions refer to any combination of these items, which may include any combination of a single item or a plurality of items. For example, at least one of A, B, or C can represent: A, B, C, A and B, A and C, B and C, or A, B, and C. Each of A, B, and C can be an element itself or a set containing one or more elements.
[0035] In this application, terms such as "exemplary," "in some embodiments," and "in another embodiment" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the term "exemplary" is intended to present the concept in a concrete manner.
[0036] In the embodiments of this application, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction, their meanings are consistent. Similarly, in the embodiments of this application, "communication" and "transmission" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction, their meanings are consistent. For example, transmission can include sending and / or receiving, and can be a noun or a verb.
[0037] In the embodiments of this application, the term "equal to" can be used in conjunction with "greater than" to apply to technical solutions employing the condition of "greater than", and can also be used in conjunction with "less than" to apply to technical solutions employing the condition of "less than". It should be noted that when "equal to" is used with "greater than", it cannot be used with "less than"; and when "equal to" is used with "less than", it cannot be used with "greater than".
[0038] In related technologies, intelligent vehicles may include multiple screens, such as a central control screen, a passenger-side screen, and rear-seat screens. Each screen can be logged into an independent account, and each screen can have its own independent and isolated user space.
[0039] However, current technical solutions only allow the central control screen to network with peripheral devices (such as mobile phones) among the multiple screens in smart vehicles, and cannot support multiple screens in smart vehicles to network with multiple peripheral devices.
[0040] Figure 1 An exemplary application scenario diagram of the relevant technology is shown.
[0041] refer to Figure 1 The application scenario may include device 10, device 11 and device 12. Device 10 may include three screens, such as screen 1, screen 2 and screen 3. Device 10 may be a smart vehicle, for example, the vehicle may be Wenjie M9, screen 1 may be the central control screen, screen 2 may be the passenger screen and screen 3 may be the rear screen.
[0042] Understandably, taking HarmonyOS soft bus self-organizing network as an example, the steps of self-organizing network may include: after HarmonyOS device A logs in to the account, the soft bus can obtain the account authentication information (e.g., Account ID), set up Bluetooth filters, and periodically send self-organizing network broadcasts, in which the account authentication information can be carried.
[0043] The frame structure of ad hoc network broadcast can be as follows: Figure 2 As shown.
[0044] If there are other devices with the same account nearby, HarmonyOS device A can receive the self-organizing network broadcasts from these other devices because it has a Bluetooth filter set up. In turn, these other devices with the same account can also receive the self-organizing network broadcasts from HarmonyOS device A.
[0045] When HarmonyOS device A receives a self-organizing network broadcast from other nearby devices with the same account, if the account authentication information matches successfully, it can mark the nearby device that sent the broadcast as being in an online networking state, and HarmonyOS device A can then perform interconnection service interactions with that device.
[0046] If HarmonyOS device A does not receive a self-organizing network broadcast from an online device within a specified period, it can be determined that the device is offline, and HarmonyOS device A can refrain from any interconnection or interaction with that device.
[0047] In the above-mentioned self-organizing network application scenario, screen 1 in device 10 can network with device 11, while screens 2 and 3 in device 10 cannot network with device 11 and / or device 12. This results in poor communication efficiency of device 10 and a poor user experience.
[0048] To address the aforementioned issues, this application proposes a self-organizing network method for use in electronic devices. The electronic device includes multiple screens.
[0049] In some alternative embodiments, the electronic device may be a smart vehicle.
[0050] In some alternative embodiments, the electronic device may be a multi-screen television.
[0051] In some alternative embodiments, the electronic device may be a multi-screen computer.
[0052] In some alternative embodiments, the electronic device may be other devices that include multiple screens, and the embodiments of this application do not specifically limit the type of electronic device.
[0053] Figure 3 An exemplary schematic diagram of the hardware structure of electronic device 100 is shown.
[0054] The aforementioned electronic device 100 may include: at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor can execute the methods provided in the embodiments shown herein by calling the program instructions.
[0055] Figure 3 A block diagram is shown that is suitable for implementing the embodiments described herein. Figure 3 The electronic device 100 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments described herein.
[0056] like Figure 3 As shown, the components of the electronic device 100 may include, but are not limited to: one or more processors 110, memory 120, communication bus 140 connecting different system components (including memory 120 and processor 110), and communication interface 130.
[0057] Communication bus 140 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) buses, Micro Channel Architecture (MAC) buses, Enhanced ISA buses, Video Electronics Standards Association (VESA) local buses, and Peripheral Component Interconnect (PCI) buses.
[0058] Electronic device 100 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the device, including volatile and non-volatile media, removable and non-removable media.
[0059] Memory 120 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Although Figure 3 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media). In these cases, each drive may be connected to the communication bus 140 via one or more data media interfaces. The memory 120 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments herein.
[0060] A program / utility having a set (at least one) of program modules may be stored in memory 120. Such program modules include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules typically perform the functions and / or methods described in the embodiments herein.
[0061] Electronic device 100 can also communicate with one or more external devices (e.g., keyboard, pointing device, display, etc.), one or more devices that enable a user to interact with the device, and / or any device that enables the device to communicate with one or more other devices (e.g., network card, modem, etc.). This communication can be performed through communication interface 130. Furthermore, electronic device 100 can also communicate through a network adapter (… Figure 3 (Not shown) communicates with one or more networks (e.g., Local Area Network (LAN), Wide Area Network (WAN), and / or public networks, such as the Internet). The aforementioned network adapter can communicate with other modules of the device via communication bus 140. It should be understood that, although... Figure 3 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, Redundant Arrays of Independent Drives (RAID) systems, tape drives, and data backup storage systems.
[0062] The processor 110 executes various functional applications and data processing by running programs stored in the memory 120, such as implementing the methods provided in the embodiments herein.
[0063] It is understood that the interface connection relationships between the modules illustrated in the embodiments herein are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments herein, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0064] Figure 4 An exemplary application scenario diagram of an embodiment of this application is shown.
[0065] refer to Figure 4 The application scenarios provided in this application embodiment may include a first device 40 and a plurality of second devices. For example, the plurality of second devices may include a second device 41 and a second device 42.
[0066] It is understood that the number of second devices described above is merely illustrative and does not constitute a limitation on the embodiments of this application. In some embodiments, more second devices may be included.
[0067] The first device 40 may be the aforementioned electronic device 100, and may include multiple screens, such as screens 401, 402, and 403. The second device 41 and the second device 42 may be single-screen devices, with the second device 41 including screen 411 and the second device 42 including screen 421.
[0068] For example, taking the first device 40 as an intelligent vehicle, screen 401 can be a central control screen, screen 402 can be a passenger screen, and screen 403 can be a rear screen.
[0069] It is understandable that, through the self-organizing network between the first device 40, the second device 41, and the second device 42, screens 401 and 403 can be networked with the second device 41, and screen 402 can be networked with the second device 42.
[0070] It should be noted that each of screens 401, 402, and 403 contains an independent user space.
[0071] Next, combined Figure 5 The networking method provided in the embodiments of this application will be described by way of example.
[0072] like Figure 5 The diagram shown is a flowchart of an embodiment of the networking method provided in this application, which specifically includes the following steps:
[0073] Step 501: In response to a user logging into a first target screen on a first device with a first account, the first device broadcasts a first message. The first target screen is any one of multiple screens on the first device, and the first message includes the first account. Correspondingly, the second device receives the broadcast first message.
[0074] In some optional embodiments, the user can log in to the first target screen with the first account by automatically logging in with the user's first account after the first device is powered on.
[0075] In some optional embodiments, the user can log in to the first target screen with the first account by manually logging in with the first account after the first device is powered on.
[0076] In some optional embodiments, the way a user logs into the first target screen with the first account can be that after the first device is powered on, the user can switch the currently logged-in account on the first target screen to the first account by switching accounts, wherein the currently logged-in account is different from the first account.
[0077] It is understood that users can also log in to the first target screen with the first account through other means, and this application embodiment does not make any special limitation on this.
[0078] The first account can be the account used by the user to log in. For example, the first account could be ACCOUNT-1.
[0079] It is understandable that the first target screen can be any one of the multiple screens in the first device.
[0080] For example, with Figure 4 Taking the application scenario shown as an example, the first target screen can be screen 401, or screen 402, or screen 403.
[0081] Understandably, the first message can be a heartbeat broadcast message. A first filter can be configured in the first device, allowing the first account to be carried in the first message, which is then broadcast via the soft bus as a heartbeat broadcast message. Correspondingly, the second device can receive the broadcast first message via the soft bus.
[0082] For example, the broadcast message format of the first message can be as follows: Figure 6 As shown.
[0083] refer to Figure 6 The UID hash field of the first message can carry information about the first account, for example, UID hash = ACCOUNT - 1. The GID hash field of the first message does not need to carry any information, for example, GID hash = NULL.
[0084] Step 502: In response to the received first message, the second device broadcasts a second message, which includes the first account. Correspondingly, the first device receives the second message.
[0085] Specifically, a second device in the vicinity can receive the first broadcast message.
[0086] For example, with Figure 4 Taking the application scenario shown as an example, the surrounding second devices may include second device 41 and second device 42, and second device 41 and second device 42 can receive the first message broadcast by the first target screen.
[0087] In response to the received first message, the second device can determine whether to broadcast a second message. The second message is used to notify the first device that the second device logged in with the first account is online.
[0088] The second device can be configured with a second filter, which allows it to include the first account in a second message and broadcast the second message via a heartbeat broadcast message through the soft bus. Correspondingly, the first device can receive this broadcast second message via the soft bus.
[0089] For example, with Figure 4 Taking the application scenario shown as an example, after the second device 41 receives the first message broadcast by the first device, it can determine whether the first account carried in the first message is the same as the account logged in by the user in the second device 41. Assuming that the user is logged in with the first account in the second device 41, it can be determined that the first account carried in the first message is the same as the account logged in by the user in the second device 41, and the second device 41 can broadcast the second message.
[0090] After receiving the first message broadcast by the first device, the second device 42 can determine whether the first account carried in the first message is the same as the account logged in by the user on the second device 42. Assuming the user is logged in with a second account on the second device 42, it can be determined that the first account carried in the first message is different from the account logged in by the user on the second device 42, and the second device 42 does not need to broadcast a second message. The second account can be the account used by the user to log in, and this second account can be a different account from the first account. For example, the second account could be ACCOUNT-2.
[0091] Understandably, the format of the second message broadcast can be referenced as follows: Figure 6 The format of the first broadcast message shown is not repeated here.
[0092] Step 503: In response to the received second message, the first target screen and the second device form a network.
[0093] Specifically, the first device can receive the second message within a preset duration T.
[0094] The preset duration T can be set to any value between 100-500ms, or it can be set to other values. This application embodiment does not impose any special limitations on this.
[0095] If the first device receives the second message within a preset time period T, the first device can determine whether to form a network with the second device.
[0096] For example, with Figure 4Taking the application scenario shown as an example, if the first device receives the second message broadcast by the second device 41 within a preset time T, it can determine whether the account carried in the second message is the same as the first account logged in by the user on the first target screen of the first device. Since the account carried in the second message is the first account, it can be determined that the account carried in the second message is the same as the first account logged in by the user on the first target screen of the first device. The first target screen can form a network with the second device 41 to realize the self-organizing network between the first target screen and the second device 41.
[0097] If the first device does not receive the second message within a preset time period T, the first device may broadcast the first message again.
[0098] In some alternative embodiments, the first device may rebroadcast the first message periodically until it receives the second message.
[0099] In some optional embodiments, after the first target screen and the second device 41 are networked, the first device can store the device identifier (e.g., UDID-1) of the second device 41.
[0100] Step 504: In response to the user logging into the second target screen on the first device with the second account, the first device broadcasts a third message. The second target screen is any screen among multiple screens on the first device other than the first target screen, and the third message includes the second account. Accordingly, the second device receives the broadcast third message.
[0101] Specifically, the method by which a user logs in to the second target screen with a second account can be referred to the method by which a user logs in to the first target screen with a first account in the above embodiments, and will not be repeated here.
[0102] It is understandable that the second target screen can be any screen other than the first target screen among the multiple screens in the first device.
[0103] For example, with Figure 4 Taking the application scenario shown as an example, if the first target screen is screen 401, the second target screen can be screen 402 or screen 403; or, if the first target screen is screen 402, the second target screen can be screen 401 or screen 403; or, if the first target screen is screen 403, the second target screen can be screen 401 or screen 402.
[0104] Understandably, the third message can be a heartbeat broadcast message. The second account can be carried in the third message through the first filter, and this third message can be broadcast via the soft bus as a heartbeat broadcast message. Correspondingly, the second device can receive the broadcast third message via the soft bus.
[0105] In existing technologies, filters can only carry fixed accounts, such as a first account, in broadcasts. This prevents multiple screens on a first device from broadcasting their respective account information, thus hindering their ability to form an ad hoc network with surrounding devices. In this application, filters can carry variable accounts, such as a first account, a second account, or other accounts, allowing multiple screens on the first device to broadcast their respective account information, enabling them to form an ad hoc network with surrounding devices.
[0106] For example, the broadcast message format of a third message can be as follows: Figure 7 As shown.
[0107] refer to Figure 7 The UID hash field of the third message can carry information about the second account, for example, UID hash = ACCOUNT - 2. The GID hash field of the third message does not need to carry any information, for example, GID hash = NULL.
[0108] In step 505, in response to the received third message, the second device broadcasts a fourth message, which includes the second account. Correspondingly, the first device receives the broadcast fourth message.
[0109] Specifically, a second device in the vicinity can receive a third broadcast message.
[0110] For example, with Figure 4 Taking the application scenario shown as an example, the surrounding second devices may include second device 41 and second device 42, and second device 41 and second device 42 can receive the third message broadcast by the first device.
[0111] In response to the received third message, the second device can determine whether to broadcast a fourth message. The fourth message is used to notify the first device that the second device logged in with the second account is online.
[0112] The second device can be configured with a second filter, which allows the second account to be carried in the fourth message and broadcast via the soft bus as a heartbeat broadcast message. Correspondingly, the first device can receive the broadcast fourth message via the soft bus.
[0113] For example, with Figure 4Taking the application scenario shown as an example, after the second device 41 receives the third message broadcast by the first device, it can determine whether the second account carried in the third message is the same as the account logged in by the user in the second device 41. Since the user is logged in with the first account in the second device 41, it can be determined that the second account carried in the third message is not the same as the first account logged in by the user in the second device 41, and the second device 41 does not need to broadcast the fourth message.
[0114] After receiving the third message broadcast by the first device, the second device 42 can determine whether the second account carried in the third message is the same as the account logged in by the user in the second device 42. Since the user is logged in with the second account in the second device 42, it can be determined that the second account carried in the third message is the same as the account logged in by the user in the second device 42, and the second device 42 can broadcast the fourth message.
[0115] Understandably, the format of the fourth message broadcast message can be referenced as follows: Figure 7 The format of the broadcast message for the third message shown will not be repeated here.
[0116] Step 506: In response to the received fourth message, the second target screen and the second device form a network.
[0117] Specifically, the first device can receive the fourth message within a preset duration T.
[0118] If the first device receives the fourth message within a preset time period T, the first device can determine whether to form a network with the second device.
[0119] For example, with Figure 4 Taking the application scenario shown as an example, if the first device receives the fourth message broadcast by the second device 42 within a preset time T, it can determine whether the account carried in the fourth message is the same as the second account logged in by the user on the second target screen of the first device. Since the account carried in the fourth message is the second account, it can be determined that the account carried in the fourth message is the same as the second account logged in by the user on the second target screen of the first device. The second target screen can form a network with the second device 42 to realize the self-organizing network between the second target screen and the second device 42.
[0120] If the first device does not receive the fourth message within the preset time period T, the first device may broadcast the third message again.
[0121] In some alternative embodiments, the first device may rebroadcast the third message periodically until a fourth message is received.
[0122] In some optional embodiments, after the first target screen and the second device 42 are networked, the first device can store the device identifier (e.g., UDID-2) of the second device 42.
[0123] As can be seen, the above method can establish a network relationship between the first target screen and the second device 41, as well as a network relationship between the second target screen and the second device 42, thereby enabling self-organizing networks between multiple screens in the first device and multiple peripheral devices.
[0124] It is understood that the above embodiments only illustrate the self-organizing network of two peripheral devices (e.g., the second device 41 and the second device 42) with two screens in the first device, and do not constitute a limitation on the embodiments of this application. In some embodiments, more than two peripheral devices may form a self-organizing network with multiple screens in the first device.
[0125] In some alternative embodiments, after step 506, the following steps may also be included:
[0126] Step 507: The first device broadcasts a fifth message, which is used to inquire whether the multiple second devices that have been networked with the first device are online.
[0127] In some optional embodiments, the fifth message may contain multiple messages, each of which may carry account information to inquire whether the device corresponding to the account information is online.
[0128] For example, with Figure 4 Taking the illustrated application scenario as an example, the second device 41 has established a network relationship with the first target screen, and the second device 42 has established a network relationship with the second target screen. The first device can send a fifth message, which may contain two messages: message 1 and message 2. Message 1 may carry the first account and can be used to inquire whether the second device 41, logged in with the first account, is online. After receiving message 1, the second device 41 can respond to the first device via broadcast, indicating that the second device 41, logged in with the first account, is online. Message 2 may carry the second account and can be used to inquire whether the second device 42, logged in with the second account, is online. After receiving message 2, the second device 42 can respond to the first device via broadcast, indicating that the second device 42, logged in with the second account, is online.
[0129] The specific formats of the broadcast messages for messages 1 and 2 can be found in the above embodiments, such as... Figure 6 and 7 The description will not be repeated here.
[0130] In some optional embodiments, the fifth message may be a single message, which may contain device identifiers of multiple second devices that have been networked with the first device. The fifth message may be used to query whether the second devices corresponding to the device identifiers of the multiple second devices are online.
[0131] For example, with Figure 4 Taking the illustrated application scenario as an example, second device 41 and second device 42 have established a network relationship with the first target screen. The first device can send a fifth message, which may include the device identifiers of both the first and second devices. After receiving the fifth message, second device 41 can respond to the first device via broadcast, indicating that second device 41, logged in using the first account, is online. After receiving the fifth message, second device 42 can also respond to the first device via broadcast, indicating that second device 42, logged in using the second account, is online.
[0132] Figure 8 An exemplary diagram of the broadcast message format for the fifth message is shown.
[0133] refer to Figure 8 The device identifier of the second device 41 can be UDID-1, and the device identifier of the second device 42 can be UDID-2, in such cases... Figure 8 In the broadcast message of the fifth message shown, the GID hash field carries UDID-1 and UDID-2, that is, the fifth message can carry the device identification information of the second device 41 and the device identification information of the second device 42.
[0134] Understandably, after the first device receives the heartbeat broadcast from the second device, it can verify whether there is a trust relationship. Since the accounts logged in on the first and second devices are the same and have been networked, the above trust relationship verification can pass successfully, and the soft bus can report that the same account is online.
[0135] Step 508: The first device receives the sixth message, which is used to notify the first device that the device that sent the sixth message is online. The sixth message contains the account logged in on the device that sent the sixth message.
[0136] Specifically, after the first device broadcasts the fifth message, online devices can receive the fifth message. For example, if the second device 41 is online, the second device 41 can receive the fifth message; or, if the second device 42 is online, the second device 42 can receive the fifth message.
[0137] When the online second device receives the fifth message, it can send a sixth message. The sixth message can be used to notify the first device that the device sending the sixth message is online. The sixth message can include the account logged in on the device sending the sixth message.
[0138] For example, if the second device 41 is online, the second device 41 can send a sixth message, which may contain the first account logged in on the second device 41.
[0139] For example, if the second device 42 is online, the second device 42 can send a sixth message, which may contain the second account logged in on the second device 42.
[0140] Figure 9 This is a schematic diagram of the structure of one embodiment of the networking device of this application, as shown below. Figure 9 As shown, the networking device 90 is applied to a first device, which includes multiple screens. The networking device 90 may include: ; wherein,
[0141] The first broadcast module 91 is used to broadcast a first message in response to a user logging into a first target screen in the first device with a first account. The first target screen is any one of a plurality of screens in the first device, and the first message includes the first account.
[0142] The first networking module 92 is used to respond to receiving a second message broadcast by the second device, wherein the first target screen is networked with the second device, the second message includes the first account, and the second device is a single-screen device logged in by the user using the first account;
[0143] The second broadcast module 93 is used to broadcast a third message in response to a user logging into the second target screen in the first device with a second account. The second target screen is any screen other than the first target screen among a plurality of screens in the first device. The third message includes the second account.
[0144] The second networking module 94 is used to respond to receiving a fourth message broadcast by a third device, wherein the second target screen is networked with the third device, the fourth message includes the second account, and the third device is a single-screen device logged in by the user using the second account.
[0145] In one possible implementation, the networking device 90 further includes:
[0146] The third broadcast module 95 is used to broadcast a fifth message, which is used to inquire whether the second device and the third device are online.
[0147] In one possible implementation, the fifth message includes a first sub-message and a second sub-message. The first sub-message includes the first account and is used to inquire whether the second device is online. The second sub-message includes the second account and is used to inquire whether the third device is online.
[0148] In one possible implementation, the fifth message includes the device identifier of the second device and the device identifier of the third device.
[0149] In one possible implementation, the networking device 90 further includes:
[0150] Storage module 96 is used to store the device identifier of the second device and the device identifier of the third device.
[0151] In one possible implementation, the networking device 90 further includes:
[0152] The receiving module 97 is used to receive a broadcast sixth message, which is used to notify the first device that the device that sent the sixth message is online, and the sixth message contains the account logged in on the device that sent the sixth message.
[0153] In one possible implementation, the user space of the first target screen is independent of the user space of the second target screen.
[0154] Figure 9 The networking device 90 provided in the illustrated embodiment can be used to execute the technical solution of the method embodiment shown in this application. Its implementation principle and technical effect can be further referred to the relevant description in the method embodiment.
[0155] The above should be understood Figure 9 The division of the various modules in the network device 90 shown is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented in software via processing element calls, while others are implemented in hardware. For example, the detection module can be a separate processing element or integrated into a chip in an electronic device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or implemented independently. During implementation, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0156] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, these modules can be integrated together as a System-On-a-Chip (SOC).
[0157] In the above embodiments, the processor may include, for example, a CPU, DSP, microcontroller, or digital signal processor, and may also include a GPU, embedded neural network processing unit (NPU), and image signal processor (ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as an ASIC, or one or more integrated circuits for controlling the execution of the program in this application. Furthermore, the processor may have the function of operating one or more software programs, which may be stored in a storage medium.
[0158] This application also provides a readable storage medium storing a program that, when run on an electronic device, causes the electronic device to execute the method provided in the embodiments shown in this application.
[0159] This application also provides a program product including a program that, when run on an electronic device, causes the electronic device to perform the method provided in the embodiments shown in this application.
[0160] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0161] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0162] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0163] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a readable storage medium. Based on this understanding, the technical solution of this application, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0164] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A networking method, characterized in that, Applied to a first device, the first device including multiple screens, the method includes: In response to a user logging into the first target screen of the first device with a first account, a first message is broadcast, wherein the first target screen is any one of multiple screens in the first device, and the first message includes the first account; In response to receiving a second message broadcast by the second device, the first target screen and the second device form a network, the second message includes the first account, and the second device is a single-screen device logged in by the user using the first account; In response to a user logging into a second target screen on the first device with a second account, a third message is broadcast, wherein the second target screen is any screen other than the first target screen among a plurality of screens on the first device, and the third message includes the second account; In response to receiving a fourth message broadcast by a third device, the second target screen and the third device form a network, the fourth message including the second account, and the third device being a single-screen device logged in by the user using the second account.
2. The method according to claim 1, characterized in that, After the second target screen and the third device form a network, the method further includes: A fifth message is broadcast, which is used to inquire whether the second device and the third device are online.
3. The method according to claim 2, characterized in that, The fifth message includes a first sub-message and a second sub-message. The first sub-message includes the first account and is used to inquire whether the second device is online. The second sub-message includes the second account and is used to inquire whether the third device is online.
4. The method according to claim 2, characterized in that, The fifth message includes the device identifier of the second device and the device identifier of the third device.
5. The method according to claim 4, characterized in that, After the first target screen and the second device form a network, the method further includes: Store the device identifier of the second device; After the second target screen and the third device form a network, the method further includes: Store the device identifier of the third device.
6. The method according to claim 4, characterized in that, After broadcasting the fifth message, the method further includes: The first device receives a sixth broadcast message, which is used to notify the first device that the device that sent the sixth message is online, and the sixth message contains the account logged in on the device that sent the sixth message.
7. The method according to any one of claims 1-6, characterized in that, The user space of the first target screen is independent of the user space of the second target screen.
8. A first device, characterized in that, include: A processor and a memory, wherein the memory is used to store a program; the processor is used to run the program to implement the networking method as described in any one of claims 1-7.
9. A networking system, characterized in that, It includes the first device, the second device, and the third device as described in claim 8.
10. A readable storage medium, characterized in that, The readable storage medium stores a program that, when run on the first device, implements the networking method as described in any one of claims 1-7.
