One-way connection methods, equipment, media and products

By generating private topics, the first terminal and the second terminal establish a one-way connection, solving the problem of confusing requests of multiple terminals and improving the success rate of connection and parameter configuration.

CN119485793BActive Publication Date: 2025-08-15TAIYUAN CITY FENGXING MEASUREMENT & CONTROL TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411896669.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-08-15
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

In the prior art, when multiple terminals simultaneously send a one-way connection request to the first terminal, the connection request is confusing, resulting in a low success rate of one-way connection and parameter configuration or modification success rate.

Method used

The first terminal generates a private topic (third topic and fourth topic), establishes a one-way connection with the second terminal, and uses instructions to instruct the second terminal to publish a message through the fourth topic, and the first terminal responds to the message through the third topic to ensure the privacy and success rate of the connection.

Benefits of technology

Improve the success rate of one-way connection and the success rate of parameter configuration or modification, avoiding the influence of other terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119485793B_ABST
    Figure CN119485793B_ABST
Patent Text Reader

Abstract

The present application discloses a one-way connection method, device, medium, and product, relating to the field of communication technology. The method includes: upon receiving a one-way connection request, checking the current connection status of a first terminal; generating a one-way connection request by a second terminal to request establishment of a one-way connection with the first terminal via a publicly known topic, wherein the publicly known topic includes a first topic and a second topic; when the connection status is idle, generating a private topic, wherein the private topic includes a third topic and a fourth topic, wherein the third topic and the fourth topic are different from the first topic and the second topic; generating a usage instruction based on the third topic and the fourth topic, for instructing the second terminal to publish a message using the fourth topic and the first terminal to reply to a message using the third topic; and sending a usage instruction to the second terminal, thereby enabling the second terminal to establish a one-way connection with the first terminal via the third topic and the fourth topic. The present application improves the success rate of one-way connections, thereby improving the success rate of parameter configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a one-way connection method, device, medium and product. Background Art

[0002] One-way connections are generally used for remote modification or configuration. For example, the parameters of the first terminal can be modified or configured through the second terminal. The second terminal is a nearby terminal, and the user can establish a one-way connection with the first terminal through the client installed on it. The first terminal can be a remote computer, server or any device in the network, and the second terminal can remotely configure or modify the parameters of the first terminal through network communication.

[0003] Currently, most one-way connections are implemented through the MQTT communication protocol, and remote configuration or modification is performed after the connection is successful. The process is as follows: the first terminal requests to subscribe to the first topic, the second terminal requests to subscribe to the second topic, the MQTT server stores the first topic and the second topic, and the MQTT server provides message forwarding function through the first topic and the second topic; the second terminal sends a one-way connection request to the MQTT server, and the one-way connection request carries the first topic, the second topic and configuration parameters; the MQTT server forwards the one-way connection request to the first terminal that has subscribed to the first topic; after receiving the one-way connection request, the first terminal configures or modifies the relevant parameters of the first terminal according to the configuration parameters.

[0004] As can be seen from the foregoing, the prior art suffers from at least the following technical issues: when multiple second terminals simultaneously send unidirectional connection requests to a first terminal, the unidirectional connection requests received by the first terminal may be confused. For example, if second terminal A requests to connect to the first terminal to modify parameter a, and second terminal B simultaneously requests to connect to the first terminal to also modify parameter a, at least one of the connection requests from first terminal A or second terminal B will fail, and of course, the request to modify parameter a will also fail. Clearly, the prior art has a low success rate for both unidirectional connections and parameter configuration or modification. Summary of the Invention

[0005] The purpose of this application is to provide a one-way connection method, device, medium and product to solve the problems described in the background technology.

[0006] To achieve the above objectives, this application provides the following solutions:

[0007] In a first aspect, the present application provides a unidirectional connection method, applied to a first terminal, comprising:

[0008] receiving a one-way connection request, the one-way connection request being generated by the second terminal and being used to request establishment of a one-way connection with the first terminal through a well-known topic, the well-known topic including a first topic and a second topic;

[0009] In response to the unidirectional connection request, checking a current connection status of the first terminal itself;

[0010] When the connection state is an idle state, generating a private topic, the private topic including a third topic and a fourth topic, the third topic and the fourth topic being different from the first topic and the second topic, and the idle state is used to indicate that the first terminal is not connected to any terminal;

[0011] Generate a usage instruction based on the third topic and the fourth topic, wherein the usage instruction is used to instruct the second terminal to publish a message using the fourth topic, and the first terminal to reply a message to the second terminal using the third topic;

[0012] The use instruction is sent to the second terminal, so that the second terminal establishes a one-way connection with the first terminal through the third theme and the fourth theme.

[0013] Optionally, after sending the use instruction to the second terminal, the method further includes:

[0014] Sending a third topic subscription request to a one-way connection server; wherein the one-way connection server is configured to: receive a configuration request generated by the second terminal, and send the configuration request to the first terminal subscribed to the third topic, the configuration request carrying the third topic and configuration content, and the configuration request being used to request configuration parameters of the first terminal;

[0015] The configuration request is received, and configuration is performed based on the configuration content.

[0016] Optionally, the configuration request further carries the fourth topic. After receiving the configuration request and performing configuration based on the configuration content, the method further includes:

[0017] When the first terminal is successfully configured, a configuration success reminder is generated and sent to the one-way connection server; wherein, the configuration success reminder carries the third topic and the fourth topic; the one-way connection server is also used to send the configuration success reminder to the second terminal subscribed to the fourth topic, so that the second terminal knows that the first terminal subscribed to the third topic is successfully configured.

[0018] Optionally, after receiving the configuration request and performing configuration based on the configuration content, the method further includes:

[0019] If the configuration is successful, the unidirectional connection between the second terminal and the first terminal is disconnected, and the third topic and the fourth topic are released.

[0020] Optionally, the connection state further includes non-idle. Then, after checking the current connection state of the first terminal itself, the method further includes:

[0021] When the connection state is non-idle, a non-idle state reminder is generated and sent to a one-way connection server, so that the one-way connection server forwards the non-idle state reminder to the second terminal.

[0022] Optionally, after generating a non-idle state reminder and sending the non-idle state reminder to a one-way connection server, the method further includes:

[0023] Obtaining a timestamp carried by a third terminal when interacting with the first terminal most recently, where the third terminal is a terminal that is connected to the first terminal at that time;

[0024] Monitoring the interval between the timestamp and the current time;

[0025] When the interval duration is greater than a predetermined duration, the unidirectional connection between the third terminal and the first terminal is disconnected.

[0026] In a second aspect, the present application provides a unidirectional connection method, applied to a second terminal, comprising:

[0027] Sending a one-way connection request, wherein the one-way connection request is used to request establishment of a one-way connection with the first terminal through a publicly known topic, and causing the first terminal to generate a private topic and forward the private topic to the second terminal through a one-way connection server, wherein the publicly known topic includes the first topic and the second topic, and the private topic includes the third topic and the fourth topic;

[0028] receiving the third topic and the fourth topic forwarded by the one-way connection server;

[0029] Sending a subscription request to the one-way connection server to subscribe to the fourth topic;

[0030] Generate a configuration request and send the configuration request to the one-way connection server, the configuration request carrying the third topic, the fourth topic and configuration content, the configuration request is used to request the first terminal to subscribe to the fourth topic according to the configuration content.

[0031] In a third aspect, the present application provides a terminal device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the methods described in the first aspect above.

[0032] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.

[0033] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the methods in the first aspect.

[0034] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0035] The one-way connection method based on the one-way connection server provided in the embodiment of the present application generates new topics, namely the private topics, the third topic and the fourth topic, after the first terminal receives the one-way connection request. The private topic is different from the publicly known topic. The private topic is only known to the first terminal and the second terminal, and is unknown to other terminals. Therefore, the first terminal and the second terminal can use these two private topics to perform a one-way connection without being affected by other terminals, thereby improving the success rate of the one-way connection, and further improving the success rate of parameter configuration or modification. With the prior art, each second terminal uses a publicly known topic when performing a one-way connection with the first terminal, which is easily affected by other terminals, resulting in the failure of the one-way connection. Therefore, compared with the prior art, the one-way connection method provided in the embodiment of the present application can improve the success rate of the one-way connection, and further improve the success rate of parameter configuration or modification. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 This is an application environment diagram of a one-way connection method in one embodiment of the present application;

[0038] Figure 2 A schematic diagram of a flow chart of a one-way connection method provided in one embodiment of the present application;

[0039] Figure 3 A flowchart of a method for configuring based on a unidirectional connection provided in one embodiment of the present application;

[0040] Figure 4 A flowchart of a method for configuring based on a unidirectional connection provided in another embodiment of the present application;

[0041] Figure 5A schematic diagram of a flow chart of a one-way connection method provided in one embodiment of the present application;

[0042] Figure 6 A schematic flow chart of a one-way connection method provided in another embodiment of the present application;

[0043] Figure 7 A schematic flow chart of a one-way connection method provided in another embodiment of the present application;

[0044] Figure 8 A schematic flow chart of a one-way connection method provided in another embodiment of the present application;

[0045] Figure 9 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0047] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0048] The one-way connection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the application environment includes a first terminal, a second terminal and a one-way connection server. Among them, the first terminal and the second terminal both communicate with the one-way connection server through the network. The data storage system can store the data that the one-way connection server needs to process. The data storage system can be set up separately, or it can be integrated on the one-way connection server, or it can be placed on the cloud or other servers. The second terminal can send a connection request to the one-way connection server, which is then forwarded to the first terminal by the one-way connection server. The first terminal is the terminal that needs to be connected, and after being connected, the second terminal can request to modify the configuration parameters of the first terminal. The one-way connection server can feed back the connection results and configuration results to the second terminal.

[0049] The first terminal is a terminal device that can be connected to multiple second terminals, such as a smart meter. Second terminals can include, but are not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart car devices. Portable wearable devices can include smart watches, smart bracelets, and head-mounted devices. The one-way connection server can be implemented as a standalone server or a server cluster consisting of multiple servers, or even a cloud server.

[0050] In an exemplary embodiment, Figure 2 As shown, a one-way connection method is provided, which is applied to Figure 1 In the environment shown, the first terminal executes the following steps 201 to 205:

[0051] Step 201: A first terminal receives a one-way connection request, where the one-way connection request is generated by a second terminal and is used to request establishment of a one-way connection with the first terminal via a well-known topic, where the well-known topic includes a first topic and a second topic.

[0052] Among them, the first terminal subscribes to the first topic, and the second terminal subscribes to the second topic. The first terminal and the second terminal will first send the message that needs to be sent to each other to the one-way connection server, and carry the first topic and the second topic in the message, and then the one-way connection server will forward it to the other party according to the first topic and the second topic.

[0053] In an embodiment of the present application, a one-way connection request is generated by the second terminal and sent to a one-way connection server. The one-way connection server stores a first topic and a second topic. Upon receiving a message carrying the first topic and the second topic, the one-way connection server determines the topic to which the terminal that published the message is subscribed. In the present application, if the message is published by the second terminal that has subscribed to the second topic, then the first terminal that has subscribed to the first topic is the message recipient. Therefore, the one-way connection request will not be forwarded to the second terminal, but will be forwarded to the first terminal. This shows that the one-way connection server acts as a one-way connection bridge between the second terminal and the first terminal.

[0054] Among them, the publicly known topic is a topic that can be known by any terminal.

[0055] Furthermore, the one-way connection server may be a Message Queuing Telemetry Transport (MQTT) server.

[0056] In this application, each first terminal can establish a unidirectional connection with multiple second terminals. The first terminal can be a PLC, an intelligent data collection gateway, a smart meter, etc., and the first terminal has a first client installed. The second terminal has a second client installed. The second client establishes a unidirectional connection with a unidirectional connection server through the second terminal, and the unidirectional connection server then establishes a unidirectional connection with the first terminal through the first client.

[0057] For example, let's assume the first terminal is a smart meter and the second terminal is a mobile phone. Assuming the smart meter is for a household in a building, each household resident can install the second client on their mobile phone and establish a one-way connection with the one-way connection server and the first terminal through the second client to modify the parameters of the smart meter. For example, the automatic renewal amount can be modified. For example, before the modification, when the remaining balance of the household's electricity is 10 yuan, the automatic renewal amount is 50 yuan. After the modification, when the remaining balance of the household's electricity is 10 yuan, the automatic renewal amount is 100 yuan. Of course, another user in the household can also modify the parameters of the smart meter through the client on their mobile phone.

[0058] Step 202: In response to the unidirectional connection request, the first terminal checks its current connection status.

[0059] The any terminal is any terminal that may establish a unidirectional connection with the first terminal.

[0060] Of course, the connection status may be idle or non-idle. Non-idle means that the first terminal is connected to a certain terminal at the current time.

[0061] Step 203: When the connection state is an idle state, the first terminal generates a private topic, the private topic includes a third topic and a fourth topic, the third topic and the fourth topic are different from the first topic and the second topic, and the idle state is used to indicate that the first terminal is not connected to any terminal.

[0062] Among them, the private topic is a topic that only the first terminal and the second terminal know each other, and no other terminal knows the topic. Therefore, after generating the private topic, the first terminal and the second terminal can establish a one-way connection through the third topic and the fourth topic, and will not be affected by other terminals.

[0063] The fact that the third theme and the fourth theme are different from the first theme and the second theme can be understood as: the third theme, the fourth theme, the first theme, and the second theme are all different from each other.

[0064] Step 204: Based on the third topic and the fourth topic, the first terminal generates a usage instruction, wherein the usage instruction is used to instruct the second terminal to publish a message using the fourth topic, and the first terminal to reply a message to the second terminal using the third topic.

[0065] After the first terminal generates the third and fourth topics, it is necessary to assign these two topics to the first and second terminals to clarify the users of the two topics and avoid confusion during use. In this application, the user of the third topic is the first terminal, and the user of the fourth topic is the second terminal. Therefore, the second terminal uses the fourth topic to publish a message, and the first terminal uses the third topic to reply to the second terminal.

[0066] Step 205: The first terminal sends the use instruction to the second terminal, so that the second terminal establishes a one-way connection with the first terminal through the third theme and the fourth theme.

[0067] After the usage instruction is generated, it still needs to be forwarded to the second terminal via the one-way connection server. Therefore, step 205 may specifically be: the first terminal sends the usage instruction to the one-way connection server, and the one-way connection server forwards the usage instruction to the second terminal.

[0068] The one-way connection method based on the one-way connection server provided in the embodiment of the present application generates new topics, namely the private topics, the third topic and the fourth topic, after the first terminal receives the one-way connection request. The private topic is different from the publicly known topic. The private topic is only known to the first terminal and the second terminal, and is unknown to other terminals. Therefore, the first terminal and the second terminal can use these two private topics to perform a one-way connection without being affected by other terminals, thereby improving the success rate of the one-way connection, and further improving the success rate of parameter configuration or modification. With the prior art, each second terminal uses a publicly known topic when performing a one-way connection with the first terminal, which is easily affected by other terminals, resulting in the failure of the one-way connection. Therefore, compared with the prior art, the one-way connection method provided in the embodiment of the present application can improve the success rate of the one-way connection, and further improve the success rate of parameter configuration or modification.

[0069] Alternatively, see Figure 3 In another exemplary embodiment of the present application, after step 205, the method further includes the following steps 301 to 304:

[0070] Step 301: The first terminal sends a third topic subscription request to the one-way connection server.

[0071] After the second terminal receives the third theme and the fourth theme, it can use the third theme and the fourth theme to establish a one-way connection with the first terminal to configure the first terminal.

[0072] Before configuring the first terminal, the first terminal needs to subscribe to the third topic. After the first terminal subscribes to the third topic, the one-way connection server will forward any received message containing the third topic to the first terminal, including the configuration request sent by the second terminal.

[0073] Step 302: The second terminal generates a configuration request and sends the configuration request to the one-way connection server. The configuration request carries the third topic and configuration content. The configuration request is used to request configuration of parameters of the first terminal.

[0074] Step 303: The one-way connection server receives the configuration request and sends the configuration request to the first terminal that subscribes to the third topic.

[0075] Step 304: The first terminal receives the configuration request and configures the first terminal based on the configuration content.

[0076] Alternatively, see Figure 4 In another exemplary embodiment of the present application, the configuration request also carries the fourth topic. Then, after step 304, the method further includes the following steps 401 to 403:

[0077] Step 401: The second terminal sends a subscription request for subscribing to the fourth topic to the one-way connection server.

[0078] After the second terminal subscribes to the fourth topic, the one-way connection server will forward any received message containing the fourth topic to the second terminal.

[0079] Step 402: When the first terminal is successfully configured, the first terminal generates a configuration success reminder and sends it to the one-way connection server. The configuration success reminder carries the third theme and the fourth theme.

[0080] In step 403, the one-way connection server sends the configuration success reminder to the second terminal that subscribes to the fourth topic, so that the second terminal knows that the configuration of the first terminal that subscribes to the third topic is successful.

[0081] Alternatively, see Figure 3 In another exemplary embodiment of the present application, after step 304, the method further includes the following step 501:

[0082] Step 501: If the configuration is successful, the first terminal disconnects the one-way connection between the second terminal and the first terminal, and releases the third topic and the fourth topic.

[0083] Timely disconnection of the unidirectional connection between the first terminal and the second terminal allows other terminals that need to establish a unidirectional connection with the first terminal to also perform the unidirectional connection establishment operation in a timely manner, thereby ensuring smooth operation of each terminal and improving unidirectional connection efficiency.

[0084] Since the third and fourth topics are temporarily used to establish a one-way connection between the first terminal and the second terminal to perform configuration operations, when the configuration is successful, the third and fourth topics are released in time to reduce the space occupied by the first terminal, the second terminal and the one-way connection server.

[0085] Alternatively, see Figure 5 In another exemplary embodiment of the present application, the connection state further includes non-idle. Then, after step 202, the method further includes the following step 601:

[0086] Step 601: When the connection state is non-idle, the first terminal generates a non-idle state reminder and sends the non-idle state reminder to a one-way connection server, so that the one-way connection server forwards the non-idle state reminder to the second terminal.

[0087] Step 601 allows the second terminal to promptly learn the connection status of the first terminal, so that when the first terminal is in a non-idle state, the second terminal can perform other operations as needed, such as continuing to wait until the first terminal is in an idle state and then sending a new unidirectional connection request.

[0088] Alternatively, see Figure 6 In another exemplary embodiment of the present application, after step 601, the method further includes the following steps 701 to 703:

[0089] Step 701: The first terminal obtains a timestamp carried by a third terminal when interacting with the first terminal most recently. The third terminal is a terminal that is connected to the first terminal at that time.

[0090] The timestamp is the time when the most recent interaction started.

[0091] Step 702: The first terminal monitors the interval between the timestamp and the current time.

[0092] Step 703: When the interval duration is greater than a predetermined duration, the first terminal disconnects the unidirectional connection between the third terminal and the first terminal.

[0093] The predetermined duration may be an empirical value, for example, 5 minutes.

[0094] When the time interval is greater than the predetermined time length, it indicates that the third terminal and the first terminal have not communicated for a long time, and it is considered that the third terminal no longer needs to communicate with the first terminal, so the third terminal can be disconnected.

[0095] Alternatively, see Figure 7 In another exemplary embodiment of the present application, before step 201, the method further includes steps 801 to 803:

[0096] Step 801: The second terminal generates a one-way connection request, where the one-way connection request carries a first topic subscribed by the first terminal and a second topic subscribed by the second terminal.

[0097] Step 802: The second terminal sends the one-way connection request to a one-way connection server.

[0098] Step 803: The one-way connection server forwards the one-way connection request to the first terminal subscribed to the first topic, so that the first terminal knows that the second terminal subscribed to the second topic requests to establish a one-way connection.

[0099] Before generating the new third topic and the fourth topic, the first terminal and the second terminal need to establish a one-way connection based on the well-known first topic and the second topic. Only after the one-way connection is established can the new topic be generated.

[0100] Alternatively, see Figure 8 In another exemplary embodiment of the present application, another unidirectional connection method is provided, which is applied to a second terminal and includes the following steps 901 to 904:

[0101] Step 901: Send a one-way connection request, wherein the one-way connection request is used to request establishment of a one-way connection with a first terminal via a publicly known topic, causing the first terminal to generate a private topic and forward the private topic to the second terminal via a one-way connection server. The publicly known topics include a first topic and a second topic, and the private topics include a third topic and a fourth topic.

[0102] Step 902: Receive the third topic and the fourth topic forwarded by the one-way connection server;

[0103] Step 903: Send a subscription request for subscribing to the fourth topic to the one-way connection server;

[0104] Step 904: Generate a configuration request and send the configuration request to the one-way connection server. The configuration request carries the third topic, the fourth topic and configuration content. The configuration request is used to request the first terminal to subscribe to the fourth topic according to the configuration content.

[0105] In an exemplary embodiment, a terminal device is provided, and the internal structure diagram of the terminal device can be as follows: Figure 9 As shown. The terminal device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the terminal device is used to store one-way connection related data. The input / output interface of the terminal device is used to exchange information between the processor and an external device. The communication interface of the terminal device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a one-way connection method is implemented.

[0106] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal device to which the solution of the present application is applied. The specific terminal device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0107] In an exemplary embodiment, a terminal device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the embodiments of the above methods performed by the first terminal are implemented.

[0108] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the steps performed by the first terminal in the above-mentioned method embodiments are implemented.

[0109] In an exemplary embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps performed by the first terminal in the above-mentioned method embodiments are implemented.

[0110] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0111] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0112] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.

[0113] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0114] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A one-way connection method, characterized in that: Applied to the first terminal, including: receiving a one-way connection request, the one-way connection request being generated by the second terminal and being used to request establishment of a one-way connection with the first terminal through a well-known topic, the well-known topic including a first topic and a second topic; In response to the unidirectional connection request, checking a current connection status of the first terminal itself; When the connection state is an idle state, generating a private topic, the private topic including a third topic and a fourth topic, the third topic and the fourth topic being different from the first topic and the second topic, the idle state being used to indicate that the first terminal is not in a state of interacting with other terminals; Generate a usage instruction based on the third topic and the fourth topic, wherein the usage instruction is used to instruct the second terminal to publish a message using the fourth topic, and the first terminal to reply a message to the second terminal using the third topic; The use instruction is sent to the second terminal, so that the second terminal establishes a one-way connection with the first terminal through the third theme and the fourth theme.

2. The one-way connection method according to claim 1, characterized in that: After sending the use instruction to the second terminal, the method further includes: Sending a third topic subscription request to a one-way connection server; wherein the one-way connection server is configured to: receive a configuration request generated by the second terminal, and send the configuration request to the first terminal subscribed to the third topic, the configuration request carrying the third topic and configuration content, and the configuration request being used to request configuration parameters of the first terminal; The configuration request is received, and configuration is performed based on the configuration content.

3. The one-way connection method according to claim 2, characterized in that: If the configuration request also carries the fourth topic, then after receiving the configuration request and performing configuration based on the configuration content, the method further includes: When the first terminal is successfully configured, a configuration success reminder is generated and sent to the one-way connection server; wherein, the configuration success reminder carries the third topic and the fourth topic; the one-way connection server is also used to send the configuration success reminder to the second terminal subscribed to the fourth topic, so that the second terminal knows that the first terminal subscribed to the third topic is successfully configured.

4. The one-way connection method according to claim 2, characterized in that: After receiving the configuration request and performing configuration based on the configuration content, the method further includes: If the configuration is successful, the unidirectional connection between the second terminal and the first terminal is disconnected, and the third topic and the fourth topic are released.

5. The one-way connection method according to claim 1, characterized in that: If the connection state further includes non-idle, then after checking the current connection state of the first terminal itself, the method further includes: When the connection state is non-idle, a non-idle state reminder is generated and sent to a one-way connection server, so that the one-way connection server forwards the non-idle state reminder to the second terminal.

6. The one-way connection method according to claim 5, characterized in that: After generating a non-idle state reminder and sending the non-idle state reminder to the one-way connection server, the method further includes: Obtaining a timestamp carried by a third terminal when interacting with the first terminal most recently, where the third terminal is a terminal that is connected to the first terminal at that time; Monitoring the interval between the timestamp and the current time; When the interval duration is greater than a predetermined duration, the unidirectional connection between the third terminal and the first terminal is disconnected.

7. A one-way connection method, characterized in that: Applied to the second terminal, including: Sending a one-way connection request to a first terminal, the one-way connection request being used to request establishment of a one-way connection with the first terminal via a publicly known topic, causing the first terminal to check its current connection status, generate a private topic when the connection status is idle, and forward the private topic to the second terminal via a one-way connection server, wherein the publicly known topics include a first topic and a second topic, the private topics include a third topic and a fourth topic, the third topic and the fourth topic being different from the first topic and the second topic, and the idle state being used to indicate that the first terminal is not interacting with any other terminal; receiving the third topic and the fourth topic forwarded by the one-way connection server; Sending a subscription request to the one-way connection server to subscribe to the fourth topic; Generate a configuration request and send the configuration request to the one-way connection server, the configuration request carrying the third topic, the fourth topic and configuration content, the configuration request is used to request the first terminal to subscribe to the fourth topic according to the configuration content.

8. A terminal device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the unidirectional connection method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the one-way connection method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the one-way connection method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Information synchronization method and device and related equipment

    CN115776587A

  • Data processing method and device based on block chain and readable storage medium

    CN117220881A