A data communication method, apparatus, terminal device, and storage medium

Through signaling servers, the communication information between service servers is coordinated in the visual network service, and the problem of manual configuration of changes in server communication addresses is solved, which improves communication efficiency and simplifies the maintenance process.

CN112217862BActive Publication Date: 2025-05-27VISIONVERA INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010917541.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-03
Publication Date
2025-05-27
Estimated Expiration
2040-09-03

AI Technical Summary

Technical Problem

In visual networking services, changes in communication addresses between servers require manual modification of configuration files on each server, resulting in complex maintenance and low communication efficiency.

Method used

The signaling server establishes a connection with multiple service servers in advance. The service server sends request instructions for communication information to the signaling server. The signaling server forwards the received communication information to the service server on the sending end, so that it establishes a connection with the service server on the receiving end and conducts data communication.

Benefits of technology

It simplifies the configuration and management of communication addresses between service servers, improves communication efficiency, and reduces the complexity of manual maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112217862B_ABST
    Figure CN112217862B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a data communication method, apparatus, terminal equipment and storage medium, including: a signaling server sends a request instruction for communication information to a business server at a receiving end, wherein the request instruction is sent by the business server at the sending end; receiving a response instruction returned by the business server at the receiving end, wherein the response instruction includes the communication information of the business server at the receiving end; sending the communication information of the business server at the receiving end to the business server at the sending end, the business server at the sending end establishes a connection with the business server at the receiving end according to the communication information of the business server at the receiving end, and performs data communication with the business server at the receiving end according to the established connection, so that the business server receives the communication information of other business servers returned by the signaling server by sending the request instruction for communication information to the signaling server, and the business servers can perform data communication through the communication information, thereby improving communication efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to a data communication method, apparatus, terminal device, and storage medium. Background Art

[0002] With the continuous development of the visual networking service, the same server may need to establish communications with multiple other servers. Before establishing communications, it is necessary to configure communication address files on each server so that the servers can communicate with each other. If the communication address of a server changes, it is necessary for staff to modify the configuration files on each server, resulting in complex maintenance and low communication efficiency. Summary of the Invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a data communication method, apparatus, terminal device, and storage medium that overcome the above problems or at least partially solve the above problems.

[0004] In a first aspect, an embodiment of the present invention provides a data communication method, which is applied to a signaling server in a visual networking data communication system. The signaling server is pre-connected to multiple service servers, and the service servers include a service server at a sending end and a service server at a receiving end. The method includes:

[0005] Sending a request instruction for communication information to the service server at the receiving end, where the request instruction is sent by the service server at the sending end;

[0006] Receiving a response instruction returned by the service server at the receiving end, where the response instruction includes the communication information of the service server at the receiving end;

[0007] Sending the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and performs data communication with the service server at the receiving end according to the established connection.

[0008] Optionally, before sending the request instruction for communication information to the service server at the receiving end, the method further includes:

[0009] Receiving a login request from the service server at the sending end, where the login request includes login information, and the login information includes a preset MAC address, a preset user name, and a preset login password of the service server at the sending end;

[0010] Encrypt and calculate the preset MAC address, preset username, and preset login password of the service server at the sending end according to a preset encryption method to obtain a verification identifier of the service server at the sending end, where the verification identifier includes a preset encryption method identifier;

[0011] Send the verification identifier of the service server at the sending end to the service server at the sending end.

[0012] Optionally, the first communication information at least includes the verification identifier of the service server at the sending end;

[0013] The step of sending the request instruction of the communication information sent by the service server at the sending end to at least two service servers at the receiving end includes:

[0014] Decrypt the verification identifier of the service server at the sending end according to the preset encryption method identifier in the verification identifier of the service server at the sending end to obtain the verification information of the service server at the sending end, where the verification information includes the first MAC address, the first username, and the first login password;

[0015] Compare the verification information of the service server at the sending end with the login information;

[0016] If the verification information and the login information are the same, forward the request instruction to the service server at the receiving end.

[0017] Optionally, the step of sending the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end and performs data communication with the service server at the receiving end according to the established connection includes:

[0018] Send the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end parses the communication information of the service server at the receiving end to obtain the verification identifier of the service server at the receiving end, the second transmission protocol type, the second communication address, and the second relay server address, so that the service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end and performs data communication with the service server at the receiving end according to the established connection.

[0019] Optionally, the communication information of the service server at the sending end includes the first transmission protocol type and the first communication address;

[0020] The service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and performs data communication with the service server at the receiving end based on the established connection, including:

[0021] The service server at the sending end sends a first test request to the service server at the receiving end corresponding to the second communication address;

[0022] The service server at the sending end receives a first response instruction returned by the service server at the receiving end;

[0023] The service server at the sending end sends service data packets to the service server at the receiving end through the transport protocol corresponding to the first transport protocol type.

[0024] Optionally, the communication information of the service server at the sending end further includes a first relay server address;

[0025] The service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and performs data communication with the service server at the receiving end based on the established connection, including:

[0026] The service server at the sending end sends a second test request to the service server at the receiving end corresponding to the second communication address;

[0027] In the case where the service server at the sending end does not receive a second response instruction returned by the service server at the receiving end, the service server at the sending end sends the second test request to a first relay server corresponding to the first relay server address, so that the first relay server sends the second test request to the service server at the receiving end corresponding to the second communication address according to the second communication address and the second relay server address, so that the service server at the sending end sends service data packets to the service server at the receiving end through the transport protocol corresponding to the first transport protocol type.

[0028] Optionally, the first communication address and the second communication address include an Internet address and a Visual Networking address, where the Internet address includes an IP address and a port, and the Visual Networking address includes a virtual Visual Networking number;

[0029] The first transport protocol type and the second transport protocol type include at least one of TCP, UDP, HTTP, or Visual Networking.

[0030] Second aspect, an embodiment of the present invention provides a data communication device, which is applied to a signaling server in a visual networking data communication system. The signaling server is pre-connected to a plurality of service servers, and the service servers include a service server at the sending end and a service server at the receiving end. The device includes:

[0031] A sending module, configured to send a request instruction for communication information to the service server at the receiving end, where the request instruction is sent by the service server at the sending end;

[0032] A receiving module, configured to receive a response instruction returned by the service server at the receiving end, where the response instruction includes communication information of the service server at the receiving end;

[0033] A communication module, configured to send the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and performs data communication with the service server at the receiving end according to the established connection.

[0034] Optionally, the device further includes an acquisition module for verification identification, and the acquisition module for verification identification is configured to:

[0035] Receive a login request from the service server at the sending end, where the login request includes login information, and the login information includes a preset MAC address, a preset user name, and a preset login password of the service server at the sending end;

[0036] Perform encryption calculation on the preset MAC address, the preset user name, and the preset login password of the service server at the sending end according to a preset encryption method to obtain a verification identification of the service server at the sending end, where the verification identification includes a preset encryption method identification;

[0037] Send the verification identification of the service server at the sending end to the service server at the sending end.

[0038] Optionally, the first communication information at least includes the verification identification of the service server at the sending end;

[0039] The sending module is configured to:

[0040] Decrypt the verification identification of the service server at the sending end according to the preset encryption method identification in the verification identification of the service server at the sending end to obtain verification information of the service server at the sending end, where the verification information includes a first MAC address, a first user name, and a first login password;

[0041] Compare the verification information of the service server at the sending end with the login information;

[0042] If the verification information is the same as the login information, forward the request instruction to the service server at the receiving end.

[0043] Optionally, the communication module is used for:

[0044] Send the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end can parse the communication information of the service server at the receiving end to obtain the verification identifier, the second transmission protocol type, the second communication address, and the second relay server address of the service server at the receiving end, enabling the service server at the sending end to establish a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and perform data communication with the service server at the receiving end based on the established connection.

[0045] Optionally, the communication information of the service server at the sending end includes the first transmission protocol type and the first communication address; the service server at the sending end includes a test module, and the test module is used for:

[0046] Send a first test request to the service server at the receiving end corresponding to the second communication address;

[0047] Receive the first response instruction returned by the service server at the receiving end;

[0048] Send a service data packet to the service server at the receiving end through the transmission protocol corresponding to the first transmission protocol type.

[0049] Optionally, the communication information of the service server at the sending end further includes the first relay server address;

[0050] The test module is used for:

[0051] Send a second test request to the service server at the receiving end corresponding to the second communication address;

[0052] In the case where the service server at the sending end does not receive the second response instruction returned by the service server at the receiving end, send the second test request to the first relay server corresponding to the first relay server address, so that the first relay server can send the second test request to the service server at the receiving end corresponding to the second communication address according to the second communication address and the second relay server address, enabling the service server at the sending end to send a service data packet to the service server at the receiving end through the transmission protocol corresponding to the first transmission protocol type.

[0053] Optionally, the first communication address and the second communication address include an Internet address and a Visual Networking address, where the Internet address includes an IP address and a port, and the Visual Networking address includes a virtual Visual Networking number;

[0054] The first transmission protocol type and the second transmission protocol type include at least one of TCP, UDP, HTTP, or Visual Networking.

[0055] In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and a memory;

[0056] The memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the data communication method provided in the first aspect.

[0057] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, it implements the data communication method provided in the first aspect.

[0058] Embodiments of the present invention have the following advantages:

[0059] Embodiments of the present invention are applied to a signaling server in a Visual Networking data communication system. The signaling server is pre-connected to multiple service servers, and the service servers include a service server at the sending end and a service server at the receiving end. The method includes: sending a request instruction for communication information to the service server at the receiving end, where the request instruction is sent by the service server at the sending end; receiving a response instruction returned by the service server at the receiving end, and the response instruction includes the communication information of the service server at the receiving end; sending the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end can establish a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and perform data communication with the service server at the receiving end based on the established connection. In this way, the service server sends its own communication information to the signaling server by sending a request instruction for communication information to the signaling server, and at the same time receives the communication information of other service servers returned by the signaling server, and the service servers can perform data communication through the communication information, improving communication efficiency. Description of the Drawings

[0060] Figure 1 is a flowchart of the steps of an embodiment of a data communication method of the present invention;

[0061] Figure 2 is a flowchart of the steps of another embodiment of a data communication method of the present invention;

[0062] Figure 3 It is a structural block diagram of an embodiment of a data communication device of the present invention;

[0063] Figure 4 It is a schematic structural diagram of a terminal device of the present invention. Specific embodiments

[0064] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0065] The Visual Networking is an important milestone in the development of the network. It is a real-time network that can achieve real-time transmission of high-definition video, pushing many Internet applications towards high-definition video and high-definition face-to-face.

[0066] The Visual Networking adopts real-time high-definition video exchange technology, and can integrate dozens of services such as high-definition video conferencing, video surveillance, intelligent surveillance analysis, emergency command, digital radio and television, delayed television, online teaching, live broadcast, VOD on demand, TV mail, personal recording (PVR), internal network (self-run) channels, intelligent video broadcast control, information release, etc., including video, voice, pictures, text, communication, data, etc. on a network platform, and realizes high-definition quality video playback through a TV or a computer.

[0067] An embodiment of the present invention provides a data communication method for data communication between service servers. The execution subject of this embodiment is a data communication device, which is set on a signaling server in a Visual Networking data communication system.

[0068] Referring to Figure 1 , a step flow chart of an embodiment of a data communication method of the present invention is shown. This method can be applied to a signaling server in a Visual Networking data communication system. The signaling server and multiple service servers are pre-connected. The service servers include a service server at the sending end and a service server at the receiving end. Specifically, it can include the following steps:

[0069] S101. Send a request instruction for communication information to the service server at the receiving end, where the request instruction is sent by the service server at the sending end;

[0070] Specifically, when the service server at the sending end wants to communicate with the service server at the receiving end, for example, to conduct a certain service such as a video phone call, a video conference, a live broadcast, etc., the service server at the sending end needs to know the communication information of the service server at the receiving end in order to communicate with the service server at the receiving end. An embodiment of the present invention provides a signaling server that forwards the communication information of each service server. In actual operation, the service server at the sending end sends a request instruction for communication information to the signaling server. The request instruction includes the communication information of the service server at the sending end. The communication information of the service server at the sending end includes the first transmission protocol type, the first communication address, the first relay server address, etc. The signaling server sends the request instruction to each of the other service servers, that is, the service server at the receiving end.

[0071] Among them, the communication address is the Visual Networking number or IP number of the service server and the corresponding port number.

[0072] S102. Receive a response instruction returned by the service server at the receiving end, where the response instruction includes the communication information of the service server at the receiving end;

[0073] Specifically, after receiving the request instruction sent by the signaling server, the service server at the receiving end returns a response instruction to the signaling server and loads its own communication information in the response instruction and sends it to the signaling server.

[0074] S103. Send the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end and conducts data communication with the service server at the receiving end according to the established connection.

[0075] Specifically, after receiving the communication information sent by multiple service servers at the receiving end, the signaling server sends the communication information of the multiple service servers at the receiving end to the service server at the sending end. The service server at the sending end parses the communication information of the service server at the receiving end, obtains the communication information of the service server at the receiving end, and establishes a connection with the corresponding service server at the receiving end according to the communication information and conducts data communication with the service server at the receiving end according to the established connection.

[0076] Exemplarily, the signaling server is respectively connected to service servers A, B, C, D, and E. The service server A sends a request instruction for communication information to the signaling server, and the signaling server sends the request instruction to service servers B, C, D, and E, and receives the communication information returned by each of service servers B, C, D, and E. The service server A establishes connections with the corresponding other servers, such as service servers B, C, D, and E, according to the communication information, and performs data communication based on the established connections.

[0077] The data communication method provided by the embodiment of the present invention sends a request instruction for communication information to the service server at the receiving end through the signaling server, where the request instruction is sent by the service server at the sending end; receives the response instruction returned by the service server at the receiving end, and the response instruction includes the communication information of the service server at the receiving end; sends the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and performs data communication with the service server at the receiving end based on the established connection. In this way, the service server sends its own communication information to the signaling server by sending a request instruction for communication information to the signaling server, and at the same time receives the communication information of other service servers returned by the signaling server, and the service servers can perform data communication through the communication information, improving the communication efficiency.

[0078] Another embodiment of the present invention further supplements and explains the data communication method provided in the above embodiment.

[0079] As Figure 2 shown, a step flowchart of another embodiment of the data communication method of the present invention is shown. This method can be applied to a signaling server in a visual networking data communication system. The signaling server and multiple service servers are pre-connected. The service servers include a service server at the sending end and a service server at the receiving end. The data communication method includes:

[0080] S201. Receive the login request of the service server at the sending end. The login request includes login information, and the login information includes a preset MAC address, a preset user name, and a preset login password of the service server at the sending end;

[0081] Specifically, the embodiment of the present invention provides a signaling server, which is specifically used to forward signaling. The signaling types include request signaling, response signaling, and transit signaling.

[0082] The service server at the sending end needs to be authenticated on the signaling server first. The service server at the sending end sends a login request to the signaling server. The login request includes a login request, which includes the preset MAC (Media Access Control or Medium Access Control) address of the service server at the sending end. MAC address is also known as the physical address or hardware address, which is used to define the location of network devices), a preset username, and a preset login password.

[0083] S202. According to the preset encryption method, perform encryption calculation on the preset MAC address, preset username, and preset login password of the service server at the sending end to obtain the verification identifier of the service server at the sending end, where the verification identifier includes a preset encryption method identifier;

[0084] Specifically, the preset encryption methods include Base64 encryption method, MD5 encryption, keychain encryption, symmetric encryption algorithm, RSA encryption, etc. These are not specifically limited in the embodiments of the present invention. No matter which encryption method is used, the encryption method identifier needs to be put into the verification identifier so that the service server at the sending end can decrypt according to the decryption method corresponding to the encryption method identifier.

[0085] Exemplarily, the following are the various encryption methods, and the corresponding encryption method can be selected according to actual needs:

[0086] 1. Base64 encryption method (reversible)

[0087] The printable characters in Base64 include letters A-Z / a-z / numbers 0-9 / plus sign ‘+’ and slash ‘ / ’, so there are a total of 62 characters;

[0088] Base64 was added to the system library after iOS7.

[0089] 2. MD5 encryption method

[0090] Message Digest Algorithm MD5 (Chinese name: Message Digest Algorithm Fifth Edition) is a hash function used to provide integrity protection for messages. It is also translated as the digest algorithm or hash algorithm. According to the output value, the original plaintext cannot be obtained, that is, the process is irreversible.

[0091] The MD5 algorithm has the following characteristics:

[0092] 1) Compressibility: For data of any length, the length of the calculated MD5 value is fixed.

[0093] 2) Easy to calculate: It is very easy to calculate the MD5 value from the original data.

[0094] 3) Anti-modification: Any modification to the original data, even if only 1 byte is changed, will result in a significant difference in the obtained MD5 value.

[0095] 4) Strong anti-collision: Given the original data and its MD5 value, it is very difficult to find a data with the same MD5 value (i.e., forged data).

[0096] The role of MD5 is to "compress" large-capacity information into a confidential format before signing the private key with digital signature software (that is, to transform a byte string of any length into a hexadecimal digital string of a certain length). In addition to MD5, the more well-known ones are sha-1, RIPEMD, as well as Haval, MD5 with salt, etc.

[0097] 3. Keychain encryption method

[0098] iCloud Keychain, a kind of sandbox:

[0099] 1) If the mobile phone is jailbroken, the password is easily stolen.

[0100] 2) When the software is updated, the content in the sandbox is not deleted. However, if the software is uninstalled and reinstalled, the data in the sandbox will be gone.

[0101] 3) The sandbox of each APP is relatively independent, and passwords cannot be shared.

[0102] 4. Symmetric encryption algorithm

[0103] Advantages: The algorithm is public, the calculation amount is small, the encryption speed is fast, the encryption efficiency is high, and it is reversible;

[0104] Disadvantages: Both parties use the same key, and the security cannot be guaranteed

[0105] Current situation: The speed of symmetric encryption is much faster than that of public key encryption, and symmetric encryption is required in many occasions.

[0106] Algorithms: Commonly used algorithms in symmetric encryption algorithms include: DES, 3DES, TDEA, Blowfish, RC2, RC4, RC5, IDEA, SKIPJACK, AES, etc. The implementation mechanisms of different algorithms are different, and the detailed information of the corresponding algorithms can be referred to.

[0107] Compared with DES and 3DES algorithms, the AES algorithm has higher speed and resource utilization efficiency, and the security level is also higher, and it is called the next-generation encryption standard.

[0108] nECB: Electronic Codebook, that is, each block is encrypted independently;

[0109] nCBC: Cipher Block Chaining, which performs an encryption transformation on data using a key and an initialization vector (IV).

[0110] Differences between ECB and CBC: CBC is more complex and secure, with an 8-bit vector added (if it's all 8 zeros, the result is equal to ECB). If you change a single letter in the plaintext, the corresponding line in the ECB ciphertext will change, while in the CBC ciphertext, all lines from that point onwards will change.

[0111] 5. RSA Encryption (Asymmetric Encryption Algorithm) (Secruty.framework system library)

[0112] Asymmetric encryption algorithms require two keys: a public key and a private key.

[0113] The main algorithms used in asymmetric encryption are: RSA, Elgamal, Knapsack algorithm, Rabin, D-H, ECC (Elliptic Curve Cryptography), etc.

[0114] The public key and the private key are a pair. If data is encrypted with the public key, only the corresponding private key can decrypt it; if data is encrypted with the private key, then only the corresponding public key can decrypt it.

[0115] Features:

[0116] Features of the asymmetric cryptosystem: The algorithm strength is complex, and the security depends on the algorithm and the key. However, due to its complex algorithm, the encryption and decryption speed is not as fast as that of symmetric encryption and decryption.

[0117] In the symmetric cryptosystem, there is only one key, which is not public. If you want to decrypt, you have to let the other party know the key. So ensuring its security is to ensure the security of the key. In contrast, the asymmetric key cryptosystem has two keys, one of which is public, so there is no need to transmit the other party's key like in symmetric cryptography.

[0118] S203. Send the verification identifier of the service server at the sending end to the service server at the sending end.

[0119] S204. Decrypt the verification identifier of the service server at the sending end according to the preset encryption method identifier in the verification identifier of the service server at the sending end to obtain the verification information of the service server at the sending end. The verification information includes the first mac address, the first username, and the first login password.

[0120] S205. Compare the verification information of the service server at the sending end with the login information.

[0121] S206. If the verification information is the same as the login information, forward the request instruction to the service server of the receiving end.

[0122] S207. Receive the response instruction returned by the service server of the receiving end, where the response instruction includes the communication information of the service server of the receiving end.

[0123] S208. Send the communication information of the service server of the receiving end to the service server of the sending end, so that the service server of the sending end can parse the communication information of the service server of the receiving end to obtain the verification identifier, the second transmission protocol type, the second communication address, and the second relay server address of the service server of the receiving end.

[0124] S209. If the service server of the sending end and the service server of the receiving end are in the same local area network, the service server of the sending end sends service data packets to the service server of the receiving end through the transmission protocol corresponding to the first transmission protocol type.

[0125] Specifically, the service server of the sending end sends a first test request to the service server of the receiving end corresponding to the second communication address.

[0126] The service server of the sending end receives the first response instruction returned by the service server of the receiving end.

[0127] The service server of the sending end sends service data packets to the service server of the receiving end through the transmission protocol corresponding to the first transmission protocol type.

[0128] Specifically, this step is generally applied to data communication within a local area network.

[0129] S210. If the service server of the sending end and the service server of the receiving end are not in the same local area network, the service server of the sending end establishes a connection with the service server of the receiving end through the relay server address, and then the service server of the sending end sends service data packets to the service server of the receiving end through the transmission protocol corresponding to the first transmission protocol type.

[0130] Specifically, the service server of the sending end sends a second test request to the service server of the receiving end corresponding to the second communication address.

[0131] If the service server of the sending end does not receive the second response instruction returned by the service server of the receiving end, the service server of the sending end sends the second test request to the first relay server corresponding to the first relay server address.

[0132] The first relay server sends the second test request to the service server of the receiving end corresponding to the second communication address according to the second communication address and the second relay server address, so that the service server of the sending end sends service data packets to the service server of the receiving end through the transport protocol corresponding to the first transport protocol type.

[0133] Specifically, this step is generally applied to data communication between different local area networks and requires a relay server for the terminals. Among them, the number of relay servers in the embodiments of the present invention is not specifically limited.

[0134] It should be noted that for the method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.

[0135] The data communication method provided by the embodiments of the present invention sends a request instruction for communication information to the service server of the receiving end through a signaling server, where the request instruction is sent by the service server of the sending end; receives a response instruction returned by the service server of the receiving end, and the response instruction includes the communication information of the service server of the receiving end; sends the communication information of the service server of the receiving end to the service server of the sending end, so that the service server of the sending end establishes a connection with the service server of the receiving end according to the communication information of the service server of the receiving end, and performs data communication with the service server of the receiving end based on the established connection. In this way, the service server sends its own communication information to the signaling server by sending a request instruction for communication information to the signaling server, and at the same time receives the communication information of other service servers returned by the signaling server, and the service servers can perform data communication through the communication information, improving the communication efficiency.

[0136] Another embodiment of the present invention provides a data communication device for executing the data communication method provided by the above embodiments.

[0137] Refer to Figure 3 , which shows a structural block diagram of an embodiment of a data communication device of the present invention. The device can be applied to a signaling server in a visual networking data communication system. The signaling server is pre-connected to multiple service servers, and the service servers include a service server of a sending end and a service server of a receiving end. Specifically, it can include the following modules: a sending module 301, a receiving module 302, and a communication module 303, where:

[0138] The sending module 301 is used to send a request instruction for communication information to the service server at the receiving end, where the request instruction is sent by the service server at the sending end;

[0139] The receiving module 302 is used to receive a response instruction returned by the service server at the receiving end, and the response instruction includes the communication information of the service server at the receiving end;

[0140] The communication module 303 is used to send the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end can establish a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and perform data communication with the service server at the receiving end based on the established connection.

[0141] The data communication device provided by the embodiment of the present invention sends a request instruction for communication information to the service server at the receiving end through a signaling server, where the request instruction is sent by the service server at the sending end; receives a response instruction returned by the service server at the receiving end, and the response instruction includes the communication information of the service server at the receiving end; sends the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end can establish a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and perform data communication with the service server at the receiving end based on the established connection. In this way, the service server sends its own communication information to the signaling server by sending a request instruction for communication information to the signaling server, and at the same time receives the communication information of other service servers returned by the signaling server, and the service servers can perform data communication through the communication information, improving the communication efficiency.

[0142] Another embodiment of the present invention further supplements and explains the data communication device provided in the above embodiment.

[0143] Optionally, the device further includes a verification identifier acquisition module, and the verification identifier acquisition module is used for:

[0144] Receiving a login request from the service server at the sending end, where the login request includes login information, and the login information includes a preset MAC address, a preset user name, and a preset login password of the service server at the sending end;

[0145] Performing encryption calculation on the preset MAC address, the preset user name, and the preset login password of the service server at the sending end according to a preset encryption method to obtain a verification identifier of the service server at the sending end, where the verification identifier includes a preset encryption method identifier;

[0146] Send the verification identifier of the service server at the sending end to the service server at the sending end.

[0147] Optionally, the first communication information at least includes the verification identifier of the service server at the sending end;

[0148] The sending module is used for:

[0149] According to the preset encryption method identifier in the verification identifier of the service server at the sending end, decrypt the verification identifier of the service server at the sending end to obtain the verification information of the service server at the sending end, where the verification information includes the first MAC address, the first user name, and the first login password;

[0150] Compare the verification information of the service server at the sending end with the login information;

[0151] If the verification information and the login information are the same, forward the request instruction to the service server at the receiving end.

[0152] Optionally, the communication module is used for:

[0153] Send the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end can parse the communication information of the service server at the receiving end to obtain the verification identifier of the service server at the receiving end, the second transmission protocol type, the second communication address, and the second relay server address, so that the service server at the sending end can establish a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and perform data communication with the service server at the receiving end according to the established connection.

[0154] Optionally, the communication information of the service server at the sending end includes the first transmission protocol type and the first communication address; the service server at the sending end includes a test module, and the test module is used for:

[0155] Send a first test request to the service server at the receiving end corresponding to the second communication address;

[0156] Receive the first response instruction returned by the service server at the receiving end;

[0157] Send a service data packet to the service server at the receiving end through the transmission protocol corresponding to the first transmission protocol type.

[0158] Optionally, the communication information of the service server at the sending end further includes the first relay server address;

[0159] The test module is used for:

[0160] Send a second test request to the service server of the receiving end corresponding to the second communication address;

[0161] In the case where the service server of the sending end does not receive the second response instruction returned by the service server of the receiving end, the second test request is sent to the first relay server corresponding to the first relay server address, so that the first relay server sends the second test request to the service server of the receiving end corresponding to the second communication address according to the second communication address and the second relay server address, so that the service server of the sending end sends a service data packet to the service server of the receiving end through the transmission protocol corresponding to the first transmission protocol type.

[0162] Optionally, the first communication address and the second communication address include an Internet address and a Visual Networking address, where the Internet address includes an IP address and a port, and the Visual Networking address includes a virtual Visual Networking number;

[0163] The first transmission protocol type and the second transmission protocol type include at least one of TCP, UDP, HTTP, or Visual Networking.

[0164] It should be noted that each implementable manner in this embodiment can be implemented independently, or can be implemented in any combination manner without conflict. The present application does not make a limitation.

[0165] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, refer to the partial description of the method embodiment.

[0166] The data communication device provided by the embodiment of the present invention sends a request instruction for communication information to the service server of the receiving end through a signaling server, where the request instruction is sent by the service server of the sending end; receives a response instruction returned by the service server of the receiving end, and the response instruction includes the communication information of the service server of the receiving end; sends the communication information of the service server of the receiving end to the service server of the sending end, so that the service server of the sending end establishes a connection with the service server of the receiving end according to the communication information of the service server of the receiving end, and performs data communication with the service server of the receiving end according to the established connection. In this way, the service server sends its own communication information to the signaling server by sending a request instruction for communication information to the signaling server, and at the same time receives the communication information of other service servers returned by the signaling server, and the service servers can perform data communication through the communication information, improving communication efficiency.

[0167] Another embodiment of the present invention provides a terminal device for executing the data communication method provided in the above embodiment.

[0168] Figure 4 is a schematic structural diagram of a terminal device of the present invention, as Figure 4 shown, the terminal device includes: at least one processor 401 and a memory 402;

[0169] The memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the data communication method provided in the above embodiment.

[0170] The terminal device provided in this embodiment sends a request instruction for communication information to the service server of the receiving end through a signaling server, where the request instruction is sent by the service server of the sending end; receives a response instruction returned by the service server of the receiving end, and the response instruction includes the communication information of the service server of the receiving end; sends the communication information of the service server of the receiving end to the service server of the sending end, so that the service server of the sending end can establish a connection with the service server of the receiving end according to the communication information of the service server of the receiving end, and perform data communication with the service server of the receiving end based on the established connection. In this way, the service server sends its own communication information to the signaling server by sending a request instruction for communication information to the signaling server, and at the same time receives the communication information of other service servers returned by the signaling server, and the service servers can perform data communication through the communication information, improving the communication efficiency.

[0171] Another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, it implements the data communication method provided in any of the above embodiments.

[0172] According to the computer-readable storage medium of this embodiment, a request instruction for sending communication information is sent to the service server at the receiving end through a signaling server, where the request instruction is sent by the service server at the sending end; a response instruction returned by the service server at the receiving end is received, and the response instruction includes the communication information of the service server at the receiving end; the communication information of the service server at the receiving end is sent to the service server at the sending end, so that the service server at the sending end can establish a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and perform data communication with the service server at the receiving end based on the established connection. In this way, the service server sends its own communication information to the signaling server by sending a request instruction for communication information to the signaling server, and at the same time receives the communication information of other service servers returned by the signaling server. Service servers can perform data communication through the communication information, improving communication efficiency.

[0173] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is the difference from other embodiments. The same or similar parts among the embodiments can be referred to each other.

[0174] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention can take the form of completely hardware embodiments, completely software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0175] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, electronic devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be realized by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing electronic devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing electronic devices generate a device for realizing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0176] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing electronic device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one process Figure 1 or more processes and / or blocks Figure 1 or more blocks specified in one block or more blocks.

[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing electronic device, such that a series of operation steps are executed on the computer or other programmable electronic device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable electronic device provide steps for implementing the functions specified in one process Figure 1 or more processes and / or blocks Figure 1 or more blocks specified in one block or more blocks.

[0178] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0179] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or electronic device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or electronic device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or electronic device comprising the element.

[0180] The above has introduced in detail a data communication method and a data communication device provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A data communication method, characterized in that, it is applied to a signaling server in a visual networking data communication system. The signaling server is pre-connected to multiple service servers, and the service servers include a service server at the sending end and a service server at the receiving end. The method includes: Sending a request instruction for communication information to the service server at the receiving end, where the request instruction is sent by the service server at the sending end; Receiving a response instruction returned by the service server at the receiving end, and the response instruction includes the communication information of the service server at the receiving end; Sending the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end can parse the communication information of the service server at the receiving end to obtain the verification identifier, the second transmission protocol type, the second communication address, and the second relay server address of the service server at the receiving end, enabling the service server at the sending end to establish a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and perform data communication with the service server at the receiving end based on the established connection, where the verification identifier includes a preset encryption method identifier; Before sending the request instruction for communication information to the service server at the receiving end, the method further includes: Receiving a login request from the service server at the sending end, where the login request includes login information, and the login information includes a preset MAC address, a preset user name, and a preset login password of the service server at the sending end; Performing an encryption calculation on the preset MAC address, the preset user name, and the preset login password of the service server at the sending end according to a preset encryption method to obtain the verification identifier of the service server at the sending end; Sending the verification identifier of the service server at the sending end to the service server at the sending end; The first communication information at least includes the verification identifier of the service server at the sending end; Sending the request instruction for communication information sent by the service server at the sending end to at least two service servers at the receiving end, including: Decrypting the verification identifier of the service server at the sending end according to the preset encryption method identifier in the verification identifier of the service server at the sending end to obtain the verification information of the service server at the sending end, and the verification information includes a first MAC address, a first user name, and a first login password; Comparing the verification information of the service server at the sending end with the login information; If the verification information is the same as the login information, forwarding the request instruction to the service server at the receiving end; The service server at the sending end and the service server at the receiving end are in the same local area network, and the service server at the sending end sends service data packets to the service server at the receiving end through a transmission protocol corresponding to the first transmission protocol type. The service servers at the sending end and the receiving end are not in the same local area network. The service server at the sending end establishes a connection with the service server at the receiving end through the relay server address, and then the service server at the sending end sends service data packets to the service server at the receiving end through the transport protocol corresponding to the first transport protocol type.

2. The method according to claim 1, wherein, the communication information of the service server at the sending end includes the first transport protocol type and the first communication address; the service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and performs data communication with the service server at the receiving end according to the established connection, including: the service server at the sending end sends a first test request to the service server at the receiving end corresponding to the second communication address; the service server at the sending end receives the first response instruction returned by the service server at the receiving end; the service server at the sending end sends service data packets to the service server at the receiving end through the transport protocol corresponding to the first transport protocol type.

3. The method according to claim 1, wherein, the communication information of the service server at the sending end further includes the first relay server address; the service server at the sending end establishes a connection with the service server at the receiving end according to the communication information of the service server at the receiving end, and performs data communication with the service server at the receiving end according to the established connection, including: the service server at the sending end sends a second test request to the service server at the receiving end corresponding to the second communication address; in the case where the service server at the sending end does not receive the second response instruction returned by the service server at the receiving end, the service server at the sending end sends the second test request to the first relay server corresponding to the first relay server address, so that the first relay server sends the second test request to the service server at the receiving end corresponding to the second communication address according to the second communication address and the second relay server address, so that the service server at the sending end sends service data packets to the service server at the receiving end through the transport protocol corresponding to the first transport protocol type.

4. A data communication device, wherein, applied to the signaling server in the visual networking data communication system, the signaling server and multiple service servers are pre-connected, the service servers include the service server at the sending end and the service server at the receiving end, and the device includes: a sending module, configured to send a request instruction for communication information to the service server at the receiving end, where the request instruction is sent by the service server at the sending end; a receiving module, configured to receive the response instruction returned by the service server at the receiving end, and the response instruction includes the communication information of the service server at the receiving end; The communication module is used to send the communication information of the service server at the receiving end to the service server at the sending end, so that the service server at the sending end can parse the communication information of the service server at the receiving end to obtain the verification identifier, the second transmission protocol type, the second communication address, and the second relay server address of the service server at the receiving end, enabling the service server at the sending end to establish a connection with the service server at the receiving end based on the communication information of the service server at the receiving end and perform data communication with the service server at the receiving end according to the established connection. Among them, the verification identifier includes a preset encryption method identifier; The device further includes a verification identifier acquisition module, and the verification identifier acquisition module is used for: Receiving a login request from the service server at the sending end, where the login request includes login information, and the login information includes a preset MAC address, a preset user name, and a preset login password of the service server at the sending end; Performing encryption calculation on the preset MAC address, the preset user name, and the preset login password of the service server at the sending end according to the preset encryption method to obtain the verification identifier of the service server at the sending end; Sending the verification identifier of the service server at the sending end to the service server at the sending end; The first communication information at least includes the verification identifier of the service server at the sending end; The device is further used to decrypt the verification identifier of the service server at the sending end according to the preset encryption method identifier in the verification identifier of the service server at the sending end to obtain the verification information of the service server at the sending end, where the verification information includes the first MAC address, the first user name, and the first login password; Comparing the verification information of the service server at the sending end with the login information; If the verification information is the same as the login information, forwarding the request instruction to the service server at the receiving end; The service server at the sending end and the service server at the receiving end are within the same local area network. The service server at the sending end sends service data packets to the service server at the receiving end through the transmission protocol corresponding to the first transmission protocol type; The service server at the sending end and the service server at the receiving end are not within the same local area network. The service server at the sending end establishes a connection with the service server at the receiving end through the relay server address, and then the service server at the sending end sends service data packets to the service server at the receiving end through the transmission protocol corresponding to the first transmission protocol type.

5. A terminal device Characterized in that It includes: At least one processor and a memory; The memory stores a computer program; The at least one processor executes the computer program stored in the memory to implement the data communication method according to any one of claims 1-3.

6. A computer-readable storage medium Characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the data communication method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Android mobile terminal-based video monitoring system

    CN102547239A