Multi-device communication method, electronic device and medium

Automatically connects smart terminals and hosts through LAN UDP broadcast, solving the problem of manually configuring IP addresses in the prior art, and achieving efficient multi-device data communication and remote terminal management.

CN120342797APending Publication Date: 2025-07-18HANGZHOU QIUGUOJIHUA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510537888.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing multi-device communication method requires manual configuration of IP addresses, which leads to inconvenient connection between the terminal and the host, and it is impossible to quickly establish data communication when the terminal connects to the network.

Method used

UDP broadcasting is performed through the LAN, so that the smart terminal automatically establishes a connection with the host after receiving UDP broadcast messages, and exchanges data through application services, supporting encryption and priority processing of different types of applications.

Benefits of technology

It reduces the time and labor cost of data communication for smart terminals, improves data communication efficiency, and supports data exchange and operation management of remote terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120342797A_ABST
    Figure CN120342797A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-device communication method, an electronic device and a medium, and relates to the technical field of communication. The specific implementation mode of the multi-device communication method applied to the host end comprises the steps that UDP broadcast is carried out through a local area network, so that an intelligent terminal establishes connection with a host after receiving a UDP broadcast message; the host communicates with at least one intelligent terminal through a local area network, and the host is provided with an application service; and in response to the received application service request of the intelligent terminal, performing application data exchange on the intelligent terminal through the application service, thereby greatly reducing the time and labor cost of data communication of the intelligent terminal, and improving the data communication efficiency of the intelligent terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, specifically to the field of multi-device communication technologies, and particularly to a multi-device communication method, an electronic device, and a medium. Background Art

[0002] The multi-device communication method realizes data communication between devices by performing data exchange and information sharing among multiple devices.

[0003] However, existing multi-device communication methods usually require obtaining the IP address of the host in advance and manually configuring this IP address one by one in each terminal to achieve data communication between multiple terminals. When a terminal accesses the network, it cannot automatically establish a connection between the terminal and the host to quickly achieve data communication between terminals through the host, resulting in inconvenient data communication between terminals.

[0004] The above information disclosed in this background art section is only used to enhance the understanding of the background of the inventive concept, and thus, it may include information that does not form the prior art known to those of ordinary skill in the art in this country. Summary of the Invention

[0005] Aiming at the problems such as inconvenient data communication between terminals in the prior art, a multi-device communication method, an electronic device, and a medium are provided.

[0006] According to a first aspect, a multi-device communication method is provided, which is applied to the host side. An application service is provided on the host. The host communicates with at least one intelligent terminal through a local area network. The method includes:

[0007] Performing UDP broadcast through the local area network so that the intelligent terminal establishes a connection with the host after receiving the UDP broadcast message;

[0008] In response to receiving the application service request from the intelligent terminal, performing data exchange of the application for the intelligent terminal through the application service.

[0009] In combination with the first aspect, in some examples, there are multiple application service requests. An application background control service is also provided on the host. Then, in response to receiving the application service request from the intelligent terminal, performing data exchange of the application for the intelligent terminal through the application service includes:

[0010] In response to receiving the application service request from the intelligent terminal, obtaining the running mode of the application corresponding to each application service request through the application background control service;

[0011] Determining a first data exchange order corresponding to each application service request according to the running mode;

[0012] Through the application service, data exchange of each of the intelligent terminals for the application is sequentially performed according to the first data exchange order.

[0013] Combined with the first aspect, in some examples, if the application service requests are sent by different types of applications, then in response to receiving the application service request of the intelligent terminal, data exchange of the application for the intelligent terminal is performed through the application service, including:

[0014] In response to receiving the application service request of the intelligent terminal, determine the types of the applications corresponding to the application service requests through the application service;

[0015] According to the types of the applications, determine the second data exchange order corresponding to each of the application service requests;

[0016] Through the application service, data exchange of the application for each of the intelligent terminals is sequentially performed according to the second data exchange order.

[0017] Combined with the first aspect, in some examples, the local area network is connected to the Internet, a communication channel is established between the host and the cloud host through the Internet, an FRP server and an Nginx service are set on the cloud host, and an FRP client is also set on the host. The method further includes:

[0018] Receive a remote application service request forwarded by the FRP server on the cloud host through the FRP client;

[0019] In response to receiving the remote application service request, perform data exchange of the application for the remote intelligent terminal through the application service; wherein,

[0020] The remote intelligent terminal is not connected to the local area network; the remote application service request is sent by the remote intelligent terminal, received by the Nginx service on the cloud host and forwarded to the FRP server, so that the FRP server forwards it to the FRP client through the communication channel as a remote application service request.

[0021] Combined with the first aspect, in some examples, the local area network is connected to the Internet, a communication channel is established between the host and the cloud host through the Internet, an FRP server and an Nginx service are set on the cloud host, and an FRP client and an application background control service are also set on the host. The method further includes:

[0022] Receive a remote control service request forwarded by the FRP server on the cloud host through the FRP client;

[0023] In response to receiving the remote control service request, control the application of the intelligent terminal corresponding to the remote notification service request through the application background control service; wherein,

[0024] The remote control service request is a remote control service request received by the Nginx service on the cloud host and forwarded to the FRP server for the FRP server to forward to the FRP client through the communication channel.

[0025] In combination with the first aspect, in some examples, an application background control service is further provided on the host. After establishing a connection with the intelligent terminal and before receiving the application service request of the intelligent terminal, the method further includes:

[0026] Obtain the status of the intelligent terminal through the application background control service, and control the application of the intelligent terminal according to the status of the intelligent terminal.

[0027] In combination with the first aspect, in some examples, UDP broadcast is performed through the local area network so that the intelligent terminal establishes a connection with the host after receiving the UDP broadcast message, including:

[0028] Encrypt the UDP broadcast message using a preset encryption algorithm;

[0029] Broadcast the encrypted UDP broadcast message through the local area network UDP so that the intelligent terminal receives the encrypted UDP broadcast message, decrypt the encrypted UDP broadcast message using the encryption algorithm, and establish a connection with the host according to the decrypted UDP broadcast message.

[0030] According to the second aspect, a multi-device communication method is provided, which is applied to at least one intelligent terminal. The at least one intelligent terminal communicates with the host through the local area network. The method includes:

[0031] Listen for UDP broadcast messages in the local area network and establish a connection with the host according to the UDP broadcast messages; an application service is provided on the host;

[0032] Send an application service request to the host so that after the host receives the application service request, data exchange of the application for the intelligent terminal is performed through the application service.

[0033] According to a third aspect, there is provided an electronic device, including: one or more processors; a memory for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method of any one of the embodiments of the multi-device communication method applied to the host side or the method of any one of the embodiments of the multi-device communication method applied to the smart terminal.

[0034] According to a fourth aspect, there is provided a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method of any one of the embodiments of the multi-device communication method applied to the host side or the method of any one of the embodiments of the multi-device communication method applied to the smart terminal.

[0035] According to the multi-device communication method provided in the present application, by performing UDP broadcast in a local area network, smart terminals in the local area network can, after receiving the UDP broadcast message, automatically establish a connection with the host by parsing the UDP broadcast message, and actively discover the application services in the host, without manually configuring the IP addresses of the smart terminals one by one. This facilitates the host to receive application service requests from the smart terminals, and perform application data exchange with the smart terminals through the application services. This method greatly reduces the time and labor costs of data communication for smart terminals and improves the data communication efficiency of smart terminals. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Other features, objects, and advantages of the present application will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings:

[0037] Figure 1 is an exemplary system architecture diagram to which some embodiments of the present application can be applied.

[0038] Figure 2 is a flowchart of a first embodiment of the multi-device communication method according to the present application.

[0039] Figure 3 is a schematic diagram of an application scenario of the multi-device communication method according to the present application.

[0040] Figure 4 is a flowchart of a second embodiment of the multi-device communication method according to the present application.

[0041] Figure 5 is a flowchart of a third embodiment of the multi-device communication method according to the present application.

[0042] Figure 6 is a flowchart of a fourth embodiment of the multi-device communication method according to the present application.

[0043] Figure 7 It is an exemplary block diagram of an electronic device for implementing the multi-device communication method of the embodiments of the present application. Detailed implementation manners

[0044] The following describes exemplary embodiments of the present application with reference to the accompanying drawings. Various details of the embodiments of the present application are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, descriptions of well-known functions and structures are omitted below for clarity and conciseness.

[0045] For the convenience of understanding the technical solutions provided by the present application, relevant terms in the present application are defined before the specific embodiments as follows:

[0046] Application service: It is a service module that provides specific business functions for users or clients. It is responsible for receiving user requests, executing business logic, interacting with databases or other services, and returning processing results.

[0047] Application background control service: It is an infrastructure service for system administrators, used to monitor, configure, and maintain the running status of application services.

[0048] Cloud host: It is a virtualized server based on cloud computing technology. It provides elastic and scalable computing resources through the Internet. Users can rent virtualized computing, storage, and network resources on demand without purchasing physical hardware, enabling rapid deployment and management of application services.

[0049] FRP: Fast Reverse Proxy, a fast reverse proxy, is an open-source intranet penetration tool used to help users securely and efficiently expose services within a local area network to the Internet.

[0050] Nginx: It is an open-source and high-performance Web server and reverse proxy software used for functions such as load balancing, caching, and encryption, and is commonly used in websites or applications with high concurrent access.

[0051] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0052] Figure 1 Exemplary system architecture 100 showing embodiments to which the multi-device communication method or multi-device communication apparatus of the present application can be applied is shown.

[0053] As Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0054] Users can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as video applications, live broadcast applications, instant messaging tools, email clients, social platform software, etc.

[0055] The terminal devices 101, 102, 103 here can be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can be various electronic devices with a display screen, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, and desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. It can be implemented as multiple software or software modules (such as multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0056] The server 105 can be a server that provides various services, such as a background server that supports the terminal devices 101, 102, 103. The background server can analyze and process data such as received application service requests, and feedback the processing results (such as data exchange results) to the terminal devices.

[0057] It should be noted that the multi-device communication method provided by the embodiments of the present application can be executed by the server 105 or the terminal devices 101, 102, 103. Correspondingly, the multi-device communication device can be set in the server 105 or the terminal devices 101, 102, 103.

[0058] It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in

[0059] Continuing to refer to Figure 2 , a flow 200 of a first embodiment of the multi-device communication method according to the present application is shown. This multi-device communication method is applied to the host side, and an application service is set on the host; the host communicates with at least one smart terminal through a local area network, including the following steps:

[0060] Step 201: Perform UDP broadcast through the local area network so that the smart terminal can establish a connection with the host after receiving the UDP broadcast message;

[0061] In this embodiment, the execution entity (such as Figure 1 the server or terminal device shown) on which the multi-device communication method runs can perform UDP broadcast through the local area network. The UDP broadcast message includes at least one of the following: the service port of the host and the IP address of the host in the local area network; the service port includes at least: the port of the application service; so that the smart terminal can receive the UDP broadcast message, determine the network location of the host in the local area network according to the IP address in the UDP broadcast message to locate the host; and establish a data transmission channel with the application service in the host according to the port of the application service in the UDP broadcast message to request the port of the application service according to the TCP or HTTP protocol.

[0062] It should be noted that in the prior art, the TCP protocol is usually used to establish a one-to-one connection-oriented communication between the host and the smart terminal, and the IP address of each smart terminal needs to be manually configured one by one, which not only requires high technical requirements for the staff, but also consumes a large amount of time and labor costs.

[0063] In some embodiments, the host can perform UDP broadcast through timed loops to enable the smart terminals in the local area network to receive the UDP broadcast message, avoiding the smart terminals in the local area network from missing the UDP broadcast message and being unable to automatically establish a connection with the host.

[0064] In some embodiments, performing UDP broadcast through the local area network so that the smart terminal can establish a connection with the host after receiving the UDP broadcast message includes: encrypting the UDP broadcast message using a preset encryption algorithm; broadcasting the encrypted UDP broadcast message through the local area network UDP so that the smart terminal can receive the encrypted UDP broadcast message, decrypting the encrypted UDP broadcast message using the encryption algorithm, and establishing a connection with the host according to the decrypted UDP broadcast message; in this embodiment, by encrypting the UDP broadcast message, it is prevented that non-target smart terminals in the local area network automatically establish a connection with the host, affecting the data communication between target smart terminals.

[0065] In some preferred implementation manners of this embodiment, an asymmetric encryption algorithm is used to encrypt UDP broadcast messages. For example, a public key of the RSA encryption algorithm is pre-set in the intelligent terminal; the private key of the RSA encryption algorithm is used to encrypt the UDP broadcast messages, so that after the intelligent terminal receives the encrypted UDP broadcast messages, the public key of the RSA encryption algorithm is used to decrypt the encrypted UDP broadcast messages, and a connection is established with the host according to the decrypted UDP broadcast messages; in this embodiment, an asymmetric encryption algorithm is used to encrypt and decrypt UDP broadcast messages with different keys, so as to avoid the leakage of the key on the host side caused by the leakage of the key on the intelligent terminal side, and to ensure the data security of the host.

[0066] In some embodiments, a portable host, such as a mini host, etc., is used as the host, which can quickly carry out multi-device communication locally (within a local area network), further facilitating local deployment and improving the flexibility of local deployment.

[0067] Step 202, in response to receiving the application service request of the intelligent terminal, perform application data exchange with the intelligent terminal through the application service.

[0068] In this embodiment, after the port of the application service on the host receives the application service request sent by the application in the intelligent terminal, the application service parses the application service request to obtain the request content of the application service request, and calls the corresponding processing logic according to the request content of the application service request to perform application data exchange with the intelligent terminal. For example, for an attack request, the application service will call the relevant logic of the combat system to calculate damage, update the enemy status, etc.; for a chat message request, the application service will broadcast the message to other users.

[0069] In some embodiments, there are multiple application service requests, and an application background control service is further set on the host. Then, in response to receiving the application service request of the intelligent terminal, performing application data exchange with the intelligent terminal through the application service includes: in response to receiving the application service request of the intelligent terminal, obtaining the running mode of the application corresponding to each application service request through the application background control service; determining the first data exchange order corresponding to each application service request according to the running mode; and performing application data exchange with each intelligent terminal in sequence through the application service according to the first data exchange order; where the running mode includes at least one of the following: active mode and non-active mode; the real-time requirement for data in the active mode is higher than that in the non-active mode; for example, in a game application, the active mode of the application is that the player character is in a combat state, and the non-active mode of the application is that the player character is in a non-combat state; the multi-device communication method in this embodiment can allocate communication resources of the application according to the running mode of the application.

[0070] In some preferred implementation manners of this embodiment, the data exchange order corresponding to the active mode is set to be prior to the data exchange order corresponding to the non-active mode. For example, in the actual scenario of a game application, the data exchange order of the application in which the player character is in a combat state is preset to be prior to the data exchange order of the application in which the player character is in a non-combat state. When application service requests are simultaneously sent by the same application running on at least two intelligent terminals in a local area network, the application service preferentially performs data exchange for the application in which the player character is in a combat state; in this embodiment, according to the running mode of the application, the first data exchange order corresponding to each application service request is determined, and by preferentially performing data exchange for the application in the active mode, the communication resource allocation and data exchange efficiency of the application in different running modes are optimized.

[0071] In some other embodiments, the application service request may be sent by different types of applications. Then, in response to receiving the application service request of the intelligent terminal, the application service performs data exchange of the application for the intelligent terminal, including: in response to receiving the application service request of the intelligent terminal, the application service determines the types of the applications corresponding to the application service requests. For example, the application service determines the type of the application corresponding to the application service request according to the mapping relationship between the application identifier and the application type preset through the application identifier in the application service request; according to the type of the application, the second data exchange order corresponding to each application service request is determined; through the application service, in accordance with the second data exchange order, data exchange of the application for each intelligent terminal is sequentially performed; wherein, the type of the application includes at least one of the following: real-time interactive type and non-real-time interactive type; the real-time interactive type has a higher requirement for data real-time performance than the non-real-time interactive type; for example, the real-time interactive type of applications may include: virtual shooting battle games, video conferences, live broadcast software, and online education software, etc., and the non-real-time interactive type of applications may include: collaborative decryption games, quiz games, and social media platforms, etc.; the multi-device communication method in this embodiment can allocate the communication resources of the application according to the type of the application.

[0072] In some preferred implementation manners of this embodiment, the data exchange order of the real-time interactive application is set to be prior to that of the non-real-time interactive application. For example, in a practical application scenario, a virtual shooting battle game is running on some intelligent terminals in a local area network, and a collaborative decryption game is running on other intelligent terminals. The data exchange order of the virtual shooting battle game is preset to be prior to that of the collaborative decryption game; when the virtual shooting battle game and the collaborative decryption game simultaneously send application service requests to the host, the application service request preferentially performs data exchange for the virtual shooting battle game and then performs data exchange for the collaborative decryption game; in this embodiment, according to the type of the application, the second data exchange order corresponding to each application service request is determined, and the application with high requirement for data timeliness is preferentially subjected to data exchange, so as to optimize the communication resource allocation and data exchange efficiency of different types of applications.

[0073] In some other embodiments, an application background control service is further provided on the host; the service port further includes: the port of the application background control service; after establishing a connection with the intelligent terminal and before receiving the application service request of the intelligent terminal, the method further includes: obtaining the state of the intelligent terminal through the application background control service, and controlling the application of the intelligent terminal according to the state of the intelligent terminal; specifically, after the intelligent terminal receives a UDP broadcast message, it further establishes a control instruction transmission channel with the application background control service in the host according to the port of the application background control service in the UDP broadcast message, and establishes a long connection with the application background control service according to the TCP protocol. The host can obtain the state of the intelligent terminal through the application background control service and control the application of the intelligent terminal according to the state of the intelligent terminal. For example, according to the mapping relationship between the preset state of the intelligent terminal and the control operation, the control operation corresponding to the intelligent terminal is determined; the application of the intelligent terminal is controlled according to the corresponding control operation; wherein, the state of the intelligent terminal at least includes one of the following: online state, network latency, CPU / GPU / memory utilization rate, device power, and database connection pool state, etc.; the control operation at least includes one of the following: starting an application and closing an application.

[0074] In some specific examples, when the device power of the intelligent terminal is lower than a preset power threshold, the corresponding control operation is to close the application; when the number of online intelligent terminals exceeds a preset number threshold, the corresponding control operation is to start the application.

[0075] The multi-device communication method provided in the above embodiments of the present application is applied to the host side. By performing UDP broadcast in the local area network, intelligent terminals in the local area network can automatically establish a connection with the host after receiving the UDP broadcast message, and actively discover the application services in the host, without manually configuring the IP addresses of the intelligent terminals one by one. This facilitates the host to receive application service requests from intelligent terminals, and perform application data exchange with the intelligent terminals through the application services. This method greatly reduces the time and labor costs of data communication for intelligent terminals and improves the data communication efficiency of intelligent terminals.

[0076] Continue to refer to Figure 3 , Figure 3 which is a schematic diagram of an application scenario of the multi-device communication method according to this embodiment. In the Figure 3 application scenario, an application service is set on the execution entity 300. The execution entity 300 performs UDP broadcast through the local area network so that the intelligent terminal can establish a connection with the host after receiving the UDP broadcast message 301. The execution entity 300 responds to the received application service request 302 from the intelligent terminal and performs application data exchange 303 with the intelligent terminal through the application service.

[0077] Further refer to Figure 4 which shows the process 400 of the second embodiment of the multi-device communication method. In this embodiment, the local area network is connected to the Internet, and a communication channel is established between the host and the cloud host through the Internet. An FRP server and an Nginx service are set on the cloud host, and an FRP client is also set on the host. The process 400 includes the following steps:

[0078] Step 401, receive the remote application service request forwarded by the FRP server on the cloud host through the FRP client;

[0079] In this embodiment, the execution entity on which the multi-device communication method runs (such as Figure 1The server shown can receive the remote application service request forwarded by the FRP server on the cloud host through the FRP client; the remote application service request is sent by the remote intelligent terminal, received by the Nginx service on the cloud host and forwarded to the remote application service request of the FRP client; the remote intelligent terminal is not connected to the local area network; specifically, the cloud host has an Internet IP address, and a communication channel including this Internet IP address is established between the host and the cloud host; the application of the remote intelligent terminal sends a remote application service request through the Internet, the Nginx service on the cloud host receives and forwards the remote application service request to the FRP server, and the FRP server forwards the remote application service request to the FRP client through the communication channel for the FRP client on the host to receive the remote application service request; in some preferred implementation manners, the communication channel can be kept active through heartbeat synchronization to prevent the communication channel from timing out and disconnecting.

[0080] Step 402, in response to receiving the remote application service request, perform data exchange of the application on the remote intelligent terminal through the application service.

[0081] In this embodiment, after the FRP client on the host receives the remote application service request sent by the remote intelligent terminal, it forwards the remote application service request to the application service, parses the remote application service request through the application service to obtain the request content of the remote application service request, calls the corresponding processing logic according to the request content of the remote application service request, and performs data exchange of the application on the remote intelligent terminal. By adopting the FRP technology, the application service in the local area network is exposed to the Internet, realizing data communication between intelligent terminals in different local area networks and expanding the application scenario of the multi-device communication method.

[0082] Further referring to Figure 5 , which shows the flow 500 of the third embodiment of the multi-device communication method. In this embodiment, an application background control service is further set on the host, and the flow 500 further includes:

[0083] Step 501, receive the remote control service request forwarded by the FRP server on the cloud host through the FRP client;

[0084] In this embodiment, the execution subject on which the multi-device communication method runs (such as Figure 1The server shown can receive the remote control service request forwarded by the FRP server on the cloud host through the FRP client; the remote control service request is accessed by the remote administrator through the domain name, and the Nginx service on the cloud host receives and forwards it to the FRP server for the FRP server to forward it to the remote control service request of the FRP client through the communication channel; specifically, the operation administrator can access the cloud host through the domain name and access the application background control service on the host in the local area network through the communication channel.

[0085] Step 502, in response to receiving the remote control service request, control the application of the intelligent terminal through the application background control service.

[0086] In this embodiment, after the FRP client receives the remote control service request, it forwards the remote control service request to the application background control service, parses the remote control service request through the application background control service to obtain the request content of the remote control service request, and controls the application of the intelligent terminal corresponding to the remote control service request according to the request content of the remote control service request.

[0087] In this embodiment, by adopting the FRP technology, the application background control service in the local area network is exposed to the Internet, which is convenient for the operation administrator to access the application background control service through the domain name, realizes the operation management of the applications of intelligent terminals in different local area networks, and improves the convenience of operation management of the applications of intelligent terminals in different local area networks.

[0088] Further refer to Figure 6 , which shows the flow 600 of the fourth embodiment of the multi-device communication method according to the present application. This multi-device communication method is applied to at least one intelligent terminal; the at least one intelligent terminal communicates with the host through the local area network, and the method includes:

[0089] Step 601, monitor the UDP broadcast message in the local area network and establish a connection with the host according to the UDP broadcast message; an application service is set on the host.

[0090] In this embodiment, the execution subject on which the multi-device communication method runs (such as Figure 1The terminal device shown can monitor UDP broadcast messages in the local area network through the prior art; the UDP broadcast message at least includes one of the following: the service port of the host and the IP address of the host in the local area network; the service port of the host at least includes: the port of the application service; when the intelligent terminal monitors the UDP broadcast message in the local area network, it determines the network location of the host in the local area network according to the IP address in the UDP broadcast message, locates the host; and, according to the port of the application service in the UDP broadcast message, establishes a data transmission channel with the application service in the host, and requests the port of the application service according to the TCP or HTTP protocol.

[0091] Step 602, send an application service request to the host, so that after the host receives the application service request, data exchange of the application for the intelligent terminal is performed through the application service.

[0092] In this embodiment, the application on the intelligent terminal can send an application service request to the port of the application service of the host, so that after the port of the application service of the host receives the application service request, the application service parses the application service request to obtain the request content of the application service request, and calls the corresponding processing logic according to the request content of the application service request to perform data exchange of the application for the intelligent terminal.

[0093] The multi-device communication method applied to at least one intelligent terminal provided in the above embodiments of the present application automatically establishes a connection with the host by monitoring UDP broadcast messages in the local area network, without manually configuring the IP address of each intelligent terminal one by one, realizing automatic search for application services in the local area network; after automatically connecting to the host, an application service request can be sent to the host, so that the host receives the application service request and performs data exchange of the application for the intelligent terminal through the application service. This method greatly reduces the time and labor costs of data communication of the intelligent terminal and improves the data communication efficiency of the intelligent terminal.

[0094] According to the embodiments of the present application, the present application also provides an electronic device and a readable storage medium.

[0095] As Figure 7As shown, it is a block diagram of an electronic device for a multi-device communication method according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present application described and / or claimed herein.

[0096] As Figure 7 shown, the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting the components, including a high-speed interface and a low-speed interface. Each component is interconnected using different buses and can be installed on a common motherboard or otherwise as needed. The processor can process instructions executed within the electronic device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if needed, multiple processors and / or multiple buses can be used with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, each device providing part of the necessary operations (such as, as a server array, a set of blade servers, or a multi-processor system). Figure 7 Here, one processor 701 is taken as an example.

[0097] The memory 702 is the non-transitory computer-readable storage medium provided by the present application. Among them, the memory stores instructions executable by at least one processor, so that at least one processor executes the multi-device communication method provided by the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, and the computer instructions are used to cause the computer to execute the multi-device communication method provided by the present application.

[0098] The memory 702, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules corresponding to the multi-device communication method in the embodiments of the present application. The processor 701 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 702, that is, implements the multi-device communication method in the above method embodiments.

[0099] The memory 702 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the electronic device of the multi-device communication method, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 702 optionally includes a memory remotely provided with respect to the processor 701, and these remote memories may be connected to the electronic device of the multi-device communication method through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0100] The electronic device of the multi-device communication method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703, and the output device 704 may be connected through a bus or other means. Figure 7 Taking the connection through the bus as an example.

[0101] The input device 703 may receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the electronic device of the multi-device communication method, such as input devices like a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 704 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor), etc. The display device may include but is not limited to a liquid crystal display (LCD), a light-emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0102] Various embodiments of the systems and techniques described herein may be implemented in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application-specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor may be a dedicated or general-purpose programmable processor, and may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0103] These computing procedures (also known as programs, software, software applications, or code) include machine instructions for a programmable processor and can implement these computing procedures using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., magnetic disks, optical disks, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0104] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic, speech, or tactile input).

[0105] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0106] A computer system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on respective computers and having a client-server relationship to each other.

[0107] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in an order different from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0108] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or may exist alone without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the device is caused to: perform UDP broadcast through the local area network so that the intelligent terminal establishes a connection with the host after receiving the UDP broadcast message; in response to receiving an application service request from the intelligent terminal, perform application data exchange with the intelligent terminal through the application service; or, listen for UDP broadcast messages in the local area network and establish a connection with the host according to the UDP broadcast messages; an application service is provided on the host; send an application service request to the host so that after the host receives the application service request, perform application data exchange with the intelligent terminal through the application service.

[0109] The above description is only a preferred embodiment of the present application and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, technical solutions formed by mutually replacing the above features with (but not limited to) technical features having similar functions disclosed in the present application.

Claims

1. A multi-device communication method, characterized in that, Applied to the host side, the following are set on the host: application services; the host communicates with at least one intelligent terminal through a local area network, and the method includes: Conduct UDP broadcast through the local area network so that the intelligent terminal can establish a connection with the host after receiving the UDP broadcast message; In response to receiving the application service request from the intelligent terminal, conduct application data exchange with the intelligent terminal through the application service.

2. The method according to claim 1, characterized in that, There are multiple application service requests. The following is also set on the host: an application background control service. Then, in response to receiving the application service request from the intelligent terminal, conducting application data exchange with the intelligent terminal through the application service includes: In response to receiving the application service request from the intelligent terminal, obtain the running mode of the application corresponding to each application service request through the application background control service; Determine the first data exchange order corresponding to each application service request according to the running mode; Through the application service, conduct application data exchange with each intelligent terminal in turn according to the first data exchange order.

3. The method according to claim 1, wherein The application service requests are sent by different types of applications. Then, in response to receiving the application service request from the intelligent terminal, conducting application data exchange with the intelligent terminal through the application service includes: In response to receiving the application service request from the intelligent terminal, determine the type of the application corresponding to each application service request through the application service; Determine the second data exchange order corresponding to each application service request according to the type of the application; Through the application service, conduct application data exchange with each intelligent terminal in turn according to the second data exchange order.

4. The method according to claim 1, characterized in that, The local area network is connected to the Internet. A communication channel is established between the host and a cloud host through the Internet. An FRP server and an Nginx service are set on the cloud host. An FRP client is also set on the host. The method further includes: Receive the remote application service request forwarded by the FRP server on the cloud host through the FRP client; In response to receiving the remote application service request, conduct application data exchange with the remote intelligent terminal through the application service; where The remote intelligent terminal is not connected to the local area network; the remote application service request is sent by the remote intelligent terminal, received by the Nginx service on the cloud host and forwarded to the FRP server, so that the FRP server can forward it to the FRP client through the communication channel as a remote application service request.

5. The method according to claim 1, wherein The local area network is connected to the Internet. A communication channel is established between the host and a cloud host through the Internet. An FRP server and an Nginx service are set on the cloud host. An FRP client and an application background control service are also set on the host. The method further includes: Receive the remote control service request forwarded by the FRP server on the cloud host through the FRP client; In response to receiving the remote control service request, control the application of the intelligent terminal corresponding to the remote notification service request through the application background control service; where The remote control service request is received by the Nginx service on the cloud host and forwarded to the FRP server, so that the FRP server forwards it to the remote control service request of the FRP client through the communication channel.

6. The method according to claim 1, wherein An application background control service is also set on the host; after establishing a connection with the intelligent terminal and before receiving the application service request of the intelligent terminal, the method further includes: Obtaining the status of the intelligent terminal through the application background control service, and controlling the application of the intelligent terminal according to the status of the intelligent terminal.

7. The method according to claim 1, wherein Performing UDP broadcast through the local area network, so that after the intelligent terminal receives the UDP broadcast message, it establishes a connection with the host, including: Encrypting the UDP broadcast message using a preset encryption algorithm; Broadcasting the encrypted UDP broadcast message through the local area network UDP, so that the intelligent terminal receives the encrypted UDP broadcast message, decrypts the encrypted UDP broadcast message using the encryption algorithm, and establishes a connection with the host according to the decrypted UDP broadcast message.

8. A multi-device communication method, characterized in that, Applied to at least one intelligent terminal; the at least one intelligent terminal communicates with the host through the local area network, and the method includes: Listening for UDP broadcast messages in the local area network and establishing a connection with the host according to the UDP broadcast messages; an application service is set on the host. Sending an application service request to the host, so that after the host receives the application service request, data exchange of the application for the intelligent terminal is performed through the application service.

9. An electronic device, characterized in that, Including: One or more processors; A memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7 or the method according to claim 8.

10. A computer-readable storage medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method according to any one of claims 1 to 7 or the method according to claim 8.