CN118075278A - Data transmission method, device, equipment and medium - Google Patents

Data transmission method, device, equipment and medium Download PDF

Info

Publication number
CN118075278A
CN118075278A CN202410104316.9A CN202410104316A CN118075278A CN 118075278 A CN118075278 A CN 118075278A CN 202410104316 A CN202410104316 A CN 202410104316A CN 118075278 A CN118075278 A CN 118075278A
Authority
CN
China
Prior art keywords
client terminal
opposite side
data
data point
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410104316.9A
Other languages
Chinese (zh)
Inventor
王亚
房玉飞
张振
井洪业
毕然
任琨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Huayun Iot Technology Co ltd
Original Assignee
Shandong Huayun Iot Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Huayun Iot Technology Co ltd filed Critical Shandong Huayun Iot Technology Co ltd
Priority to CN202410104316.9A priority Critical patent/CN118075278A/en
Publication of CN118075278A publication Critical patent/CN118075278A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1046Joining mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a data transmission method, a device, equipment and a medium, and relates to the technical field of data transmission. The data transmission method is applied to the client terminal and comprises the following steps: acquiring first current state information of data points sent by a local side; determining a first pair of side client terminals corresponding to the side transmission data points; the first current state information is transmitted to the first pair of side client terminals through a first communication channel pre-established between the client terminals and the first pair of side client terminals. For the client terminal on the side and the client terminal on the opposite side, which need to carry out data point linkage, the communication channel between the client terminal on the side and the client terminal on the opposite side is established in advance, when the client terminal on the side collects the data needed by the client terminal on the opposite side, the data is directly sent to the client terminal on the opposite side through the communication channel between the client terminal on the side and the client terminal on the opposite side, the acquisition instruction is not required to be issued through a cloud, the data transmission and the operation are not required to be carried out by the cloud, the data synchronization speed is improved, the data point linkage response delay is reduced, and meanwhile the server pressure is also reduced.

Description

Data transmission method, device, equipment and medium
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a data transmission method, apparatus, device, and medium.
Background
In the related art, data transmission among a plurality of client terminals is generally realized by adopting a cloud service architecture, wherein the cloud service architecture comprises a cloud server and a plurality of client terminals, each client terminal and the cloud server are all in communication connection, the cloud server is provided with a cloud platform infrastructure, the cloud server creates a linkage rule through a rule engine, the cloud platform creates each rule created by a cloud computing service processing rule engine, namely, the data of data points of each client terminal are acquired and controlled by issuing acquisition and control instructions to each client terminal, and further linkage of the data points among the plurality of client terminals is realized.
For an application scene with large number of client terminals, multiple data points or multiple linkage rules, when the existing cloud service architecture is adopted to realize data transmission, as communication channels are established between all client terminals and a cloud platform only, all client terminals need to realize data transmission with other opposite client terminals through a cloud, data are acquired and transmitted in a polling mode through the cloud, and the problems of high server pressure, long data acquisition period, low data synchronization speed and high data point linkage response delay exist.
Disclosure of Invention
The application mainly aims to provide a data transmission method, a device, equipment and a medium, and aims to solve the problems that when the existing cloud service architecture realizes data transmission, a cloud side collects data in a polling mode and performs data transmission, the server pressure is high, the data collection period is long, the data synchronization speed is low, and the data point linkage response delay is high.
In order to achieve the above purpose, the application adopts the following technical scheme:
in a first aspect, the present application provides a data transmission method, applied to a client terminal, the method comprising:
acquiring first current state information of data points sent by a local side;
Determining a first pair of side client terminals corresponding to the home side transmitted data points;
And transmitting the first current state information to the first opposite side client terminal through a first communication channel pre-established between the client terminal and the first opposite side client terminal.
In a possible embodiment of the present application, before the step of obtaining the first current state information of the data point sent by the home side, the method further includes:
sending a first communication connection request to a cloud platform, so that the cloud platform responds to the first communication connection request and establishes communication connection with the client terminal;
Sending a file request to the cloud platform so that the cloud platform returns a configuration file corresponding to the client terminal in response to the file request;
analyzing the configuration file to obtain a second terminal identifier of at least one opposite side client terminal;
and establishing a communication channel with each opposite side client terminal according to each second terminal identifier.
In a possible embodiment of the present application, the step of establishing a communication channel with each of the opposite client terminals according to each of the second terminal identifiers includes:
For each opposite-side client terminal, sending a direct communication parameter acquisition request to the cloud platform, so that the cloud platform responds to the direct communication parameter acquisition request to obtain a first request result corresponding to the opposite-side client terminal; wherein the direct communication parameter acquisition request includes a second terminal identifier of the opposite-side client terminal;
For each opposite side client terminal, if the first request result corresponding to the opposite side client terminal is successful, acquiring a second communication password and a second communication parameter of the opposite side client terminal returned by the cloud platform, establishing logic connection with the opposite side client terminal according to the second communication parameter, and sending a second communication connection request to the opposite side client terminal so that the opposite side client terminal returns a second request result corresponding to the opposite side client terminal according to a first terminal identifier and a second communication password in the second communication connection request;
And for each opposite side client terminal, if the second request result corresponding to the opposite side client terminal is successful, establishing direct communication with the opposite side client terminal.
In a possible embodiment of the present application, the step of establishing a communication channel with each of the opposite client terminals according to each of the second terminal identifiers further includes:
And for each opposite side client terminal, if the second request result corresponding to the opposite side client terminal is failure, establishing transfer communication with the opposite side client terminal through the cloud platform.
In a possible embodiment of the present application, the method further includes:
and if the first communication channel does not exist, transmitting a preset transfer identifier, the first current state information, a first terminal identifier of the client terminal and a second terminal identifier of the first opposite-side client terminal to the cloud platform, so that the cloud platform transmits the first current state information to the first opposite-side client terminal.
In a possible embodiment of the present application, the step of transmitting the first current state information to the first opposite-side client terminal through a first communication channel pre-established between the client terminal and the first opposite-side client terminal includes:
judging whether the first current state information meets the reporting rule corresponding to the data point sent by the local side or not according to the reporting rule parameter corresponding to the data point sent by the local side;
And if the reporting rule is met, the first current state information is sent to the first opposite side client terminal through the first communication channel.
In a possible embodiment of the present application, the method further includes:
obtaining a preset action rule according to the configuration file; the preset action rule comprises a local side receiving data point, a preset triggering condition and a preset triggering action, wherein the local side receiving data point is provided with a corresponding second opposite side client terminal;
For each local side received data point, acquiring second current state information of the local side received data point through a second communication channel pre-established between the client terminal and a second opposite side client terminal corresponding to the local side received data point;
and controlling the state of the preset terminal equipment corresponding to the preset trigger action according to the second current state information of each local side received data point and the preset trigger condition.
In a second aspect, the present application further provides a data transmission device configured in a client terminal, where the device includes:
The data acquisition module is used for acquiring first current state information of data points sent by the local side;
a target terminal determining module, configured to determine a first pair of side client terminals corresponding to the home side transmission data points;
and the data transmission module is used for transmitting the first current state information to the first opposite-side client terminal through a first communication channel pre-established between the client terminal and the first opposite-side client terminal.
In a third aspect, the present application also provides a data transmission device, comprising a processor and a memory, the memory having stored thereon a data transmission program which, when executed by the processor, implements the steps of the data transmission method as in the first aspect.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by one or more processors, implements the steps of the data transmission method as in the first aspect.
According to the data transmission method, first current state information of a sending data point of a local side is obtained through a client terminal, a first opposite side client terminal corresponding to the sending data point of the local side is determined, and then the first current state information is sent to the first opposite side client terminal through a first communication channel pre-established between the client terminal and the first opposite side client terminal; for every two client terminals needing to carry out data point linkage, through establishing a communication channel between the client terminals in advance, namely establishing point-to-point communication, when the client terminal on the side (namely the client terminal) collects data required by the client terminal on the opposite side (namely the first client terminal on the opposite side) on the side, the data are directly sent to the client terminal on the opposite side through the communication channel between the client terminal and the client terminal, an acquisition instruction is not required to be issued through a cloud, data transmission and operation are not required to be carried out by the cloud, the data synchronization speed is improved, and after the data are received by the client terminal on the opposite side, the relevant calculation can be carried out on the local side, further the efficiency of further operation of the client terminal on the opposite side according to the data acquired by the client terminal on the side on the opposite side is improved, the data point linkage response delay is reduced, and meanwhile the server pressure is also reduced.
Drawings
Fig. 1 is a schematic structural diagram of a data transmission device in a hardware operating environment according to an embodiment of the present application;
fig. 2 is a flow chart of a first embodiment of the data transmission method of the present application;
fig. 3 is a schematic structural diagram of a client terminal according to the present application;
FIG. 4 is a schematic diagram of the connection between a client terminal and other opposite client terminals according to the present application;
fig. 5 is a schematic block diagram of a data transmission device according to the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, in the present disclosure, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
In the present invention, unless explicitly specified and limited otherwise, the terms "connected," "fixed," and the like are to be construed broadly, and for example, "connected" may be either a fixed connection or a removable connection or integrated; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium; the communication between the two elements can be realized, or the interaction relationship between the two elements can be realized. In addition, in the present invention, suffixes such as "module", "part", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning in themselves. Thus, "module," "component," or "unit" may be used in combination.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature.
The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
In the related art, data transmission among a plurality of client terminals is generally realized by adopting a cloud service architecture, wherein the cloud service architecture comprises a cloud server and a plurality of client terminals, each client terminal and the cloud server are all in communication connection, the cloud server is provided with a cloud platform infrastructure, the cloud server creates a linkage rule through a rule engine, the cloud platform creates each linkage rule created by a cloud computing service processing rule engine, namely, the data of data points of each client terminal are acquired and controlled by issuing acquisition and control instructions to each client terminal, and then linkage of the data points among the plurality of client terminals is realized.
For example, the state of the data point A1 of the client terminal a changes according to the change of the data point B2 of the client terminal B and the data point C3 of the client terminal C, and the data point A1 of the client terminal a is set to the ON state when the value of the data point B2 of the client terminal B is greater than 100 and the value of the data point C3 of the client terminal C is greater than 50. That is, there is a linkage rule: if B2>100 and C3>50, a1=on. It can be seen that the linkage rule includes two conditions and one action, wherein condition one is: the value of data point B2>100, the condition two is the value of data point C3>50, the actions are: setting A1 to the ON state.
The cloud platform has periodicity, and in order to process the linkage rule, data acquisition instructions are required to be sent to the client terminal A, the client terminal B and the client terminal C respectively to obtain the numerical values of the data points A1, B2 and C3, corresponding response information is waited, received and analyzed, and the analyzed data point states and numerical values are stored in the cloud platform. The cloud server rule engine processes the linkage rule, namely: judging whether the first condition is true and judging whether the second condition is true, if the first condition and the second condition are both true, triggering the action to execute, judging whether the numerical value of the data point A1 is ON or not when the action is executed, if yes, not needing to issue a control instruction to the client terminal A, if not, issuing the control instruction to the client terminal A so that the data point A1 of the client terminal A is in an ON state, and updating the numerical value of the A1 cached by the cloud platform to be in the ON state. If one of the first condition and the second condition is false, the condition indicates that the action executing condition is not met, and the action is not executed at the moment.
It can be seen that when the existing method is used for realizing data transmission among a plurality of client terminals, several problems exist: (1) the effective communication data ratio is low: the cloud platform needs to periodically poll and collect data of all data points of all client terminals, and the states of a large number of data points are not changed, so that the collected invalid data has a large duty ratio; (2) high cost: the collection and processing of a large amount of invalid data increases the calculation pressure and the communication pressure, and consumes a large amount of data flow; and (3) the cloud computing pressure is large: all rule processing and operation are processed by a cloud, so that the cloud computing pressure is high; (4) low stability: if the communication between a certain client terminal and the cloud is disconnected, the corresponding linkage is invalid; and (5) the linkage speed is low: all linkage rules are required to be processed sequentially by the cloud platform, the cloud needs to poll the state of each data point sequentially, the acquisition period is long, and the linkage speed is slow; (6) the reaction speed of the regular treatment is low: the cloud server needs to collect data of all condition data points and action data points of all linkage rules and communication delay of multiple complex data interactions between a plurality of client terminals and the cloud platform, so that the rule processing reaction speed is reduced.
Therefore, the application provides a solution, for two-to-two client terminals needing to carry out data point linkage, through pre-establishing a communication channel between the two client terminals, namely creating point-to-point communication, when the client terminal on the side collects the data required by the client terminal on the opposite side, the data are directly sent to the client terminal on the opposite side through the communication channel between the two client terminals, the cloud is not required to issue a collection instruction, the cloud is not required to carry out data transmission and operation, the data synchronization speed is improved, and the client terminal on the opposite side can carry out local relevant calculation (namely edge calculation on the client terminal on the opposite side) after receiving the data, so that the efficiency of further operation of the client terminal on the opposite side according to the data collected by the client terminal on the side on the opposite side is improved, the response delay of data point linkage is reduced, and the server pressure is also reduced.
The inventive concept of the present application is further elucidated below in connection with a few specific embodiments.
The embodiment of the application is as follows, firstly, the data transmission equipment applied in the realization of the technology of the application is described:
As shown in fig. 1, the data transmission apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface, such as a wireless fidelity (WIRELESS FIDELITY, WI-FI) interface. The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the structure shown in fig. 1 does not constitute a limitation of the data transmission device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components.
As shown in fig. 1, an operating system, a data storage module, a network communication module, a user interface module, and a data transmission program may be included in the memory 1005 as one type of storage medium.
In the data transmission device shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the data transmission apparatus of the present application may be provided in a server, and the server calls a data transmission program stored in the memory 1005 through the processor 1001 and executes the data transmission method provided by the embodiment of the present application.
Based on the above hardware structure, but not limited to the above hardware structure, the present application provides a first embodiment of a data transmission method. Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the data transmission method of the present application.
It should be noted that although a logical order is depicted in the flowchart, in some cases the steps depicted or described may be performed in a different order than presented herein.
In this embodiment, the data transmission device may specifically be a client terminal, and the data transmission method provided is applied to the client terminal, where the method includes:
step S200, obtaining first current state information of a data point sent by the current side.
It should be understood that, in the present invention, the client terminals refer to terminal devices used by users, such as personal computers and mobile phones, and each of the client terminals occupies one side of network communication. The local side transmission data point refers to specific data or information which can be transmitted from the client terminal to the cloud, for example, a system state data point of the client terminal and a lower end device data point connected with the client terminal, when the local side transmission data point is the system state data point of the client terminal, the local side transmission data point indicates that the local side transmission data point reflects relevant information of the client terminal.
Step S400, determining a first pair of side client terminals corresponding to the home side transmission data points.
It should be understood that, for any of the home side transmission data points, the number of corresponding first pair of client terminals may be one or more. In this embodiment, the first pair of side client terminals corresponding to the home side sending data point is configured on the cloud platform.
And step S600, transmitting the first current state information to the first opposite side client terminal through a first communication channel pre-established between the client terminal and the first opposite side client terminal.
It can be understood that, because the data point sent by the home side and the first current state information thereof are parameters and parameter values based on whether the first opposite side client terminal determines to perform related operations, the present embodiment establishes a communication channel between the client terminal and the first opposite side client terminal before performing data transmission, and performs data transmission directly through the communication channel after the client terminal obtains the first current state information of the data point sent by the home side, so that a cloud terminal does not need to send related commands to perform data transmission, and the problems that the cloud terminal collects data and performs data transmission in a polling manner, and the server pressure is high, the data collection period is long, the data synchronization speed is slow, and the data point linkage response delay is high can be avoided.
To obtain the first current state information of the local side transmission data point, before the step S200, the method further includes:
step S120, a first communication connection request is sent to a cloud platform, so that the cloud platform establishes communication connection with the client terminal in response to the first communication connection request.
It can be appreciated that the cloud platform can provide services and resources, such as storage space, computing power, etc., and the client terminal can implement functions of data storage, data processing, etc., through the cloud platform, without relying on the performance and storage capacity of the local device. In the actual operation process, the client terminal is connected to the server on the cloud platform through the internet or other networks, the client terminal can send a request to the cloud platform and receive a response or acquire required service from the cloud platform, and the server on the cloud platform can process the request of the client terminal, execute corresponding operation and return a result to the client terminal.
In this embodiment, when the client terminal sends the first communication connection request to the cloud platform, the first communication connection request includes a first terminal identifier of the client terminal, and the cloud platform verifies the identity of the client terminal by sending the first terminal identifier of the client terminal to the cloud platform, so as to ensure data security. When the client terminal and the cloud platform are in communication connection, the first terminal identifier can be used as a unique identification code of the client terminal.
And step 140, sending a file request to the cloud platform so that the cloud platform returns a configuration file corresponding to the client terminal in response to the file request.
It should be understood that after determining a specific application scenario, relevant information of all data points and all linkage rules related to the cloud configuration can be preset or configured in other ways in advance, so as to generate a configuration file corresponding to the client terminal. In this embodiment, the configuration file corresponding to the client terminal includes, but is not limited to, related information of data points sent by the local side of the client terminal and part of linkage rules in all linkage rules, and when the client terminal receives the corresponding configuration file, the configuration file is stored locally in the client terminal.
In an example, the relevant information of the data point sent by the home side includes parameter information, report information and relevant information of the corresponding first pair of side client terminals, the parameter information may include a corresponding device name, a communication interface type, a communication interface number, a communication protocol type, an IP address, a port number, a slave address, a register address, a data type, a data length, a data unit, a data range, and an acquisition frequency (in milliseconds), the report information includes report rule parameters and report rules, the report rule parameters may be change report, report change amplitude (parameter is an amplitude value), report timing (parameter is a unit time), report period (parameter is a period time), report above a threshold (parameter is a threshold), report below a threshold (parameter is a threshold), the report rules may be one or more report rule parameters included in the report rule parameters, when the report rule includes a plurality of report rule parameters, the report rule parameters are in a relationship or are in a unit of milliseconds, that is when the report rule parameters are included in the report rule parameters, that the report rule parameters are preset in the data point are sent to the corresponding side, that the corresponding data point is a preset data point is a corresponding to the first pair of side, and the current state is triggered, and the current state is immediately sent to the first pair of side client terminals.
It can be appreciated that a plurality of linkage rules are configured on the cloud, each linkage rule comprises a condition set and an action set, wherein the condition set comprises at least one condition, and the action set comprises at least one action. And when each condition in the condition sets is met, triggering and executing the corresponding action set. That is, the condition set is true when the and relationship is between the conditions in the condition set, and all the conditions are true. Correspondingly, when the action set triggers execution, each action in the action set is executed in turn.
For example, a certain linkage rule is "if the indoor temperature data point of meter 1 of client terminal a >45 ℃ and the outdoor temperature data point of meter 2 of client terminal B <40 ℃, then the ventilation fan switch of meter 3 of client terminal c=on". It can be seen that, for the client terminal a in the linkage rule, the client terminal C is the first pair of side client terminals corresponding to the indoor temperature data point of the meter 1, and similarly, for the client terminal B in the linkage rule, the client terminal C is also the first pair of side client terminals corresponding to the outdoor temperature data point of the meter 2. When condition 1 (i.e., the indoor temperature data point of meter 1 of client terminal a >45 ℃) and condition 2 (i.e., the outdoor temperature data point of meter 2 of client terminal B <40 ℃) are simultaneously satisfied, execution of an action, i.e., control of ventilation fan switch=on of meter 3, is triggered.
Of course, it will be appreciated that for the set of conditions, each condition in the set of conditions includes a data source (i.e., the home side sent data point, such as the indoor temperature data point of meter 1 of client terminal a), a condition operator (e.g., ">") and a comparison value (e.g., 45 ℃). In this embodiment, the data source included in the condition is a system state data point or a lower-end device data point readable by the client terminal, for the system state data point, the cloud end may be configured to obtain information such as current time, device network state, signal strength, GPS position, CPU occupancy rate, memory occupancy rate, and the like of the data point, and for the lower-end device data point, the cloud end may be configured to obtain information such as a unique identifier of the data point; the conditional operators include arithmetic operators, relational operators, logical operators, and the like; the comparison value is a preset character string or value. Similarly, for the set of actions, each action in the set of actions includes a data source (e.g., a ventilation fan switch of meter 3) and a set point (e.g., ON). In this embodiment, the data source included in the action is a system state data point or a lower-end device data point writable by the client terminal, and the set value is a preset character string or a numerical value.
In this embodiment, for the linkage rule, if the condition included in the linkage rule includes a local side transmission data point of the client terminal, the client terminal corresponding to each action included in the linkage rule is a first opposite side client terminal corresponding to the local side transmission data point. Of course, it is understood that, for other contralateral client terminals, the first contralateral client terminal to which the local side of the client terminal transmits a data point may also be the client terminal.
In addition, in this embodiment, for the client terminal, the client terminal includes a terminal uplink data communication module and a terminal downlink data communication module, as shown in fig. 3, where the terminal uplink data communication module is configured to establish a communication connection with the cloud platform to obtain a corresponding configuration file, and the terminal downlink data communication module is configured to establish a communication connection with a lower device data point to obtain first current state information of the lower device data point and send data to the lower device data point.
Step S160, analyzing the configuration file to obtain a second terminal identification of at least one opposite side client terminal.
It can be understood that if the opposite side client terminal wants to obtain the first current state information of the data point sent by a certain local side of the client terminal, communication connection needs to be established with the cloud platform, based on this, the cloud platform can obtain the second terminal identifiers of other corresponding opposite side client terminals, write the second terminal identifiers into the configuration file of the client terminal, and further obtain the second terminal identifiers of the opposite side client terminal.
Step S180, establishing a communication channel with each of the opposite side client terminals according to each of the second terminal identifiers.
It will be appreciated that, for the client terminal, after the client terminal obtains the identification information of the other opposite client terminal, a communication channel may be established with the other opposite client terminal based thereon.
As a specific embodiment, the step S180 includes:
step S181, for each of the opposite-side client terminals, sending a direct communication parameter acquisition request to the cloud platform, so that the cloud platform responds to the direct communication parameter acquisition request to obtain a first request result corresponding to the opposite-side client terminal; wherein the direct communication parameter acquisition request includes a second terminal identifier of the opposite-side client terminal.
It should be understood that, in order to realize data transmission between the client terminals, after the client terminals establish communication connection with the cloud platform, the client terminals may also send direct communication preparation signals of the client terminals to the cloud platform, so as to indicate that the client terminals are ready for data transmission. As a specific embodiment, before the step S180, and after the step S120, the method further includes: and sending a direct communication preparation signal of the cloud platform to the cloud platform so that the cloud platform stores the direct communication preparation signal into a preset direct communication terminal table. Wherein the direct communication preparation signal comprises related information of the client terminal, the related information comprising the first terminal identification, a first communication password (which may be randomly generated) and a first communication parameter, the first communication parameter comprising an IP address and a port number. Similarly, for other opposite-side client terminals, after the communication connection is established between the client terminals and the cloud platform, the direct communication preparation signal of the client terminals can also be sent to the cloud platform to indicate that the client terminals are ready for data transmission, wherein the direct communication preparation signal of the client terminals comprises a second terminal identifier of the client terminals, a second communication password (which can be randomly generated) and second communication parameters, and the second communication parameters also comprise an IP address and a port number.
Of course, it can be understood that, when the cloud platform receives the second terminal identifier of the opposite side client terminal sent by the client terminal, it can determine whether the cloud end stores the direct communication preparation signal of the opposite side client terminal, and when the cloud end stores the direct communication preparation signal of the opposite side client terminal, the first request result corresponding to the opposite side client terminal is successful, otherwise, the first request result is failed.
Optionally, for each of the opposite-side client terminals, when the first request result corresponding to the opposite-side client terminal is failure, a failure flag may be recorded for creating a direct communication connection between the client terminal and the opposite-side client terminal, so that the client terminal may retry to establish direct communication with the opposite-side client terminal. As a specific embodiment, after a round of direct communication operation with each of the opposite side client terminals is completed, after a preset time interval (for example, five minutes), the direct communication is attempted to be established between the opposite side client terminals which are not successfully established, and for the opposite side client terminals which are not successfully established, when the client terminals repeat the direct communication with the opposite side client terminals a plurality of times (the repeatable times can be preset) and are unsuccessful, the operation of establishing the direct communication with the opposite side client terminals is ended.
Step S182, for each of the opposite side client terminals, if the first request result corresponding to the opposite side client terminal is successful, acquiring a second communication password and a second communication parameter of the opposite side client terminal returned by the cloud platform, establishing a logic connection with the opposite side client terminal according to the second communication parameter, and sending a second communication connection request to the opposite side client terminal, so that the opposite side client terminal returns a second request result corresponding to the opposite side client terminal according to a first terminal identifier and a second communication password in the second communication connection request.
Specifically, for each of the opposite-side client terminals, the client terminal establishes a logical connection with the opposite-side client terminal according to an IP address and a port number. When the opposite side client terminal receives the second communication connection request, the opposite side client terminal judges whether the communication password is the communication password of the opposite side client terminal according to the second communication password, judges whether the client terminal also belongs to one of the first opposite side client terminals corresponding to the data point sent by each own side according to the first terminal identification, and if the two first opposite side client terminals are true, allows the client terminal to establish direct communication with the client terminal, otherwise, does not establish direct communication.
Step S183, for each of the opposite side client terminals, if the second request result corresponding to the opposite side client terminal is successful, establishing direct communication with the opposite side client terminal.
It can be appreciated that, for each of the opposite-side client terminals, when the client terminal establishes direct communication with the opposite-side client terminal, a point-to-point communication link is established between the client terminal and the opposite-side client terminal, which characterizes that a data transmission of data points between the client terminal and the opposite-side client terminal can be completed based on the point-to-point communication.
Optionally, for each opposite side client terminal, after the client terminal establishes direct communication with the opposite side client terminal, the successful information of establishing the direct communication between the client terminal and the opposite side client terminal is returned to the cloud platform, and meanwhile, the client terminal and the opposite side client terminal record the successful mark of establishing the direct communication with the opposite side, so as to facilitate the follow-up statistics of the communication connection mode between the client terminal and each opposite side client terminal.
In this embodiment, when the data transmission manner between the client terminal and all the opposite-side client terminals included in the configuration file includes direct communication, that is, each of the local-side sending data points in the client terminal has a respective corresponding data transmission manner. For each corresponding data transmission mode of the client terminal, the client terminal can directly send the first current state information of the sending data point of the client terminal to a first opposite side client terminal corresponding to the sending data point of the client terminal through point-to-point communication when the collected first current state information of the sending data point of the client terminal meets a corresponding reporting rule, when the first current state information is received by the first opposite side client terminal, the first opposite side client terminal judges whether the sending data point of the client terminal is the local side receiving data point of the client terminal, if yes, the first current state information of the sending data point of the client terminal is reserved, the time for obtaining the information is recorded, and if not, the data is discarded.
To obtain the first current state information of the data point sent by the home side, as a specific embodiment, the step S200 includes:
Step S210, acquiring acquisition information corresponding to the data points sent by the local side according to the configuration file.
It can be understood that, by presetting the collection information corresponding to the data point sent by the local side on the cloud platform, the client terminal can conveniently obtain the first current state information of the data point sent by the local side in a mode of issuing a command and the like, so as to perform data transmission. For example, the client terminal may obtain, through a terminal downlink data communication module, first current status information of a data point of the lower device, so as to send the value to a first client corresponding to the data point of the lower device.
Step S220, according to the acquired information, acquiring first current state information of the data point sent by the home side.
It can be understood that, for the data point sent by the local side, data acquisition is performed according to the corresponding acquisition information, so that the first client corresponding to the data point sent by the local side can be ensured to perform data analysis and processing in time.
In this embodiment, the client terminal includes a data acquisition module, where the data acquisition module is configured to:
According to the corresponding acquisition information, a data point acquisition command is sent to the terminal downlink data communication module, so that the terminal downlink data communication module can communicate with corresponding equipment and analyze response data of the equipment, and first current state information of data points of downlink equipment is obtained;
acquiring first current state information of a system state data point according to corresponding acquisition information;
and obtaining second current state information of the local side received data point obtained based on the terminal uplink data communication module.
Optionally, the data acquisition module is further configured to receive a control command received by other modules included in the client terminal, so as to complete setting of the corresponding data point, and reply to a setting result thereof.
In this embodiment, a protocol stack of a plurality of communication protocols is built in the client terminal to connect the downlink device data points, and the client terminal may analyze and process parameter information of devices (such as a sensor and an instrument), and generate a corresponding data point acquisition method and a corresponding data point setting method. For example, if the downstream data point is a temperature sensor, the communication interface type is UART, the communication interface number is 1, the communication protocol type is MODBUS-RTU, the slave number is 5, the other necessary parameters of the communication protocol include baud rate 115200, data bit is 8, parity bit is even parity, stop bit is 1 bit, register type is holding register, register address is 100, data type is float, byte order is ABCD, and the collecting method and setting method of the data point can be generated according to the above information. In addition, the client terminal can also generate an acquisition instruction according to the analyzed information to determine a communication medium channel and parameters, so that data transmission and data reception with the downlink equipment data point are realized.
It should be understood that in this embodiment, a data point state mirror table is built in the client terminal, where the data point state mirror table is used to store the first current state information and the acquisition time of each local side sending data point and the local side receiving data point of the client terminal. It can be understood that the query instruction (including the name of the data point) can be used to invoke the query method of the data point, query the first current state information of the data point sent by the home side, and similarly, the setting instruction (including the name of the data point and the state information) can be used to invoke the setting method of the data point, so as to set the first current state information of the data point sent by the home side.
In addition, in this embodiment, the client terminal further includes a data reporting module, where the data reporting module is configured to maintain a data point reporting status mirror table, and the data point reporting status mirror table is configured to store first current status information and reporting time of last reporting of a data point sent by each local side of the client terminal. And for each local side transmitting data point of the client terminal, the data reporting module judges whether reporting is needed according to reporting rules of the local side transmitting data point and by combining first current state information and time of the local side transmitting data point in the data point state mirror image table and the data point reporting state mirror image table. If so, directly transmitting the data to be reported (namely, the first current state information and the acquisition time of the data point transmitted by the local side in the data point state mirror table) to the corresponding first opposite side client terminal in a direct communication mode, and updating the first current state information and the reporting time of the last report of the data point transmitted by the local side in the data point reporting state mirror table.
As a specific embodiment, the step S600 includes:
Step S610, determining whether the first current status information meets the reporting rule corresponding to the sending data point of the home side according to the reporting rule parameter corresponding to the sending data point of the home side.
Step S620, if the reporting rule is satisfied, the first current state information is sent to the first opposite side client terminal through the first communication channel.
It can be understood that, for each of the home side sending data points, by presetting a reporting rule corresponding to the home side sending data point on the cloud platform, a condition that the client terminal sends the home side sending data point can be determined, so that a first pair of side client terminals corresponding to the home side sending data point can analyze and process correspondingly according to the first current state information thereof.
Of course, it can be understood that, for each of the home side sending data points, according to the reporting rule corresponding to the home side sending data point, the condition that the client terminal sends the home side sending data point can be determined, so that the problem of untimely or invalid data transmission is avoided, and the problem of overlarge communication data flow caused by low effective communication data duty ratio is effectively solved.
It is easy to see that, by establishing a communication channel between the client terminal and the first opposite side client terminal in advance, when the data point sent by the local side meets the corresponding reporting rule, the first current state information of the data point sent by the local side is directly sent to the first opposite side client terminal through the corresponding communication channel, and the first opposite side client terminal finishes data analysis and corresponding processing, and does not need the cloud platform to perform data transmission, calculation and corresponding instruction issuing, so that the problems that the CPU performance and memory requirement of the cloud server are high and the operation logic processing may not be timely due to the fact that a large amount of communication data is acquired and processed through the cloud are solved, and meanwhile, the problem that the system stability is poor due to the fact that all client terminals only have one communication channel with the cloud platform is solved.
As a specific embodiment, the method further comprises:
step S810, obtaining a preset action rule according to the configuration file; the preset action rule comprises a local side receiving data point, a preset triggering condition and a preset triggering action, wherein the local side receiving data point is provided with a corresponding second opposite side client terminal.
Step S820, for each local side received data point, acquiring second current state information of the local side received data point through a second communication channel pre-established between the client terminal and a second pair of side client terminals corresponding to the local side received data point.
Step S830, controlling the state of the preset terminal device corresponding to the preset trigger action according to the second current state information of each local side received data point and the preset trigger condition.
It should be understood that the client terminal can send the first current state information of the local side sending data point to other opposite side client terminals for use by other opposite side client terminals as a judging condition, so that based on the same principle, the client terminal can also obtain the first current state information of the local side sending data point of the local side from the other opposite side client terminals for use by itself as a judging condition. In this embodiment, the client terminal is provided with a rule engine module, and the rule engine module is configured to parse each linkage rule in the configuration file, so as to determine all local side sending data points and local side receiving data points of the client terminal, which are similar to the local side sending data points and have relevant information thereof. In addition, in the present invention, the preset terminal device corresponding to the preset trigger action may be the client terminal, or may be another device connected to the client terminal, and when the second current state information meets the preset trigger condition, the state of the preset terminal device corresponding to the preset trigger action is controlled correspondingly. Of course, it will be understood that there may be one or more preset terminal devices.
It can be understood that, in the configuration file corresponding to the client terminal, the linkage rule included in the configuration file includes a condition rule and an action rule. Specifically, when the data point of the client terminal is in the condition rule, the data point of the client terminal is used as a condition data point (i.e., the local side transmitting data point) in the judgment condition; when the data point of the client terminal is in the action rule (i.e., the preset action rule), the data point of the client terminal is used as the action data point (i.e., the local side receiving data point).
For direct communication, optionally, for the local side sending data point, the client terminal sends the first current state information of the local side sending data point to the corresponding first opposite side client terminal in a direct communication mode, and simultaneously sends the first current state information to the cloud platform, so that the cloud platform updates the update time of the local side sending data point. Similarly, for the local side data point, the second opposite side client terminal sends the second current state information of the local side data point to the client terminal in a direct communication mode, and simultaneously sends the first current state information to the cloud platform, so that the cloud platform updates the update time of the local side data point.
For the local side received data point, when the client terminal or the cloud platform does not update the first current state information of the local side received data point for a long time (can be set manually or by a program) and the client terminal or the cloud platform triggers active inquiry so as to determine whether data transmission is normally performed. In an example, sending, by the client terminal, a query instruction to a direct communication link of a second opposite side client terminal corresponding to the local side received data point, if the direct communication link is normal, the client terminal receiving second current state information and current time replied by the second opposite side client terminal, and updating a local data point state mirror table, where the state of the local side received data point is the second current state information or invalid, and the time of the data point is the current time in reply; if the direct communication link is abnormal, disconnected or not established, the client terminal can query the second current state information of the data point through the cloud platform in a transit communication mode (the communication mode is specifically described later), specifically, the communication state between the cloud platform and the opposite side client corresponding to the data point is obtained through the cloud platform, if the communication state is an abnormal state, the client terminal sets the data point to be in a bad state, so that an alarm is given when the rule calculation participated by the data point in the bad state is operated (namely, the client terminal gives an alarm), the state of the data point in the bad state displayed by the client terminal is in a bad (namely, invalid) state, and if the client terminal obtains the second current state information of the data point through the cloud platform, the local data point state mirror table is updated.
In addition, in this embodiment, the client terminal further sends the obtained local side sending data points to the cloud platform, so that the cloud platform displays the information of the local side sending data points in real time, and meanwhile, the cloud platform also displays the link connection condition between the client terminal and other opposite side client terminals.
The invention provides a method for quickly realizing data transmission between client terminals, a schematic diagram of a system formed by the client terminals and a cloud is shown in fig. 4, a terminal A, a terminal B and a terminal C can be local client terminals or opposite client terminals, and similarly, indoor humidity data points and indoor temperature data points of the terminal A can be local side sending data points or local side receiving data points. It can be seen that the system has the advantages of high operation efficiency, high response speed, high redundancy and high availability.
Based on the above embodiments, a second embodiment of the data transmission method of the present application is proposed.
In this embodiment, the step S180 further includes:
Step S184, for each of the opposite side client terminals, if the second request result corresponding to the opposite side client terminal is failure, establishing a transit communication with the opposite side client terminal through the cloud platform.
It should be understood that, for each of the opposite-side client terminals, in addition to the failure of the second request result corresponding to the opposite-side client terminal, the client terminal may also establish a transit communication with the opposite-side client terminal through the cloud platform because the direct communication link between the client terminal and the opposite-side client terminal is abnormal or disconnected, and establish a transit communication with the opposite-side client terminal through the cloud platform, that is, the first current state information representing the sending data point of the present side is data transit to the corresponding opposite-side client terminal through the cloud platform. It can be seen that, in this embodiment, on the premise that the client terminal and the opposite client terminal do not establish direct communication, the client terminal and the opposite client terminal can realize data transmission by providing a communication mode of transferring communication.
To determine the data transmission manner of sending the first current status information to the first opposite-side client terminal, as a specific embodiment, before the step S600, the method further includes:
Step S510, determining whether the first communication channel exists.
Step S520, if the first communication channel exists, executing the step S600; and if the first communication channel does not exist, transmitting a preset transfer identifier, the first current state information, a first terminal identifier of the client terminal and a second terminal identifier of the first opposite-side client terminal to the cloud platform, so that the cloud platform transmits the first current state information to the first opposite-side client terminal.
In this embodiment, the data transmission modes corresponding to the data points sent by the home sides in the client terminal include three types of direct communication, relay communication or a combination of direct communication and relay communication. And when the acquired first current state information of the data point sent by the client side meets the corresponding reporting rule, the client terminal sends the first current state information of the data point sent by the client side to the cloud platform through the cloud platform, simultaneously sends a first terminal identifier of the client terminal, a second terminal identifier of the corresponding first opposite side client terminal and a preset transfer identifier to the cloud platform, the cloud platform can determine that the first current state information is transfer data, sends the first current state information to the corresponding first opposite side client terminal according to the second terminal identifier, judges whether the data point sent by the first opposite side client terminal is a local side receiving data point of the client side when the first current state information is received, if yes, reserves the first current state information of the data point sent by the client side, records the time for obtaining the first current state information, and if not, discards the data.
In this embodiment, for each local side transmitting data point of the client terminal, if the data reporting module determines that the local side transmitting data point needs to be reported, the data needing to be reported may be transmitted to the corresponding first opposite side client terminal in a manner of transferring communication through the cloud platform under the condition that the first communication channel does not exist, and the first current state information and the reporting time of the last report of the local side transmitting data point in the data point reporting state mirror table are updated.
In addition, for the local side received data point, when the client terminal or the cloud platform does not update the first current state information of the local side received data point for a long time (can be set manually or by a program) the client terminal or the cloud platform triggers active query. In an example, the client terminal queries through the transit communication (i.e. queries through the cloud platform), if the transit query fails or is overtime, the cloud platform also sets the second current state information of the data point to be in a bad state, so that the rule calculation participated in the data point in the bad state can alarm (i.e. the client terminal alarms) when running, and the state of the data point in the bad state displayed by the client terminal is in the bad (i.e. invalid) state.
Based on the same inventive concept, referring to fig. 5, the present application further provides a data transmission device, where the device is configured in a client terminal, and the device includes:
the data acquisition module is used for acquiring first current state information of the data points sent by the local side.
And the target terminal determining module is used for determining a first pair of side client terminals corresponding to the sending data points of the side.
And the data transmission module is used for transmitting the first current state information to the first opposite-side client terminal through a first communication channel pre-established between the client terminal and the first opposite-side client terminal.
In a possible embodiment of the application, the device further comprises:
And the first connection request module is used for sending a first communication connection request to the cloud platform so that the cloud platform can establish communication connection with the client terminal in response to the first communication connection request.
And the file request module is used for sending a file request to the cloud platform so that the cloud platform returns a configuration file corresponding to the client terminal in response to the file request.
And the file analysis module is used for analyzing the configuration file and obtaining a second terminal identification of at least one opposite side client terminal.
And the channel establishing module is used for establishing a communication channel with each opposite-side client terminal according to each second terminal identifier.
In a possible embodiment of the present application, the channel establishment module includes:
The first request unit is used for sending a direct communication parameter acquisition request to the cloud platform aiming at each opposite-side client terminal so that the cloud platform responds to the direct communication parameter acquisition request to obtain a first request result corresponding to the opposite-side client terminal; wherein the direct communication parameter acquisition request includes a second terminal identifier of the opposite-side client terminal.
And the second request unit is used for acquiring a second communication password and a second communication parameter of the opposite side client terminal returned by the cloud platform for each opposite side client terminal if the first request result corresponding to the opposite side client terminal is successful, establishing logic connection with the opposite side client terminal according to the second communication parameter, and sending a second communication connection request to the opposite side client terminal so that the opposite side client terminal returns a second request result corresponding to the opposite side client terminal according to a first terminal identifier and a second communication password in the second communication connection request.
And the direct communication unit is used for establishing direct communication with each opposite side client terminal if the second request result corresponding to the opposite side client terminal is successful.
In a possible embodiment of the present application, the channel establishment module further includes:
And the transfer communication unit is used for establishing transfer communication with the opposite side client terminals through the cloud platform if the second request result corresponding to the opposite side client terminals fails.
In a possible embodiment of the application, the device further comprises:
And the transfer transmission module is used for transmitting a preset transfer identifier, the first current state information, the first terminal identifier of the client terminal and the second terminal identifier of the first opposite-side client terminal to the cloud platform if the first communication channel does not exist, so that the cloud platform transmits the first current state information to the first opposite-side client terminal.
In a possible embodiment of the present application, the data transmission module includes:
And the condition judging unit is used for judging whether the first current state information meets the reporting rule corresponding to the data point sent by the local side according to the reporting rule parameter corresponding to the data point sent by the local side.
And the data transmission unit is used for transmitting the first current state information to the first opposite side client terminal through the first communication channel if the reporting rule is met.
In a possible embodiment of the application, the device comprises:
The preset action rule acquisition module is used for acquiring preset action rules according to the configuration file; the preset action rule comprises a local side receiving data point, a preset triggering condition and a preset triggering action, wherein the local side receiving data point is provided with a corresponding second opposite side client terminal.
And the second current state information acquisition module is used for acquiring second current state information of the local side receiving data points through a second communication channel which is pre-established between the client terminal and a second opposite side client terminal corresponding to the local side receiving data points for each local side receiving data point.
And the state control unit is used for controlling the state of the preset terminal equipment corresponding to the preset trigger action according to the second current state information of each local side received data point and the preset trigger condition.
It should be noted that, in this embodiment, each implementation manner of the data transmission device and the technical effects achieved by the implementation manner may refer to various implementation manners of the data transmission method in the foregoing embodiment, which is not described herein again.
Furthermore, embodiments of the present application also provide a computer storage medium having a computer program stored thereon, which when executed by one or more processors, implements the steps of the data transmission method as above. Therefore, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application. As an example, the program instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of computer programs, which may be stored on a computer-readable storage medium, and which, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
It should be further noted that the above-described apparatus embodiments are merely illustrative, where elements described as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the application, the connection relation between the modules represents that the modules have communication connection, and can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present application without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented by means of software plus necessary general purpose hardware, or of course by means of special purpose hardware including application specific integrated circuits, special purpose CPUs, special purpose memories, special purpose components, etc. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions can be varied, such as analog circuits, digital circuits, or dedicated circuits. But a software program implementation is a preferred embodiment for many more of the cases of the present application. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a readable storage medium, such as a floppy disk, a usb disk, a removable hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the method of the embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A data transmission method, applied to a client terminal, the method comprising:
acquiring first current state information of data points sent by a local side;
Determining a first pair of side client terminals corresponding to the home side transmitted data points;
And transmitting the first current state information to the first opposite side client terminal through a first communication channel pre-established between the client terminal and the first opposite side client terminal.
2. The data transmission method according to claim 1, wherein before the step of acquiring the first current state information of the transmission data point of the present side, the method further comprises:
sending a first communication connection request to a cloud platform, so that the cloud platform responds to the first communication connection request and establishes communication connection with the client terminal;
Sending a file request to the cloud platform so that the cloud platform returns a configuration file corresponding to the client terminal in response to the file request;
analyzing the configuration file to obtain a second terminal identifier of at least one opposite side client terminal;
and establishing a communication channel with each opposite side client terminal according to each second terminal identifier.
3. The data transmission method according to claim 2, wherein the step of establishing a communication channel with each of the opposite-side client terminals according to each of the second terminal identifications comprises:
For each opposite-side client terminal, sending a direct communication parameter acquisition request to the cloud platform, so that the cloud platform responds to the direct communication parameter acquisition request to obtain a first request result corresponding to the opposite-side client terminal; wherein the direct communication parameter acquisition request includes a second terminal identifier of the opposite-side client terminal;
For each opposite side client terminal, if the first request result corresponding to the opposite side client terminal is successful, acquiring a second communication password and a second communication parameter of the opposite side client terminal returned by the cloud platform, establishing logic connection with the opposite side client terminal according to the second communication parameter, and sending a second communication connection request to the opposite side client terminal so that the opposite side client terminal returns a second request result corresponding to the opposite side client terminal according to a first terminal identifier and a second communication password in the second communication connection request;
And for each opposite side client terminal, if the second request result corresponding to the opposite side client terminal is successful, establishing direct communication with the opposite side client terminal.
4. The data transmission method according to claim 3, wherein the step of establishing a communication channel with each of the opposite-side client terminals according to each of the second terminal identifications further comprises:
And for each opposite side client terminal, if the second request result corresponding to the opposite side client terminal is failure, establishing transfer communication with the opposite side client terminal through the cloud platform.
5. The data transmission method according to claim 4, wherein the method further comprises:
and if the first communication channel does not exist, transmitting a preset transfer identifier, the first current state information, a first terminal identifier of the client terminal and a second terminal identifier of the first opposite-side client terminal to the cloud platform, so that the cloud platform transmits the first current state information to the first opposite-side client terminal.
6. The data transmission method according to claim 1, wherein the step of transmitting the first current state information to the first pair of side client terminals through a first communication channel previously established between the client terminals and the first pair of side client terminals includes:
judging whether the first current state information meets the reporting rule corresponding to the data point sent by the local side or not according to the reporting rule parameter corresponding to the data point sent by the local side;
And if the reporting rule is met, the first current state information is sent to the first opposite side client terminal through the first communication channel.
7. The data transmission method according to any one of claims 2 to 5, characterized in that the method further comprises:
obtaining a preset action rule according to the configuration file; the preset action rule comprises a local side receiving data point, a preset triggering condition and a preset triggering action, wherein the local side receiving data point is provided with a corresponding second opposite side client terminal;
For each local side received data point, acquiring second current state information of the local side received data point through a second communication channel pre-established between the client terminal and a second opposite side client terminal corresponding to the local side received data point;
and controlling the state of the preset terminal equipment corresponding to the preset trigger action according to the second current state information of each local side received data point and the preset trigger condition.
8. A data transmission apparatus, configured in a client terminal, the apparatus comprising:
The data acquisition module is used for acquiring first current state information of data points sent by the local side;
a target terminal determining module, configured to determine a first pair of side client terminals corresponding to the home side transmission data points;
and the data transmission module is used for transmitting the first current state information to the first opposite-side client terminal through a first communication channel pre-established between the client terminal and the first opposite-side client terminal.
9. A data transmission device comprising a processor and a memory, the memory having stored thereon a data transmission program which, when executed by the processor, implements the steps of the data transmission method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when executed by one or more processors, implements the steps of the data transmission method according to any one of claims 1 to 7.
CN202410104316.9A 2024-01-24 2024-01-24 Data transmission method, device, equipment and medium Pending CN118075278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410104316.9A CN118075278A (en) 2024-01-24 2024-01-24 Data transmission method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410104316.9A CN118075278A (en) 2024-01-24 2024-01-24 Data transmission method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN118075278A true CN118075278A (en) 2024-05-24

Family

ID=91110053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410104316.9A Pending CN118075278A (en) 2024-01-24 2024-01-24 Data transmission method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN118075278A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019001426A1 (en) * 2017-06-26 2019-01-03 Oppo广东移动通信有限公司 Data processing method, device and terminal
CN109413120A (en) * 2017-08-16 2019-03-01 北京小鸟听听科技有限公司 A kind of communication means and device, electronic equipment and server
CN111478832A (en) * 2020-03-26 2020-07-31 深圳市汇合云网络科技有限责任公司 Control method, linkage method, auxiliary method and device of intelligent terminal equipment
CN113766645A (en) * 2020-06-03 2021-12-07 华为技术有限公司 Resource information transmission method and device
CN116156451A (en) * 2021-11-22 2023-05-23 广州汽车集团股份有限公司 Automobile direct communication method and terminal equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019001426A1 (en) * 2017-06-26 2019-01-03 Oppo广东移动通信有限公司 Data processing method, device and terminal
CN109413120A (en) * 2017-08-16 2019-03-01 北京小鸟听听科技有限公司 A kind of communication means and device, electronic equipment and server
CN111478832A (en) * 2020-03-26 2020-07-31 深圳市汇合云网络科技有限责任公司 Control method, linkage method, auxiliary method and device of intelligent terminal equipment
CN113766645A (en) * 2020-06-03 2021-12-07 华为技术有限公司 Resource information transmission method and device
CN116156451A (en) * 2021-11-22 2023-05-23 广州汽车集团股份有限公司 Automobile direct communication method and terminal equipment

Similar Documents

Publication Publication Date Title
CN107645529B (en) Heartbeat packet sending method and device
EP3726806A1 (en) Method for remotely controlling vehicle on the basis of smart apparatus
US9774697B2 (en) Method, apparatus, and system for pushing notification
CN114124451B (en) Data processing method and system for Internet of things equipment and computer storage medium
CN106993043B (en) Data communication system and method based on agency
CN110278568B (en) Method and network system for constructing networking based on network equipment
EP0625293A1 (en) Distributed supervisory control and data acquisition system
CN111263338B (en) Network distribution method of Bluetooth Mesh network, related network distribution equipment and system
CN109040295B (en) Method and device for determining abnormal disconnection, terminal and storage medium
US20050076112A1 (en) System and method for management of remote devices in a network
CN111787031B (en) Method for sending control instruction of Internet of things equipment based on distributed technology
CN111917562A (en) Broadcast message forwarding method, device, equipment and storage medium
CN110661673B (en) Heartbeat detection method and device
CN113905050A (en) Method, device and system for detecting internet access information
CN114338063A (en) Message queue system, service processing method, and computer-readable storage medium
CN115023919A (en) Firewall rule updating method and device, server and storage medium
WO2024103943A1 (en) Service processing method and apparatus, storage medium, and device
CN118075278A (en) Data transmission method, device, equipment and medium
CN112291749A (en) Method and device for awakening T-Box, T-Box and server
CN116015892A (en) Intranet remote desktop access method based on private encryption protocol flow agent
CN114143904B (en) CPE management method based on 5G fusion network shunt
CN112751907B (en) Information processing method, information processing apparatus, storage medium, and electronic apparatus
CN112449006B (en) Data transmission method, computer and medium for seismic station data acquisition unit and seismic table network central data server
CN114489730A (en) Remote upgrading method, terminal equipment and computer readable storage medium
CN113645108B (en) Intelligent household equipment monitoring system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination