Group chat method based on 5G message and apparatus thereof
Patent Information
- Application Number
- CN202511466425.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2045-10-14
AI Technical Summary
Existing 5G group messaging technology lacks sufficient protection of user privacy, leading to data security risks and making anonymous group chats impossible.
By working together with the server and terminal devices, the anonymous group chat function is realized. The target chat information is generated using user identifiers, group chat identifiers, message transformation identifiers and initial message content, and the information is encrypted using an encryption key. The group chat log is saved, and the creation and management of anonymous groups are supported.
It provides secure and private group chat services, protects user privacy and data security, enhances the user chat experience, and enriches the functional application scenarios of 5G messaging.
Smart Images

Figure CN121397518B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technology, and in particular to a group chat method and apparatus based on 5G messaging. Background Technology
[0002] With the development of mobile communication technology, fifth-generation mobile communication technology, namely 5G technology, plays a crucial role in mobile communication. Among related technologies, 5G group messaging uses terminal real-name authentication information as the identity information, accomplished through mass message sending. In this scheme, the sender and receiver of the message are mutually visible, and anonymous group chats are not supported. Using real-name authentication information during group chats may result in insufficient protection of user privacy in group chat scenarios, leading to certain data security risks.
[0003] Therefore, how to provide secure and private group chat services, offer users a comfortable chat experience, and protect users' privacy and data security has become an important research direction. Summary of the Invention
[0004] This application aims to at least partially address one of the technical problems in the related art. The technical solution disclosed herein is as follows: The first aspect of this application proposes a group chat method based on 5G messaging, executed by a server, including: In response to receiving anonymous chat information sent by a first terminal device to a virtual group chat number, the user identifier, group chat identifier, group members, message transition identifier, and initial message content are obtained based on the anonymous chat information and the virtual group chat number. The first terminal device is the terminal device associated with the sending object. Based on the user identifier, group member, group chat identifier, message conversion identifier, and initial message content, obtain the recipient and the target chat information corresponding to the recipient. The target chat information includes the actual message content and message prompt method. The actual message content is sent to the second terminal device associated with the recipient in accordance with the message prompt method; Obtain the server's encryption key, encrypt the sending object, receiving object, target chat information, and group chat identifier using the server's encryption key, obtain the group chat logs, and save the group chat logs.
[0005] In some implementations, before receiving chat messages sent by the first terminal device, the method further includes: In response to receiving an anonymous group creation request from a third terminal device, an anonymous group chat is created according to the anonymous group creation request, and the virtual group chat number, virtual management number and group chat identifier of the anonymous group chat are obtained. The virtual management number is used to modify the name of the anonymous group chat, modify the group members, modify the anonymous nicknames of the group members and disband the anonymous group chat according to the request of the preset terminal device. Send a notification to the third terminal device that the group chat has been successfully created.
[0006] In some implementations, the recipient and the target chat information corresponding to the recipient are obtained based on the user identifier, group member, group chat identifier, message transition identifier, and initial message content, including: Based on the user identifier and group chat identifier, determine the anonymous nickname of the recipient in the anonymous group chat; Based on the message conversion identifier, determine the recipient, the message conversion format corresponding to the recipient, and the message prompting method corresponding to the recipient from the group members; The initial message content and anonymous nickname are converted according to the message conversion format to obtain the actual message content corresponding to the receiving object.
[0007] In some implementations, it also includes: In response to receiving the terminal authentication factor sent by the fourth terminal device, the terminal authentication factor is parsed to obtain the first terminal random number, the first signature encryption result, the second terminal random number, and the key decryption result; Obtain the server's private key and the public key of the fourth terminal device; Decrypt the first signature encryption result using the terminal device's public key to obtain the signature decryption result; If the signature decryption result is the same as the random number of the first terminal, it is determined that the fourth terminal device has passed the authentication. The random number of the second terminal is then encrypted according to the server's private key to obtain the second signature encryption result. A verification pass message is generated based on the second signature encryption result and sent to the fourth terminal device. The decryption result of the key is encrypted using the public key of the terminal device to obtain the encrypted key result. Then, the encrypted key result is decrypted asymmetrically using the private key of the server to obtain and save the block key seed.
[0008] In some implementations, it also includes: In response to receiving a log block packet sent by a fourth terminal device, the log block packet is parsed to obtain and save the encrypted log; The encrypted and saved logs are decrypted based on the block key seed to obtain the terminal log content; Decrypt the group chat logs using the server's encryption key to obtain the server log content; The terminal log content is verified based on the server log content. If the server log content includes the terminal log content, a verification message is generated indicating that the verification has passed. If the server log content does not include the terminal log content, a verification message is generated indicating that the verification has failed. Send the log verification message to the fourth terminal device.
[0009] In this embodiment, based on the user identifier, group members, group chat identifier, message conversion identifier, and initial message content, the receiving object and the target chat information corresponding to the receiving object are obtained. The actual message content is sent to the second terminal device associated with the receiving object according to the message prompt method. This can realize anonymous chat service based on 5G messages, provide secure and private group chat service, provide users with a comfortable chat experience, obtain the server encryption key, encrypt the sending object, receiving object, target chat information, and group chat identifier according to the server encryption key, obtain the group chat log, and save the group chat log, which can protect the user's privacy and data security.
[0010] A second aspect of this application proposes a group chat method based on 5G messaging, executed by a terminal device, comprising: Get one or more chat messages for each group identifier within a preset time interval, and the target group members corresponding to each chat message. The target group members include the sender and the receiver. Obtain the terminal device encryption key, encrypt chat messages and the target group members corresponding to the chat messages using the terminal device encryption key, and obtain the encrypted information; Based on the terminal device's encryption key, the encrypted information and group identifier are re-encrypted, and the encrypted storage log is obtained. Block packets are broadcast based on the encrypted log to verify the encrypted log. When the verification is successful, the data digest of the encrypted log is saved on the blockchain.
[0011] In some implementations, obtaining the terminal device encryption key includes: Randomly generate a block key seed, a random number for the first terminal, and a random number for the second terminal, and obtain the private key of the terminal device and the public key of the server. The block key seed is asymmetrically encrypted using the server's public key to obtain the key encryption result, and then the key encryption result is decrypted using the terminal device's private key to obtain the key decryption result. The first terminal random number is encrypted using the terminal device's private key to obtain the first signature encryption result; A terminal authentication factor is generated based on the first terminal random number, the first signature encryption result, the second terminal random number, and the key decryption result. The terminal authentication factor is used to instruct the server to perform terminal authentication on the terminal device. When the authentication is successful, an authentication success message is generated and sent to the terminal device. The terminal authentication factor is sent to the server. Upon receiving the authentication pass message from the server, the authentication pass information is parsed to obtain the second signature encryption result. Decrypt the second signature encryption result using the server's public key to obtain the signature decryption result. If the signature decryption result is the same as the second random number, the server authentication is confirmed to be successful. Create two index variables, shuffle the block key seed, and obtain the terminal device encryption key.
[0012] In some implementations, block packets are broadcast based on the encrypted storage log to verify the encrypted storage log. Upon successful verification, the data digest of the encrypted storage log is stored on the blockchain, including: Package the encrypted and stored logs to obtain log block packages; Broadcast the log block packets to the server and the terminal devices associated with the target group members; Receive log verification messages sent by the server and the terminal devices associated with the target group members; The system determines whether the encrypted log has been successfully verified based on the log verification message. If the verification is successful, the system performs a hash operation on the log block packet to obtain the data digest result. The data summary results are saved on the blockchain.
[0013] In some implementations, it also includes: Obtain anonymous chat information and virtual group chat numbers. Anonymous chat messages include message transition identifiers and initial message content. Send anonymous chat messages to a virtual group chat number.
[0014] In some implementations, it also includes: Obtain the anonymous group creation request; Send the anonymous group creation request to the server; Receive a notification from the server that the group chat has been successfully created.
[0015] A third aspect of this application provides a group chat device based on 5G messaging, deployed on a server, comprising: The first acquisition module is used to respond to receiving anonymous chat information sent by the first terminal device to the virtual group chat number, and to acquire user identifier, group chat identifier, group members, message conversion identifier and initial message content based on the anonymous chat information and the virtual group chat number. The first terminal device is the terminal device associated with the sending object. The second acquisition module is used to acquire the receiving object and the target chat information corresponding to the receiving object based on the user identifier, group member, group chat identifier, message conversion identifier and initial message content. The target chat information includes the actual message content and message prompt method. The sending module is used to send the actual message content to the second terminal device associated with the receiving object in accordance with the message prompt method; The log saving module is used to obtain the server encryption key, encrypt the sending object, receiving object, target chat information, and group chat identifier according to the server encryption key, obtain the group chat log, and save the group chat log.
[0016] In some implementations, the first acquisition module is further configured to: In response to receiving an anonymous group creation request from a third terminal device, an anonymous group chat is created according to the anonymous group creation request, and the virtual group chat number, virtual management number and group chat identifier of the anonymous group chat are obtained. The virtual management number is used to modify the name of the anonymous group chat, modify the group members, modify the anonymous nicknames of the group members and disband the anonymous group chat according to the request of the preset terminal device. Send a notification to the third terminal device that the group chat has been successfully created.
[0017] In some implementations, the second acquisition module is further configured to: Based on the user identifier and group chat identifier, determine the anonymous nickname of the recipient in the anonymous group chat; Based on the message conversion identifier, determine the recipient, the message conversion format corresponding to the recipient, and the message prompting method corresponding to the recipient from the group members; The initial message content and anonymous nickname are converted according to the message conversion format to obtain the actual message content corresponding to the receiving object.
[0018] In some embodiments, the device further includes a verification module for: In response to receiving the terminal authentication factor sent by the fourth terminal device, the terminal authentication factor is parsed to obtain the first terminal random number, the first signature encryption result, the second terminal random number, and the key decryption result; Obtain the server's private key and the public key of the fourth terminal device; Decrypt the first signature encryption result using the terminal device's public key to obtain the signature decryption result; If the signature decryption result is the same as the random number of the first terminal, it is determined that the fourth terminal device has passed the authentication. The random number of the second terminal is then encrypted according to the server's private key to obtain the second signature encryption result. A verification pass message is generated based on the second signature encryption result and sent to the fourth terminal device. The decryption result of the key is encrypted using the public key of the terminal device to obtain the encrypted key result. Then, the encrypted key result is decrypted asymmetrically using the private key of the server to obtain and save the block key seed.
[0019] In some implementations, the verification module is also used for: In response to receiving a log block packet sent by a fourth terminal device, the log block packet is parsed to obtain and save the encrypted log; The encrypted and saved logs are decrypted based on the block key seed to obtain the terminal log content; Decrypt the group chat logs using the server's encryption key to obtain the server log content; The terminal log content is verified based on the server log content. If the server log content includes the terminal log content, a verification message is generated indicating that the verification has passed. If the server log content does not include the terminal log content, a verification message is generated indicating that the verification has failed. Send the log verification message to the fourth terminal device.
[0020] A fourth aspect of this application provides a group chat device based on 5G messaging, deployed on a terminal device, comprising: The first acquisition module is used to acquire one or more chat messages of each group identifier within a preset time interval, and the target group members corresponding to each chat message. The target group members include the sender and the receiver. The first encryption module is used to obtain the encryption key of the terminal device, encrypt the chat information and the target group members corresponding to the chat information according to the encryption key of the terminal device, and obtain the encrypted information; The second encryption module is used to re-encrypt the encrypted information and group identifier based on the encryption key of the terminal device, and obtain the encrypted storage log. The log storage module is used to broadcast block packets based on the encrypted logs to verify them. When the verification is successful, the data digest of the encrypted logs is saved on the blockchain.
[0021] In some implementations, the first encryption module is further configured to: Randomly generate a block key seed, a random number for the first terminal, and a random number for the second terminal, and obtain the private key of the terminal device and the public key of the server. The block key seed is asymmetrically encrypted using the server's public key to obtain the key encryption result, and then the key encryption result is decrypted using the terminal device's private key to obtain the key decryption result. The first terminal random number is encrypted using the terminal device's private key to obtain the first signature encryption result; A terminal authentication factor is generated based on the first terminal random number, the first signature encryption result, the second terminal random number, and the key decryption result. The terminal authentication factor is used to instruct the server to perform terminal authentication on the terminal device. When the authentication is successful, an authentication success message is generated and sent to the terminal device. The terminal authentication factor is sent to the server. Upon receiving the authentication pass message from the server, the authentication pass information is parsed to obtain the second signature encryption result. Decrypt the second signature encryption result using the server's public key to obtain the signature decryption result. If the signature decryption result is the same as the second random number, the server authentication is confirmed to be successful. Create two index variables, shuffle the block key seed, and obtain the terminal device encryption key.
[0022] In some implementations, the log storage module is also used for: Package the encrypted and stored logs to obtain log block packages; Broadcast the log block packets to the server and the terminal devices associated with the target group members; Receive log verification messages sent by the server and the terminal devices associated with the target group members; The system determines whether the encrypted log has been successfully verified based on the log verification message. If the verification is successful, the system performs a hash operation on the log block packet to obtain the data digest result. The data summary results are saved on the blockchain.
[0023] In some embodiments, the device further includes a transceiver module for: Obtain anonymous chat information and virtual group chat numbers. Anonymous chat messages include message transition identifiers and initial message content. Send anonymous chat messages to a virtual group chat number.
[0024] In some implementations, the transceiver module is also used for: Obtain the anonymous group creation request; Send the anonymous group creation request to the server; Receive a notification from the server that the group chat has been successfully created.
[0025] A fifth aspect of this application provides an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute instructions to implement a 5G message-based group chat method as provided in the first aspect of this application, or to implement a 5G message-based group chat method as provided in the second aspect of this application.
[0026] A sixth aspect of this application provides a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the 5G message-based group chat method provided in the first aspect of this application, or to execute the 5G message-based group chat method provided in the second aspect of this application.
[0027] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0028] Figure 1 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application; Figure 2 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application; Figure 3 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application; Figure 4 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application; Figure 5 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application; Figure 6 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application; Figure 7 This is a structural block diagram of a 5G messaging-based group chat device according to an embodiment of this application; Figure 8 This is a structural block diagram of a 5G messaging-based group chat device according to an embodiment of this application; Figure 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0029] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0030] The following describes a group chat method and apparatus based on 5G messaging according to embodiments of this application, with reference to the accompanying drawings.
[0031] The acquisition, storage, and application of user personal information involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0032] Figure 1 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application, as follows: Figure 1 As shown, this method is executed by the server and includes the following steps: S101, in response to receiving anonymous chat information sent by the first terminal device to the virtual group chat number, obtain the user identifier, group chat identifier, group members, message transition identifier and initial message content based on the anonymous chat information and the virtual group chat number.
[0033] The first terminal device is the terminal device associated with the sending object.
[0034] In some implementations, after receiving anonymous chat information sent by the first terminal device to the virtual group chat number, the anonymous chat information is parsed to obtain the message conversion identifier and the initial message content. Optionally, the anonymous chat information is encrypted using a 5G message preset encryption method to ensure security. When parsing the anonymous chat information, the corresponding decryption method is first used to decrypt it, and then the message conversion identifier and the initial message content are obtained.
[0035] In some implementations, the server stores virtual group chat numbers, group chat identifiers, and mapping relationships between group members, and can obtain the group chat identifier and group members corresponding to the virtual group chat number based on the mapping relationship.
[0036] In some implementations, the user identifier corresponding to the first terminal device can be obtained through reverse lookup.
[0037] S102: Based on the user identifier, group member, group chat identifier, message transition identifier, and initial message content, obtain the receiving object and the target chat information corresponding to the receiving object.
[0038] In some implementations, the recipient and their corresponding target chat information are directly obtained. That is, the corresponding anonymous group chat is determined based on the group chat identifier, and the anonymous nickname of the sender within the anonymous group chat is determined based on the user identifier. In some implementations, the anonymous nickname and the initial message content are concatenated to obtain the actual message content corresponding to the recipient. In some implementations, different recipients correspond to different message prompting methods and message conversion formats. The recipient, the corresponding message conversion format, and the corresponding message prompting method can be determined from group members based on the message conversion identifier. The initial message content and the anonymous nickname are then converted according to the message conversion format to obtain the actual message content corresponding to the recipient.
[0039] In this embodiment, any message sent by a group member to a virtual group chat number is considered anonymous chat information. Anonymous chat information may contain a message conversion identifier, which is a specific recipient type prefix used to describe the recipient. For example, if the message conversion identifier is empty, the default recipient is all group members except the sender, meaning all group members can see the message. If the message conversion identifier is "@", followed by a specified anonymous nickname of a group member, then all group members are recipients, and the message notification method for the specified group member differs from that for non-specified group members. If the message conversion identifier is "#", followed by a specified anonymous nickname of a group member, only the specified group member is a recipient. If the message conversion identifier is "$", followed by a friendliness threshold T', only group members with a friendliness level not less than the sender's threshold are recipients; other group members are not recipients. Optionally, the actual message content can be obtained using the following formula:
[0040] Where M' represents the actual message content, M represents the initial message content, and nick(UID, ID) represents retrieving the anonymous nickname of the sender in the anonymous group chat based on the sender's UID (user identifier) and group chat ID. This indicates character concatenation.
[0041] In some implementations, the favorability score T can be obtained using the following formula:
[0042] in, This represents the number of times the receiving object appears in the messages sent by both parties within the current group. The number of messages and phone calls exchanged between the two parties, where q represents the number of times the preset conditions are met. The `max()` function represents the function that takes the maximum value for the predefined closeness relationship. Optionally, the predefined conditions may include whether to set contact numbers, bill payment on behalf, primary and secondary numbers, and services within the same group; value, The values and q-values can be obtained by querying terminal device information.
[0043] In this embodiment of the application, the message content of 5G message is determined according to the constructed friendliness calculation method, so as to realize the encryption of the sending and receiving of dialogue content and reduce the difficulty of operation for users when controlling the recipient.
[0044] In some implementations, if the message conversion identifier is "*", followed by the anonymous nickname of the group member, all group members are the recipients, only the specified group members can see the actual message content, and the other group members can only receive a preset message prompt as the actual message content, such as "The sender nickname sent a hidden message to the recipient nickname list", and cannot see the specific message content.
[0045] For example, obtaining the receiving object and the target chat information corresponding to the receiving object can be shown in Table 1, where M in Table 1 represents the initial message content.
[0046] Table 1
[0047] In other embodiments, the message transition identifier may be other identifiers, and this application does not limit this.
[0048] In some implementations, before obtaining the recipient and the target chat information corresponding to the recipient, the initial message content is first checked for illegality. For example, sensitive words are obtained from the system's built-in sensitive word library, and a sensitive word filtering algorithm is used to check whether the initial message content contains sensitive words. If it does not contain sensitive words, the recipient and the target chat information corresponding to the recipient are obtained according to the above method. If it contains sensitive words, a 5G message is sent to the first terminal device to indicate that the anonymous chat information contains non-compliant terms and the message is not sent.
[0049] The target chat information includes the actual message content and the message notification method.
[0050] S103, the actual message content is sent to the second terminal device associated with the recipient in accordance with the message prompt method.
[0051] In some implementations, the second terminal device associated with the recipient is determined based on the recipient's anonymous nickname. For example, the recipient's mobile phone number can be determined based on the recipient's anonymous nickname, and then the actual message content can be sent to the second terminal device associated with the recipient via the mobile phone number in accordance with the message prompt method.
[0052] S104, obtain the server encryption key, encrypt the sending object, receiving object, target chat information, and group chat identifier according to the server encryption key, obtain the group chat log, and save the group chat log.
[0053] In this embodiment of the disclosure, a server key seed can be randomly generated, two index variables can be created, and the server key seed can be shuffled to obtain the server encryption key.
[0054] It should be noted that the process of obtaining the server key seed and the process of obtaining the block key seed by the terminal device have the same reasoning concept. The process of obtaining the block key seed by the terminal device will be described in detail in the following embodiments.
[0055] In some implementations, the server-side log stream takes the following form:
[0056] Where ID is the group ID. For the sending object, For the receiving object, where ,E'(x, ) indicates the use Encrypt x. This represents the server's encryption key, and timestamp represents the timestamp. Indicates character concatenation. This represents the i-th target chat message.
[0057] When you need to use the group chat logs later, simply reverse the steps in S104 to decrypt them and you can then parse out the log content.
[0058] In this embodiment, based on the user identifier, group members, group chat identifier, message transition identifier, and initial message content, the receiving object and its corresponding target chat information are obtained. The actual message content is then sent to the second terminal device associated with the receiving object according to the message prompt method. This enables anonymous chat services based on 5G messaging, providing secure and private group chat services and a comfortable chat experience for users. The system obtains the server encryption key and encrypts the sending object, receiving object, target chat information, and group chat identifier using this key. Group chat logs are also obtained and saved, protecting user privacy and data security. By adding anonymous group chat functionality to 5G messaging, the functionality of 5G messaging can be enriched, and its application scenarios can be improved.
[0059] In some implementations, before receiving chat information sent by the first terminal device, the method further includes: responding to receiving an anonymous group creation request sent by the third terminal device, creating an anonymous group chat according to the anonymous group creation request, and obtaining the virtual group chat number, virtual management number, and group chat identifier of the anonymous group chat. For example, the third terminal device sends an anonymous group creation request to the server (group management chatbot), and the anonymous group creation request is "create anonymous group: group name". After receiving the request from the terminal, the server generates an anonymous group chat G. To ensure the uniqueness of the group chat identifier ID, the group chat ID can be obtained directly through creation. The generation logic is as follows:
[0060] Where UID is the user ID, hash() is a one-way hash function, timestamp(l) is the current timestamp of length l, serial(l') is the sequence number of length l', and random( ) is of length A random number is generated, and a virtual group chat number is generated for that group chat. and virtual management number .
[0061] The user identifier can be obtained directly by performing a reverse lookup on the user object associated with the third-party terminal device. Optionally, the user identifier can be carried in the anonymous group creation request; this application does not restrict this. Optionally, the sequence number starts from 1 and increments by 1 with each call. The number is then added to the target length by adding leading zeros to obtain the sequence number. l , These represent preset target lengths, which can be the same length or different lengths; this application does not impose any restrictions on this.
[0062] Among them, virtual group chat numbers timestamp(l )| , A fixed prefix is configured for the virtual group chat number on the server. Optionally, after creating an anonymous group chat, a notification of successful group chat creation is sent to a third-party terminal device using the aforementioned virtual number.
[0063] Among them, virtual management number timestamp(l )| , A fixed prefix is configured for the virtual management number of the server. The virtual management number is used to modify the name of the anonymous group chat, modify the group members, modify the anonymous nicknames of the group members, and disband the anonymous group chat according to the requests of the preset terminal devices.
[0064] In this embodiment of the disclosure, the third device is a terminal device that needs to create an anonymous group.
[0065] In some implementations, upon receiving an anonymous group creation request from a third terminal device, the system first determines whether the target object associated with the third terminal device is compliant. Optionally, a compliance score can be calculated. If the compliance score is greater than or equal to a preset compliance score threshold, the target object is deemed compliant, and an anonymous group can be created according to the anonymous group creation request. If the compliance score is less than the preset compliance score threshold, the target object is deemed non-compliant, and a creation failure notification is sent to the third terminal device. The compliance score... The calculation method is as follows:
[0066] in This is the initial value for the compliance score, which defaults to 100. 'f' represents the number of compliance reward attempts. Here, h represents the compliance event score coefficient, and h represents the number of compliance penalties. This represents the penalty coefficient for compliance events, and s represents the locked status, which is 0 when locked and 1 by default.
[0067] In this embodiment of the application, based on the constructed compliance score The calculation method determines whether a terminal device can enable the anonymous chat function, realizing a basic compliance check of the terminal device to reduce the cost of compliance checks.
[0068] After a group is successfully created, the target object associated with the third-party terminal device is the group administrator. The third-party terminal device can manage the group through a group management applet or a group management chatbot. Management functions include changing the group name, disbanding the group, changing group members, changing anonymous nicknames, and disbanding the group chat.
[0069] In some implementations, the third terminal device can communicate with a virtual management number. Send the message "Group Management: Modify Group Name: Original Group Name: New Group Name" or open the group chat management mini-program "Group Management => Modify Group Name" and enter the original group name and new group name on the opened page to modify the group name.
[0070] In some implementations, the third terminal device can communicate with a virtual management number. Send the message "Group Management: Disband Group: Group Name" or open the group chat management mini-program and select "Group Management => Disband Group" to enter the group name on the opened page to disband the group.
[0071] In some implementations, the third terminal device can communicate with a virtual management number. You can invite new group members to join the group chat by sending the message "Invite User: Group Name: Invited User's Phone Number" or by opening the group chat management mini-program, selecting "User Management => Invite User," and entering the invited user's mobile phone number on the opened page.
[0072] In some implementations, after a new group member is invited to join the group, the server generates an invitation 5G message and sends it via a virtual management number. An invitation message is sent to the terminal device associated with the new group member. This message contains a button within a card that indicates whether to accept the invitation. When this button is triggered, the new group member is added to the group ID using a virtual management number. A notification message is sent to the new group member who has joined the group chat, indicating that they are now a virtual administrator and displaying their group chat information and a randomly generated initial nickname. This message also informs the new group member that they can now manage the group chat using a virtual group chat number. Send notification messages individually to the terminal devices associated with group members.
[0073] In some implementations, the third terminal device can communicate with a virtual management number. You can change a group member's anonymity in the group by sending the message "Change Group Nickname: Group Name: Change Group Nickname" or by entering the group nickname in the group chat management mini-program "User Management => Change Group Nickname".
[0074] In some implementations, the third terminal device can communicate with a virtual management number. To leave the group chat, send the message "Leave Group Chat: Group Name" or go to the group chat management mini-program "User Management => Leave Group Chat" and click "Confirm" on the page.
[0075] In this embodiment of the application, by supporting anonymous group chats with 5G messages, a variety of group chat management and targeted group chat message sending schemes are provided, increasing the flexibility of 5G messages.
[0076] Figure 2 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application, as follows: Figure 2 As shown, this method is executed by the server and includes the following steps: S201, in response to receiving the terminal authentication factor sent by the fourth terminal device, the terminal authentication factor is parsed to obtain the first terminal random number, the first signature encryption result, the second terminal random number, and the key decryption result.
[0077] In this embodiment of the application, the fourth terminal device is a terminal device that needs to be authenticated before saving the log. Optionally, the fourth terminal device can also be any one of the first terminal device, the second terminal device, and the third terminal device.
[0078] Among them, the first terminal random number r1 and the first signature encryption result R1 are used to authenticate the fourth terminal device, the second terminal random number r2 is used for the fourth terminal device to authenticate the server, and the key decryption result S' is used to verify the logs of the fourth terminal device.
[0079] S202, Obtain the server's private key and the fourth terminal device's public key.
[0080] The server's private key (keypris) and the fourth terminal device's public key (keypubc) are used for mutual authentication between the server and the fourth terminal device.
[0081] S203, decrypt the first signature encryption result according to the terminal device public key to obtain the signature decryption result.
[0082] In this embodiment, the first signature encryption result is obtained by the fourth terminal device encrypting the first terminal random number using the terminal device's private key. Following the reverse reasoning of the above concept, this application decrypts the first signature encryption result using the terminal device's public key to obtain the signature decryption result. The fourth terminal device is then authenticated based on whether the signature decryption result is the same as the first terminal random number.
[0083] Alternatively, the signature decryption result can be represented by the following formula: ),in, The function represents using y to decrypt x; similarly... ) represents the signature decryption result obtained by decrypting the first signature encryption result based on the terminal device's public key.
[0084] S204. If the signature decryption result is the same as the first terminal random number, it is determined that the fourth terminal device has passed authentication. The second terminal random number is then encrypted using the server's private key to obtain the second signature encryption result.
[0085] Alternatively, the signature decryption result can be verified using the following formula. Is it the same as the random number from the first terminal? ,in The function is true when x and y are the same, and false otherwise. Similarly, here if... and If they are different, it indicates that the fourth terminal device's authentication failed. and If the results are the same, it confirms that the fourth terminal device has passed authentication.
[0086] In other words, if the signature decryption result is different from the first terminal's random number, it is determined that the fourth terminal device's authentication has failed, and an authentication failure indication message is generated and sent to the fourth terminal device. If the signature decryption result is the same as the first terminal's random number, it is determined that the fourth terminal device's authentication has passed, and the second terminal's random number is generated based on the server's private key keypris. Encryption is performed to obtain a second signature encryption result, which is used to instruct the fourth terminal device to authenticate the server.
[0087] Alternatively, the second signature encryption result R2 can be obtained using the following formula: R2 = .
[0088] S205, based on the second signature encryption result, generate verification pass information and send the verification pass information to the fourth terminal device.
[0089] A verification pass message is generated based on the second signature encryption result and sent to the fourth terminal device. After receiving the verification pass message, the fourth terminal device parses the verification pass message to obtain the second signature encryption result in order to authenticate the server.
[0090] In some implementations, the verification pass message may directly carry the second signature encryption result; in other implementations, the verification pass message does not carry the second signature encryption result, but instead sends the second signature encryption result as a server authentication factor to the terminal device.
[0091] S206. The key decryption result is encrypted using the public key of the terminal device to obtain the key encryption result. The key encryption result is then decrypted asymmetrically using the private key of the server to obtain and store the block key seed.
[0092] In some implementations, the fourth terminal device performs asymmetric encryption on the block key seed using the server's public key to obtain the key encryption result, and then decrypts the key encryption result using the terminal device's private key to obtain the key decryption result. Following the reverse logic described above, the server needs to encrypt the key decryption result S' using the terminal device's public key to obtain the key encryption result, and then perform asymmetric decryption on the key encryption result using the server's private key to obtain and store the block key seed.
[0093] Alternatively, the block key seed S can be obtained using the following formula:
[0094] In this embodiment, a novel log stream format for the terminal and server is constructed, chat log blocks are packaged and processed, the packaged content is broadcast, and the packaged content is authenticated and verified. Through distributed backup log streams, the resource consumption of the server in saving backups is reduced. At the same time, based on encryption and verification, it is ensured that messages are not tampered with or illegally read.
[0095] In anonymous chat groups, non-compliant information may be present. To ensure that chat logs are tracked after non-compliant behavior occurs, this proposal provides a log tracking function for anonymous chat groups, saving chat log flow audit logs and ensuring high data availability through multiple replicas. Simultaneously, a distributed chat log storage scheme reduces the massive storage resource consumption caused by server-side storage of chat logs. To guarantee the immutability and privacy of the distributed storage logs, this proposal designs a distributed group chat log storage scheme. This scheme retains only one complete compressed log on the server, while the remaining backup blocks are compressed and stored on each user's individual terminal device. Each block is treated as a blockchain, and its data digest value is extracted and, after broadcasting and authentication, recorded in the public chat log blockchain.
[0096] Figure 3 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application, as follows: Figure 3 As shown, this method is executed by the server and includes the following steps: S301, in response to receiving a log block packet sent by the fourth terminal device, parse the log block packet and obtain the encrypted and saved log.
[0097] In some implementations, when a fourth terminal device needs to verify the logs, it sends a log block packet to the server. This log block packet is obtained by the fourth terminal device packaging the encrypted and stored logs. By reverse-engineering the above concept and parsing the log block packet, the encrypted and stored logs can be obtained.
[0098] In some implementations, the fourth terminal device also sends a random number r to the server so that the fourth terminal device can authenticate the server again in subsequent transactions.
[0099] S302, decrypt the encrypted and saved log according to the block key seed to obtain the terminal log content.
[0100] In some implementations, the process of the fourth terminal device obtaining the encrypted log is as follows: Two index variables are created; the block key seed is shuffled to obtain the terminal device encryption key; the message content and the target group members corresponding to the message content are encrypted using the terminal device encryption key to obtain the encrypted information; the encrypted information and group identifier are then encrypted again using the terminal device encryption key to obtain the encrypted log. Following the reverse logic described above, the server creates two index variables, shuffles the block key seed to obtain the terminal device encryption key, and decrypts the encrypted log using the terminal device encryption key to obtain the terminal log content. The terminal log content includes information related to messages received or sent by the fourth terminal device, such as the message content, the sending object, the receiving object, and the time.
[0101] S303: Decrypt the group chat logs using the server's encryption key to obtain the server log content.
[0102] In some implementations, the server decrypts the locally stored group chat logs using its encryption key to obtain the server log content. Optionally, the server log content can be filtered based on the occurrence time of the terminal log content to be verified, so as to facilitate subsequent verification of the terminal log content based on the filtered server log content, thereby improving verification efficiency and avoiding waste of computing resources.
[0103] S304. Verify the terminal log content based on the server log content. If the server log content includes the terminal log content, generate a log verification message indicating successful verification. If the server log content does not include the terminal log content, generate a log verification message indicating failed verification.
[0104] In some implementations, the encrypted log P is parsed to obtain the terminal log content stream, specifically the i-th terminal log content stream. The process requires iterating through and verifying whether the i-th chat message and its corresponding recipient are recorded in the local server logs. The i-th chat message and its corresponding recipient are represented as follows: t represents the total number of messages within a preset time interval. Indicates the identifier of the receiving object. Let represent the i-th chat message, h() represent a hash operation, and then iterate through and verify the i-th chat message and the corresponding sender, i.e. In Check if there are any records in the local server logs. If there are records during each iteration, set... Increment by 1 (initially 0), when... The server and the record corresponding to this record Consistent and , Increment by 1 (initially 0), and after the traversal is complete, when... = Upon successful verification, a verification log message is generated. This can be understood as the number of times the loop is performed. This can be understood as the number of times chat messages are recorded locally during the traversal process.
[0105] In some implementations, the log verification message can indicate that the verification passed, while in other implementations, the log verification message can indicate that the verification failed.
[0106] S305 sends the log verification message to the fourth terminal device.
[0107] In some implementations, a log verification message is sent to a fourth terminal device to indicate to the fourth terminal device that its encrypted log storage verification has passed.
[0108] In this embodiment of the application, by recording logs on each mobile terminal and uploading the hash of each message to the blockchain to form a block, a distributed log backup system is formed, which can save the application disk space consumed by multiple log copy backups, and at the same time, form automatically traceable files.
[0109] Figure 4 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application, as follows: Figure 4 As shown, this method is executed by a terminal device and includes the following steps: S401, obtain one or more chat messages for each group identifier within a preset time interval, and the target group members corresponding to each chat message.
[0110] The target group members include both the sender and the receiver.
[0111] In some implementations, the preset time interval can be one day; in other implementations, the preset time interval can be two days or more, or other time intervals. This application does not impose any restrictions on this.
[0112] S402, obtain the terminal device encryption key, encrypt the chat information and the target group members corresponding to the chat information according to the terminal device encryption key, and obtain the encrypted information.
[0113] In some implementations, a block key seed can be randomly generated, two index variables can be created, and the block key seed can be shuffled to obtain the encryption key for the terminal device.
[0114] In some implementations, after generating the block key seed, the server is authenticated. After successful authentication, two index variables are created, and the block key seed is shuffled to obtain the encryption key for the terminal device.
[0115] In some implementations, the encrypted information also includes timestamps for sending and receiving chat messages.
[0116] S403, based on the terminal device's encryption key, re-encrypts the encrypted information and group identifier, and obtains the encrypted and saved log.
[0117] In some implementations, the encrypted information and group identifier are encrypted using the terminal device's encryption key to obtain the encrypted storage log. In other implementations, the encrypted information is encrypted again using the terminal device's encryption key, and then combined with the group identifier to generate the encrypted storage log.
[0118] Alternatively, the i-th encrypted log entry Li can be represented by the following formula: Li=
[0119] in, Indicates encrypted information, This represents the encryption key for the terminal device, and ID represents the group identifier.
[0120] In some implementations, the chat information in the encrypted log can also be the value obtained by hashing the chat information.
[0121] In some implementations, after obtaining the encrypted logs, an XOR operation can be performed on the encrypted logs to further enhance data security. Correspondingly, when parsing the encrypted logs, the inverse XOR operation needs to be performed.
[0122] S404: Broadcast block packets based on the encrypted log to verify the encrypted log. If the verification is successful, save the data digest of the encrypted log on the blockchain.
[0123] In some implementations, the encrypted logs are packaged, log block packets are obtained, and the log block packets are broadcast to the server to verify the encrypted logs. If the verification is successful, the data digest of the encrypted logs is saved on the blockchain.
[0124] In some implementations, the encrypted logs are packaged, log block packets are obtained, and the log block packets are broadcast to the server and the terminal devices associated with the target group members to jointly verify the encrypted logs. When the verification is successful, the data digest result of the encrypted logs is saved on the blockchain.
[0125] When you need to use the logs from the terminal device later, simply reverse the steps described above to decrypt them and you can then parse the log content.
[0126] In some implementations, the terminal device is also used to: obtain anonymous chat information and a virtual group chat number, wherein the anonymous chat message includes a message transition identifier and initial message content; and send the anonymous chat information to the virtual group chat number.
[0127] In some implementations, the terminal device is also used to: obtain an anonymous group creation request; and send the anonymous group creation request to a server. Optionally, the anonymous group creation request can be obtained within a mini-program or application (APP) based on the target object's gesture operation; the anonymous group creation request includes the group chat name.
[0128] In some implementations, after the server creates an anonymous group chat, it generates a group chat creation success notification and sends it to the terminal device. The terminal device is also used to receive the group chat creation success notification sent by the server.
[0129] The embodiments of this application can provide a secure and private group chat service, offering users a comfortable chat experience while protecting user privacy and data security.
[0130] Figure 5 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application, as follows: Figure 5 As shown, this method is executed by the terminal device, wherein obtaining the terminal device's encryption key includes the following steps: S501, randomly generate block key seed, first terminal random number, second terminal random number, and obtain terminal device private key and server public key.
[0131] In this embodiment of the application, the block key seed is used to generate the encryption key of the terminal device. For example, the terminal randomly generates the block key seed S (the seed is obtained and saved according to one for each block). Optionally, the length of the block key seed is 256 bits. In other embodiments, it can be other lengths, which are not limited in this application.
[0132] In this embodiment of the application, the first terminal random number, the second terminal random number, the terminal device private key, and the server public key are used for subsequent authentication between the terminal device and the server.
[0133] S502: The block key seed is asymmetrically encrypted using the server's public key to obtain the key encryption result, and the key encryption result is decrypted using the terminal device's private key to obtain the key decryption result.
[0134] In some implementations, the block key seed S is asymmetrically encrypted using the server's public key keypubs to obtain the key encryption result. The key is encrypted using the terminal device's private key, keypric. Decryption is performed to obtain the key decryption result. .
[0135] S503, encrypt the first terminal random number according to the terminal device's private key, and obtain the first signature encryption result.
[0136] In some implementations, a random number is generated for the first terminal based on the terminal device's private key. Perform encryption and obtain the first signature encryption result. The first terminal random number r1 and the first signature encryption result R1 are used by the server to authenticate the terminal device.
[0137] S504, generate a terminal authentication factor based on the first terminal random number, the first signature encryption result, the second terminal random number, and the key decryption result.
[0138] Among them, the terminal identity factor is used to instruct the server to perform terminal authentication on the terminal device, and generate an authentication success message and send it to the terminal device when the authentication is successful.
[0139] Alternatively, the terminal authentication factor V1 can be obtained using the following formula:
[0140] S505 sends the terminal authentication factor to the server. Upon receiving the authentication pass message from the server, it parses the authentication pass information and obtains the second signature encryption result.
[0141] In some implementations, after receiving the terminal authentication factor, the server parses the terminal authentication factor to obtain a first terminal random number, a first signature encryption result, a second terminal random number, and a key decryption result. Based on the first terminal random number and the first signature encryption result, the server authenticates the terminal device. After successful authentication, a verification success message is generated.
[0142] In some implementations, the verification pass message includes a random number generated by the second terminal based on the server's private key keypris. Encryption is performed to obtain the second signature encryption result. After receiving the verification success message from the terminal device, the server parses the verification success information to obtain the second signature encryption result.
[0143] In some implementations, the verification pass information does not include the second signature encryption result, and it is necessary to obtain the server authentication factor again, which is the second signature encryption result.
[0144] S506, decrypt the second signature encryption result according to the server's public key to obtain the signature decryption result. If the signature decryption result is the same as the second random number, the server authentication is confirmed to be successful.
[0145] In some implementations, the terminal device generates a random number for the second terminal based on the server's private key keypris. The second encrypted signature, R2, is obtained through encryption. Following the reverse engineering described above, R2 is decrypted using the server's public key, keypubs, to obtain the decrypted signature. If the signature decryption result The result is the same as the second random number R2, confirming that the server authentication is successful.
[0146] Alternatively, the signature decryption result can be verified using the following formula. Is it the same as the second terminal random number R2? If here and If they are different, it indicates that server authentication has failed. and If the results are the same, it confirms that the server authentication was successful.
[0147] S507: Create two index variables, shuffle the block key seed, and obtain the terminal device encryption key.
[0148] In some implementations, two index variables i and j are defined, with initial values of 0 and 0 respectively. S is shuffled to generate a keystream. This refers to the encryption key for the terminal device. Its logic involves iteratively executing the following steps (the number of iterations equals the length of the log file L): (1) i = (i + 1) mod 256 (2) j = (j + S[i]) mod 256 (3) Swap the values of S[i] and S[j], i.e., swap(S[i], S[j]); (4) Obtain a byte value t of the keystream by calculating S[(S[i] + S[j]) mod 256]; (5) Output this byte as an element k[r]=S[t] of the key stream; Where S[i] and S[j] represent the i-th element and the j-th element in S, respectively, mod represents the modulo operation, and k[r] is the value at the r-th position in PWr.
[0149] In this embodiment, a novel log stream format for the terminal and server is constructed, chat log blocks are packaged and processed, the packaged content is broadcast, and the packaged content is authenticated and verified. Through distributed backup log streams, the resource consumption of the server in saving backups is reduced. At the same time, based on encryption and verification, it is ensured that messages are not tampered with or illegally read.
[0150] Figure 6 This is a flowchart of a group chat method based on 5G messaging according to an embodiment of this application, as follows: Figure 6 As shown, this method is executed by a terminal device. It involves broadcasting block packets based on the encrypted log to verify the encrypted log. Upon successful verification, the data digest of the encrypted log is saved on the blockchain. The method includes the following steps: S601, package the encrypted and stored logs and obtain the log block package.
[0151] In the terminal, logs are packaged by day, and the processing logic for log block package P is as follows:
[0152] Where t represents the total number of messages a user receives that day in the anonymous message group. This is the i-th log entry for the day, in which .
[0153] S602 broadcasts log block packets to the server and the terminal devices associated with the target group members.
[0154] In some implementations, log block packets are broadcast to a server, which parses and verifies the packets to determine whether the encrypted log storage has passed verification. In some implementations, the terminal device also sends a random number r to the server so that subsequent terminal devices can re-authenticate with the server.
[0155] In some implementations, the log block packet is broadcast to the server and other terminal devices associated with the target group members. The server and other terminal devices jointly parse and verify the log block packet of the current terminal device. Subsequently, based on the log verification messages from the server and other terminal devices, they jointly determine whether the encrypted and stored log has passed verification. In some implementations, the terminal device also sends a random number r to the server and other terminal devices to facilitate subsequent authentication of the server and other terminal devices by the current terminal device.
[0156] S603 receives log verification messages sent by the server and the terminal devices associated with the target group members.
[0157] In some implementations, the current terminal device broadcasts log block packets to the server and receives log verification messages sent by the server.
[0158] In some implementations, the current terminal device broadcasts log block packets to the server and other terminal devices, and receives log verification messages sent by the server and other terminal devices respectively.
[0159] In some implementations, the current terminal device also sends a random number r to the server, and the server synchronously returns... ,in This indicates that the server signs 'r', and 'keypris' represents the private key of the signing certificate held by the server. After receiving 'r', the terminal device decrypts it using the server's public key to obtain... ,like Consistent with 'r', authentication is successful. The process of the current terminal device authenticating other terminal devices is the same as the process of the current terminal device authenticating the server, and will not be described in detail here.
[0160] S604: Determine whether the encrypted log has been verified based on the log verification message. If the verification is successful, perform a hash operation on the log block packet to obtain the data digest result.
[0161] In some implementations, the current terminal device broadcasts log block packets to the server and receives log verification messages sent by the server. The log verification messages sent by the server indicate that the encrypted log storage verification has passed.
[0162] In some implementations, the current terminal device broadcasts log block packets to the server and other terminal devices, receives log verification messages from the server and other terminal devices, and jointly determines whether the encrypted log storage has passed verification based on the log verification messages sent by the server and other terminal devices. For example, if the server's log verification message indicates that the encrypted log storage has passed verification, and the number of other terminal devices indicating that the encrypted log storage has passed verification exceeds a preset proportion, then the encrypted log storage is determined to have passed verification.
[0163] After receiving the log block packet sent by the current terminal device, other terminal devices verify, encrypt, and save the log according to the log block packet. For the process described in steps S301 to S305, it will not be repeated here.
[0164] Upon successful verification, a hash operation is performed on the log block packet to obtain the data digest result. .
[0165] S605, save the data summary results to the blockchain.
[0166] In some implementations, the data summarization results Save the data to the blockchain.
[0167] In some implementations, the data summarization results All random numbers r, signatures sent to r by the server and other terminal devices are stored on the blockchain.
[0168] In this embodiment of the application, by recording logs on each mobile terminal and uploading the hash of each message to the blockchain to form a block, a distributed log backup system is formed, which can save the application disk space consumed by multiple log copy backups, and at the same time, form automatically traceable files.
[0169] The acquisition, transmission, storage, use, and processing of data in this disclosed technical solution all comply with relevant laws and regulations.
[0170] It should be noted that in the embodiments disclosed herein, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary and are intended only to illustrate the feasibility of implementing the technical solution of this application. However, they do not mean that the applicant has used or necessarily used such solutions.
[0171] Figure 7 This is a structural block diagram of a 5G messaging-based group chat device according to an embodiment of this disclosure, as follows: Figure 7 As shown, the 5G messaging-based group chat device 700 includes: The first acquisition module 710 is used to respond to receiving anonymous chat information sent by the first terminal device to the virtual group chat number, and to acquire user identifier, group chat identifier, group members, message conversion identifier and initial message content based on the anonymous chat information and the virtual group chat number. The first terminal device is the terminal device associated with the sending object. The second acquisition module 720 is used to acquire the receiving object and the target chat information corresponding to the receiving object based on the user identifier, group member, group chat identifier, message conversion identifier and initial message content. The target chat information includes the actual message content and message prompt method. The sending module 730 is used to send the actual message content to the second terminal device associated with the receiving object in accordance with the message prompt method; The log saving module 740 is used to obtain the server encryption key, encrypt the sending object, receiving object, target chat information, and group chat identifier according to the server encryption key, obtain the group chat log, and save the group chat log.
[0172] In some implementations, the first acquisition module 710 is further configured to: In response to receiving an anonymous group creation request from a third terminal device, an anonymous group chat is created according to the anonymous group creation request, and the virtual group chat number, virtual management number and group chat identifier of the anonymous group chat are obtained. The virtual management number is used to modify the name of the anonymous group chat, modify the group members, modify the anonymous nicknames of the group members and disband the anonymous group chat according to the request of the preset terminal device. Send a notification to the third terminal device that the group chat has been successfully created.
[0173] In some embodiments, the second acquisition module 720 is further configured to: Based on the user identifier and group chat identifier, determine the anonymous nickname of the recipient in the anonymous group chat; Based on the message conversion identifier, determine the recipient, the message conversion format corresponding to the recipient, and the message prompting method corresponding to the recipient from the group members; The initial message content and anonymous nickname are converted according to the message conversion format to obtain the actual message content corresponding to the receiving object.
[0174] In some implementations, the 5G messaging-based group chat device 700 further includes an authentication module 750, used for: In response to receiving the terminal authentication factor sent by the fourth terminal device, the terminal authentication factor is parsed to obtain the first terminal random number, the first signature encryption result, the second terminal random number, and the key decryption result; Obtain the server's private key and the public key of the fourth terminal device; Decrypt the first signature encryption result using the terminal device's public key to obtain the signature decryption result; If the signature decryption result is the same as the random number of the first terminal, it is determined that the fourth terminal device has passed the authentication. The random number of the second terminal is then encrypted according to the server's private key to obtain the second signature encryption result. A verification pass message is generated based on the second signature encryption result and sent to the fourth terminal device. The decryption result of the key is encrypted using the public key of the terminal device to obtain the encrypted key result. Then, the encrypted key result is decrypted asymmetrically using the private key of the server to obtain and save the block key seed.
[0175] In some implementations, the verification module 750 is also used for: In response to receiving a log block packet sent by a fourth terminal device, the log block packet is parsed to obtain and save the encrypted log; The encrypted and saved logs are decrypted based on the block key seed to obtain the terminal log content; Decrypt the group chat logs using the server's encryption key to obtain the server log content; The terminal log content is verified based on the server log content. If the server log content includes the terminal log content, a verification message is generated indicating that the verification has passed. If the server log content does not include the terminal log content, a verification message is generated indicating that the verification has failed. Send the log verification message to the fourth terminal device.
[0176] The embodiments of this application can provide a secure and private group chat service, offering users a comfortable chat experience while protecting user privacy and data security.
[0177] Figure 8 This is a structural block diagram of a 5G messaging-based group chat device according to an embodiment of this disclosure, as follows: Figure 8 As shown, the 5G messaging-based group chat device 800 includes: The first acquisition module 810 is used to acquire one or more chat messages of each group identifier within a preset time interval, and the target group members corresponding to each chat message. The target group members include the sender and the receiver. The first encryption module 820 is used to obtain the encryption key of the terminal device, encrypt the chat information and the target group members corresponding to the chat information according to the encryption key of the terminal device, and obtain the encrypted information; The second encryption module 830 is used to re-encrypt the encrypted information and group identifier according to the encryption key of the terminal device, and obtain the encrypted storage log; The log storage module 840 is used to broadcast block packets based on the encrypted storage log in order to verify the encrypted storage log. When the verification is successful, the data digest result of the encrypted storage log is saved on the blockchain.
[0178] In some implementations, the first encryption module 820 is further configured to: Randomly generate a block key seed, a random number for the first terminal, and a random number for the second terminal, and obtain the private key of the terminal device and the public key of the server. The block key seed is asymmetrically encrypted using the server's public key to obtain the key encryption result, and then the key encryption result is decrypted using the terminal device's private key to obtain the key decryption result. The first terminal random number is encrypted using the terminal device's private key to obtain the first signature encryption result; A terminal authentication factor is generated based on the first terminal random number, the first signature encryption result, the second terminal random number, and the key decryption result. The terminal authentication factor is used to instruct the server to perform terminal authentication on the terminal device. When the authentication is successful, an authentication success message is generated and sent to the terminal device. The terminal authentication factor is sent to the server. Upon receiving the authentication pass message from the server, the authentication pass information is parsed to obtain the second signature encryption result. Decrypt the second signature encryption result using the server's public key to obtain the signature decryption result. If the signature decryption result is the same as the second random number, the server authentication is confirmed to be successful. Create two index variables, shuffle the block key seed, and obtain the terminal device encryption key.
[0179] In some implementations, the log storage module 840 is also used for: Package the encrypted and stored logs to obtain log block packages; Broadcast the log block packets to the server and the terminal devices associated with the target group members; Receive log verification messages sent by the server and the terminal devices associated with the target group members; The system determines whether the encrypted log has been successfully verified based on the log verification message. If the verification is successful, the system performs a hash operation on the log block packet to obtain the data digest result. The data summary results are saved on the blockchain.
[0180] In some implementations, the 5G messaging-based group chat device 800 further includes a transceiver module 850, used for: Obtain anonymous chat information and virtual group chat numbers. Anonymous chat messages include message transition identifiers and initial message content. Send anonymous chat messages to a virtual group chat number.
[0181] In some implementations, the transceiver module 850 is further configured to: Obtain the anonymous group creation request; Send the anonymous group creation request to the server; Receive a notification from the server that the group chat has been successfully created.
[0182] In this embodiment, a novel log stream format for the terminal and server is constructed, chat log blocks are packaged and processed, the packaged content is broadcast, and the packaged content is authenticated and verified. Through distributed backup log streams, the resource consumption of the server in saving backups is reduced. At the same time, based on encryption and verification, it is ensured that messages are not tampered with or illegally read.
[0183] Figure 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure.
[0184] like Figure 9 As shown, the electronic device 900 includes: The memory 901 and the processor 902 are connected by a bus 903, which connects the different components (including the memory 901 and the processor 902). The memory 901 stores a computer program, and when the processor 902 executes the program, it implements the group chat method based on 5G messages according to the present disclosure.
[0185] Bus 903 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0186] Electronic device 900 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by electronic device 900, including volatile and non-volatile media, removable and non-removable media.
[0187] Memory 901 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 904 and / or cache memory 905. Electronic device 900 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 906 may be used to read and write non-removable, non-volatile magnetic media (… Figure 9 Not shown; usually referred to as a "hard drive"). Although Figure 9 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 903 via one or more data media interfaces. Memory 901 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.
[0188] A program / utility 908 having a set (at least one) of program modules 907 may be stored, for example, in memory 901. Such program modules 907 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 907 typically perform the functions and / or methods described in the embodiments of this disclosure.
[0189] Electronic device 900 can also communicate with one or more external devices 909 (e.g., keyboard, pointing device, display 911, etc.), and with one or more devices that enable a user to interact with the electronic device 900, and / or with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 912. Furthermore, electronic device 900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) through network adapter 913. Figure 9 As shown, network adapter 913 communicates with other modules of electronic device 900 via bus 903. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0190] The processor 902 executes various functional applications and data processing by running programs stored in the memory 901.
[0191] It should be noted that the implementation process and technical principles of the electronic device in this embodiment are explained in the foregoing description of the group chat method based on 5G messages in this disclosure embodiment, and will not be repeated here.
[0192] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium.
[0193] When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the group chat method based on 5G messaging as described above. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0194] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0195] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A group chat method based on 5G messaging, characterized in that, Executed by the server, including: In response to receiving anonymous chat information sent by a first terminal device to a virtual group chat number, the user identifier, group chat identifier, group members, message conversion identifier, and initial message content are obtained based on the anonymous chat information and the virtual group chat number, wherein the first terminal device is the terminal device associated with the sending object; Based on the user identifier, the group members, the group chat identifier, the message conversion identifier, and the initial message content, obtain the receiving object and the target chat information corresponding to the receiving object, wherein the target chat information includes the actual message content and the message prompt method; The actual message content is sent to the second terminal device associated with the receiving object according to the message prompt method; Obtain the server encryption key, encrypt the sending object, the receiving object, the target chat information, and the group chat identifier according to the server encryption key, obtain the group chat log, and save the group chat log. The server encryption key is obtained by creating two index variables and shuffling a randomly generated server key seed.
2. The method according to claim 1, characterized in that, Before receiving the chat information sent by the first terminal device, the method further includes: In response to receiving an anonymous group creation request sent by a third terminal device, an anonymous group chat is created according to the anonymous group creation request, and the virtual group chat number, virtual management number and group chat identifier of the anonymous group chat are obtained. The virtual management number is used to modify the name of the anonymous group chat, modify the group members, modify the anonymous nicknames of the group members and disband the anonymous group chat according to the request of the preset terminal device. A group chat creation success notification is sent to the third terminal device.
3. The method according to claim 2, characterized in that, The step of obtaining the receiving object and the target chat information corresponding to the receiving object based on the user identifier, the group members, the group chat identifier, the message conversion identifier, and the initial message content includes: Based on the user identifier and the group chat identifier, the anonymous nickname of the sending target in the anonymous group chat is determined; Based on the message conversion identifier, determine the receiving object, the message conversion format corresponding to the receiving object, and the message prompting method corresponding to the receiving object from the group members; The initial message content and the anonymous nickname are converted according to the message conversion format to obtain the actual message content corresponding to the receiving object.
4. The method according to claim 1, characterized in that, Also includes: In response to receiving a terminal authentication factor sent by a fourth terminal device, the terminal authentication factor is parsed to obtain a first terminal random number, a first signature encryption result, a second terminal random number, and a key decryption result; Obtain the server's private key and the public key of the fourth terminal device; The first signature encryption result is decrypted using the public key of the terminal device to obtain the signature decryption result; If the signature decryption result is the same as the first terminal random number, it is determined that the fourth terminal device has passed authentication. The second terminal random number is then encrypted using the server private key to obtain the second signature encryption result. A verification pass message is generated based on the second signature encryption result, and the verification pass message is sent to the fourth terminal device; The key decryption result is encrypted using the public key of the terminal device to obtain the key encryption result. Then, the key encryption result is decrypted asymmetrically using the private key of the server to obtain and store the block key seed.
5. The method according to claim 4, characterized in that, Also includes: In response to receiving a log block packet sent by a fourth terminal device, the log block packet is parsed to obtain and save encrypted logs; The encrypted and saved log is decrypted according to the block key seed to obtain the terminal log content; The group chat logs are decrypted using the server encryption key to obtain the server log content; The terminal log content is verified based on the server log content. If the server log content includes the terminal log content, a verification message indicating successful verification is generated. If the server log content does not include the terminal log content, a verification message indicating unsuccessful verification is generated. The log verification message is sent to the fourth terminal device.
6. A group chat method based on 5G messaging, characterized in that, Executed by the terminal device, including: Obtain one or more chat messages for each group identifier within a preset time interval, and the target group members corresponding to each chat message. The target group members include the sender and receiver. The chat messages include anonymous chat messages, which are messages sent by group members to a virtual group chat number. Obtain the terminal device encryption key, encrypt the chat information and the target group members corresponding to the chat information according to the terminal device encryption key, and obtain the encrypted information. The terminal device encryption key is obtained by creating two index variables and shuffling the randomly generated block key seed. Based on the encryption key of the terminal device, the encrypted information and the group identifier are encrypted again to obtain the encrypted storage log; Block packets are broadcast based on the encrypted storage log to verify the encrypted storage log. When the verification is successful, the data digest result of the encrypted storage log is saved on the blockchain.
7. The method according to claim 6, characterized in that, Obtaining the encryption key of the terminal device includes: Randomly generate a block key seed, a random number for the first terminal, and a random number for the second terminal, and obtain the private key of the terminal device and the public key of the server. The block key seed is asymmetrically encrypted using the server's public key to obtain a key encryption result, and the key encryption result is decrypted using the terminal device's private key to obtain a key decryption result. The first terminal random number is encrypted using the terminal device's private key to obtain the first signature encryption result; A terminal authentication factor is generated based on the first terminal random number, the first signature encryption result, the second terminal random number, and the key decryption result. The terminal authentication factor is used to instruct the server to perform terminal authentication on the terminal device. When the authentication is successful, an authentication success message is generated and sent to the terminal device. The terminal authentication factor is sent to the server. Upon receiving the authentication pass message from the server, the authentication pass information is parsed to obtain the second signature encryption result. The second signature encryption result is decrypted using the server public key to obtain the signature decryption result. If the signature decryption result is the same as the random number of the second terminal, the server authentication is confirmed to be successful. Two index variables are created, and the block key seed is shuffled to obtain the encryption key for the terminal device.
8. The method according to claim 6 or 7, characterized in that, The step of broadcasting block packets based on the encrypted storage log to verify the encrypted storage log, and saving the data digest result of the encrypted storage log on the blockchain when the verification is successful, includes: The encrypted and saved logs are packaged to obtain log block packets; The log block packet is broadcast to the server and the terminal devices associated with the target group members; Receive log verification messages sent by the server and the terminal devices associated with the members of the target group; Based on the log verification message, determine whether the encrypted saved log has passed verification. If the verification is successful, perform a hash operation on the log block packet to obtain the data digest result. The data summary results are saved on the blockchain.
9. The method according to claim 6, characterized in that, Also includes: Obtain anonymous chat information and virtual group chat numbers, wherein the anonymous chat information includes message transition identifiers and initial message content; The anonymous chat message is sent to the virtual group chat number.
10. The method according to claim 6, characterized in that, Also includes: Obtain the anonymous group creation request; Send the anonymous group creation request to the server; Receive a notification from the server indicating that the group chat has been successfully created.
11. A group chat device based on 5G messaging, characterized in that, Deployed on a server, including: The first acquisition module is used to respond to receiving anonymous chat information sent by a first terminal device to a virtual group chat number, and to acquire user identifier, group chat identifier, group members, message conversion identifier and initial message content according to the anonymous chat information and the virtual group chat number, wherein the first terminal device is the terminal device associated with the sending object; The second acquisition module is used to acquire the receiving object and the target chat information corresponding to the receiving object based on the user identifier, the group member, the group chat identifier, the message conversion identifier and the initial message content. The target chat information includes the actual message content and the message prompt method. The sending module is used to send the actual message content to the second terminal device associated with the receiving object in accordance with the message prompt method; The log saving module is used to obtain the server encryption key, encrypt the sending object, the receiving object, the target chat information, and the group chat identifier according to the server encryption key, obtain the group chat log, and save the group chat log; The 5G messaging-based group chat device is also used to implement the method described in any one of claims 1-5.
12. A group chat device based on 5G messaging, characterized in that, Deployed on terminal devices, including: The first acquisition module is used to acquire one or more chat messages of each group identifier within a preset time interval, and the target group members corresponding to each chat message, wherein the target group members include the sender and the receiver; The first encryption module is used to obtain the encryption key of the terminal device, encrypt the chat information and the target group members corresponding to the chat information according to the encryption key of the terminal device, and obtain encrypted information. The second encryption module is used to encrypt the encrypted information and the group identifier again according to the encryption key of the terminal device, and obtain the encrypted storage log; The log storage module is used to broadcast block packets based on the encrypted storage log to verify the encrypted storage log. When the verification is successful, the data digest result of the encrypted storage log is stored on the blockchain. The 5G messaging-based group chat device is also used to implement the method described in any one of claims 6-10.
13. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the instructions to implement the method as described in any one of claims 1-5, or to implement the method as described in any one of claims 6-10.
14. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as claimed in any one of claims 1-5, or the method as claimed in any one of claims 6-10.
Citation Information
Patent Citations
Group chat communication system and method thereof
CN104639556A
Method and device for sending message in instant messaging software
CN105681154A
