CN117938933A - Instant messaging method and communication terminal in mixed environment - Google Patents

Instant messaging method and communication terminal in mixed environment Download PDF

Info

Publication number
CN117938933A
CN117938933A CN202410077600.1A CN202410077600A CN117938933A CN 117938933 A CN117938933 A CN 117938933A CN 202410077600 A CN202410077600 A CN 202410077600A CN 117938933 A CN117938933 A CN 117938933A
Authority
CN
China
Prior art keywords
instant messaging
environment instant
message
hybrid
hybrid environment
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
CN202410077600.1A
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.)
CETC 15 Research Institute
Original Assignee
CETC 15 Research Institute
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 CETC 15 Research Institute filed Critical CETC 15 Research Institute
Priority to CN202410077600.1A priority Critical patent/CN117938933A/en
Publication of CN117938933A publication Critical patent/CN117938933A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a mixed environment instant messaging method and a communication terminal, wherein the mixed environment instant messaging method comprises the following steps: after any one of the mixed environment instant messaging user terminals logs in, broadcasting is carried out in the local area network according to a set time interval, so that other mixed environment instant messaging user terminals in the local area network can obtain broadcasting data and generate an online address book; after the end-to-end connection is established at any one of the hybrid environment instant messaging user ends, the long connection is kept unchanged, and message sending and receiving are carried out so as to complete end-to-end message interaction based on the long connection. The method of the embodiment of the application realizes the communication function of no service cross-platform between terminals. The client software is adapted to the handheld terminal, the tablet, the domestic desktop terminal and the x86 desktop terminal, and the terminal realizes the function without additional server support.

Description

Instant messaging method and communication terminal in mixed environment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a hybrid environment instant messaging method and a communication terminal.
Background
With the popularity of the internet and mobile devices, there is an increasing demand for cross-platform instant messaging. However, most of the existing instant messaging software can only be used on a specific platform, and the requirement of users on cross-platform cannot be met. In addition, most of the existing instant messaging software relies on a central server for information transmission and storage, and the architecture of the server has the following problems for users:
1) Risk of disclosure of data privacy: the communication information of the user needs to be uploaded to a server, and the risk of hacking or monitoring exists;
2) Service dependency is strong: once a problem occurs in the central server, software in the whole environment cannot work normally;
3) Cross-platform compatibility is poor: communication between different platforms requires different client applications, and a user needs to install multiple applications to achieve multi-platform communication.
Disclosure of Invention
The embodiment of the application provides a hybrid environment instant messaging method and a communication terminal, which are used for providing a non-service cross-platform instant messaging method.
The embodiment of the application provides a mixed environment instant messaging method, which is realized based on a mixed environment instant messaging user end, wherein the mixed environment instant messaging user end adopts a cross-platform design, and an independent code base is written for each operation platform, the bottom layer of the mixed environment instant messaging user end is based on a Netty cross-platform interaction bottom layer communication protocol, any mixed environment instant messaging user end is used as a client end and a server end, and a central server is not arranged in a mixed environment, and the mixed environment instant messaging method comprises the following steps:
After any one of the mixed environment instant messaging user terminals logs in, broadcasting is carried out in the local area network according to a set time interval, so that other mixed environment instant messaging user terminals in the local area network can obtain broadcasting data and generate an online address book;
After the end-to-end connection is established at any one of the hybrid environment instant messaging user ends, the long connection is kept unchanged, and message sending and receiving are carried out so as to complete end-to-end message interaction based on the long connection.
Optionally, under the condition that the personal information of any of the hybrid environment instant messaging clients is modified, other hybrid environment instant messaging clients in the local area network are notified in a broadcast manner.
Optionally, the hybrid environment instant messaging client adopts an asynchronous event driven model.
Optionally, the method is executed in the process of performing end-to-end message interaction by any of the hybrid environment instant messaging clients:
The sender acquires a serial number and an IP address of the current receiving end equipment;
converting the acquired serial number and IP address into md5 code, and carrying out exclusive OR operation on the md5 code of the receiving end and the corresponding md5 code of the transmitting equipment according to the bits to obtain a secret key;
Encrypting the message content by the key, acquiring the serial number and the IP address of the transmitting equipment at the receiving end by data synchronization, acquiring a decryption key by operation so as to decrypt the received message content, decrypting the message at the receiving end, and then analyzing the message by decompilation.
Optionally, the hybrid environment instant messaging method further includes:
and storing the formatted message by adopting a sqlite database, and encoding and encrypting the formatted message before warehousing the formatted message.
Optionally, the storing of the formatted message using the sqlite database includes:
storing the coded corresponding file under a specific directory of a login user; and
And planning a storage space according to the storage capacity of the current terminal equipment.
Optionally, the storing of the formatted message using the sqlite database further comprises:
the file storage is designed with error handling and logging mechanisms and all user data is stored locally.
The embodiment of the application also provides a hybrid environment instant messaging terminal, which comprises a processor and a memory, wherein the memory stores a computer program, and the computer program realizes the steps of the hybrid environment instant messaging method when being executed by the processor.
The method of the embodiment of the application realizes the communication function of no service cross-platform between terminals. The client software is adapted to the handheld terminal, the tablet, the domestic desktop terminal and the x86 desktop terminal, and the terminal realizes the function without additional server support.
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
Fig. 1 is an example of a hybrid environment instant messaging client software architecture according to an embodiment of the present application;
Fig. 2 is a basic flow chart of a hybrid environment instant messaging method according to an embodiment of the present application;
Fig. 3 is a technical architecture example of hybrid environment instant messaging client software according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the application provides a hybrid environment instant messaging method which is realized based on a hybrid environment instant messaging user side, as shown in fig. 1, and comprises an application layer, a data processing layer and a data persistence layer. The application layer provides an application program interface and a network application service for a user and is responsible for processing the user interface and business logic. The data processing layer is responsible for processing, converting, analyzing, storing and the like of data, ensures the accuracy and the reliability of the data, supports various communication protocols and formats, and can freely switch the communication protocols according to different scenes and environment requirements. The data persistence layer provides an efficient, secure and reliable data access storage mechanism employing a lightweight, serverless, zero-configuration transactional database engine SQLite. The hybrid environment instant messaging user side adopts a cross-platform design, and based on java native development language, the novel design can cross-platform development framework. A set of unified API is designed and generated by combining the characteristics of different platforms, basic functions such as window management, image rendering and event processing are provided, and an independent code library is written for each operation platform so as to provide better performance and user experience, and native application programs respectively applicable to computers and mobile phones are generated.
The software interface of the instant messaging user in the mixed environment is displayed by adopting the self-adaptive layout. Acquiring the type of the equipment and the screen size of the equipment before running the software, and defining style rules under different screen widths according to the characteristics of different equipment; meanwhile, a layout mode based on proportion is adopted, the display area is divided into a plurality of large areas which are middle in upper, lower, left and right, each large area is divided into a plurality of rows and a plurality of columns, and the width is defined by using percentages.
The bottom layer communication protocol of the hybrid environment instant messaging user terminal based on the Netty cross-platform interaction ensures the stability and reliability of data transmission, defines a unified message format, and ensures that data can be correctly analyzed and transmitted between different platforms. The communication protocol is adapted differently for the APIs of different operating systems, and has expansibility and flexibility.
The system is divided into a plurality of layers such as an interface layer, a business logic processing layer, a data access layer and the like when the system of the hybrid environment instant messaging user terminal is designed, and each layer is responsible for a specific function and can be independently expanded; adopting a loose coupling framework, and completing communication between modules through event messages; the abstract layer and the realization layer are extracted, the frequently changed part is packaged in a changing layer, and the fixed part is packaged in an independent stable layer, so that the maintainability and the expandability of the system are improved.
The instant messaging client in the mixed environment is used as instant messaging software for local area network chat file transfer, and does not depend on background service deployed on a server, each terminal serves as a client and a server, and a communication protocol is designed based on Netty under the mixed environment without a central server to realize end-to-end data transmission.
The hybrid environment instant messaging method comprises the following steps:
In step S101, after any one of the hybrid environment instant messaging clients logs in, broadcasting is performed to the local area network according to a set time interval, so that other hybrid environment instant messaging clients in the local area network take broadcast data and generate an online address book;
In step S102, after the end-to-end connection is established between any of the hybrid environment instant messaging clients, the long connection is kept unchanged, and the message is sent and received, so as to complete the end-to-end message interaction based on the long connection. As shown in fig. 3, through a long connection, a user can receive messages sent by other users and can communicate and exchange with other users in real time. And according to the network communication state and the terminal use state, a message proxy caching strategy is designed, when the condition of the receiving user network is bad, messages are cached by other terminals with unobstructed networks and less busy services, the receiving user network can be re-received after being recovered, and the reliability of receiving the messages under the condition of congestion and offline of the receiving user network is improved.
The method of the embodiment of the application realizes the communication function of no service cross-platform between terminals. The client software is adapted to the handheld terminal, the tablet, the domestic desktop terminal and the x86 desktop terminal, and the terminal realizes the function without additional server support.
In some embodiments, under the condition that personal information of any one of the hybrid environment instant messaging clients is modified, other hybrid environment instant messaging clients in the local area network are notified in a broadcast manner, so that user data of all online terminals are ensured to be kept synchronous.
In some embodiments, the hybrid environment instant messaging client employs an asynchronous event driven model. A large number of concurrent connections can be handled and have the advantages of low latency and high throughput; the flexible thread model and event processing mechanism are designed, and the expansion and customization of the system can be easily performed.
In some embodiments, in the process of performing end-to-end message interaction by any hybrid environment instant messaging user end, before message transmission, the sender acquires the serial number and the IP address of the current receiver device, converts the serial number and the IP address into a 32-bit md5 code, performs exclusive-or operation on the md5 codes of the sender and the receiver according to the bits, and obtains a unique key, and encrypts the message content by the key. The receiving end obtains the equipment serial number and the IP address of the sending end equipment through a data synchronization mechanism, and the key is obtained through the operation to decrypt, so that the information security in the network transmission process is ensured; and after the receiving end acquires the message, carrying out message analysis through decompilation.
In some embodiments, the hybrid environment instant messaging method further comprises:
and storing the formatted message by adopting a sqlite database, and encoding and encrypting the formatted message before warehousing the formatted message.
In some embodiments, implementing the storage of the formatted message using the sqlite database comprises:
storing the coded corresponding file under a specific directory of a login user; and
And planning a storage space according to the storage capacity of the current terminal equipment.
In some embodiments, implementing the storing of the formatted message using the sqlite database further comprises:
The file storage is designed with error handling and logging mechanisms to ensure reliability in the file receiving and storage process. And all user data are stored locally, only a terminal operator is supported to check, and the risk of data leakage is reduced.
The communication method of the application has no center service and does not depend on a center server for information transmission and storage, thereby avoiding the problems of information transmission delay and service stability reduction. The user client can adapt according to different operating systems and equipment platforms, so that cross-platform compatibility is realized, and convenience is brought to users. The communication method adopts an end-to-end encryption technology, and can decrypt and read information only on the sending end and the receiving end, thereby effectively protecting the privacy of users. The application can realize high-efficiency information transmission by optimizing the communication protocol, thereby improving the user experience.
The embodiment of the application also provides a hybrid environment instant messaging terminal, which comprises a processor and a memory, wherein the memory stores a computer program, and the computer program realizes the steps of the hybrid environment instant messaging method when being executed by the processor.
It should be noted that, in the embodiments of 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 apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. 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 storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (8)

1. The mixed environment instant messaging method is characterized by being realized based on a mixed environment instant messaging user end, wherein the mixed environment instant messaging user end adopts a cross-platform design, an independent code library is written for each operation platform, the bottom layer of the mixed environment instant messaging user end is based on a Netty cross-platform interaction bottom layer communication protocol, any mixed environment instant messaging user end is used as a client end and a server end, and a central server is not arranged in a mixed environment, and the mixed environment instant messaging method comprises the following steps:
After any one of the mixed environment instant messaging user terminals logs in, broadcasting is carried out in the local area network according to a set time interval, so that other mixed environment instant messaging user terminals in the local area network can obtain broadcasting data and generate an online address book;
After the end-to-end connection is established at any one of the hybrid environment instant messaging user ends, the long connection is kept unchanged, and message sending and receiving are carried out so as to complete end-to-end message interaction based on the long connection.
2. The method for instant messaging in hybrid environment according to claim 1, wherein, in case of personal information modification of any one of the hybrid environment instant messaging clients, other hybrid environment instant messaging clients in the local area network are notified by broadcasting.
3. The hybrid environment instant messaging method of claim 1, wherein the hybrid environment instant messaging client employs an asynchronous event driven model.
4. The hybrid environment instant messaging method of claim 1, wherein the performing of the end-to-end message interaction at any of the hybrid environment instant messaging clients:
The sender acquires a serial number and an IP address of the current receiving end equipment;
converting the acquired serial number and IP address into md5 code, and carrying out exclusive OR operation on the md5 code of the receiving end and the corresponding md5 code of the transmitting equipment according to the bits to obtain a secret key;
Encrypting the message content by the key, acquiring the serial number and the IP address of the transmitting equipment at the receiving end by data synchronization, acquiring a decryption key by operation so as to decrypt the received message content, decrypting the message at the receiving end, and then analyzing the message by decompilation.
5. The hybrid environment instant messaging method of claim 1, further comprising:
and storing the formatted message by adopting a sqlite database, and encoding and encrypting the formatted message before warehousing the formatted message.
6. The hybrid environment instant messaging method of claim 5, wherein employing a sqlite database to enable storage of formatted messages comprises:
storing the coded corresponding file under a specific directory of a login user; and
And planning a storage space according to the storage capacity of the current terminal equipment.
7. The hybrid environment instant messaging method of claim 5, wherein implementing storage of formatted messages using a sqlite database further comprises:
the file storage is designed with error handling and logging mechanisms and all user data is stored locally.
8. A hybrid environment instant messaging terminal comprising a processor and a memory, the memory having stored thereon a computer program which, when executed by the processor, implements the steps of the hybrid environment instant messaging method of any of claims 1 to 7.
CN202410077600.1A 2024-01-19 2024-01-19 Instant messaging method and communication terminal in mixed environment Pending CN117938933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410077600.1A CN117938933A (en) 2024-01-19 2024-01-19 Instant messaging method and communication terminal in mixed environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410077600.1A CN117938933A (en) 2024-01-19 2024-01-19 Instant messaging method and communication terminal in mixed environment

Publications (1)

Publication Number Publication Date
CN117938933A true CN117938933A (en) 2024-04-26

Family

ID=90767951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410077600.1A Pending CN117938933A (en) 2024-01-19 2024-01-19 Instant messaging method and communication terminal in mixed environment

Country Status (1)

Country Link
CN (1) CN117938933A (en)

Similar Documents

Publication Publication Date Title
JP4363847B2 (en) Digital TV application protocol for interactive TV
CN100563242C (en) Certificate information storage system and method
CN1653779B (en) System and method for supporting multiple certificate status providers on a mobile communication device
US8539224B2 (en) Obscuring form data through obfuscation
CN104137587B (en) A kind of method and terminal device for sending, receiving user data
US20080075099A1 (en) Service gateway for interactive television
CN101421722A (en) Method for providing a clip for viewing at a remote device
AU2002240200A1 (en) A digital television application protocol for interactive television
CN102946440A (en) Automatic cloud synchronization and recovery system based on cloud storage technology
US20090037734A1 (en) Device authentication system, mobile terminal device, information device, device authenticating server, and device authenticating method
CN109521956A (en) A kind of cloud storage method, apparatus, equipment and storage medium based on block chain
JP4944723B2 (en) COMMUNICATION SYSTEM, BASE STATION DEVICE, AND TERMINAL DEVICE
US9332405B2 (en) Short message backup method, mobile terminal, and server
KR20000064041A (en) Multimedia Messaging System and the Method
WO2004081802A1 (en) System and method for mobile e-mail management
CN117938933A (en) Instant messaging method and communication terminal in mixed environment
US9525653B2 (en) Enhanced wireless short message service
CN108390917B (en) Intelligent message sending method and device
CN110636374A (en) Method and device for searching information
CN114448652B (en) Method, apparatus, device and storage medium for conducting encrypted communication
CN116939012A (en) Data processing method and device and related equipment
CN114584525A (en) Message processing method, system, terminal device and storage medium
CN117081840A (en) Secure socket layer communication method, device, special data processor and medium
CN116887204A (en) Number processing method, device, equipment and storage medium
WO2014019500A1 (en) Short message backup method, mobile terminal, and server

Legal Events

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