CN108134736B - Group establishing method and device - Google Patents

Group establishing method and device Download PDF

Info

Publication number
CN108134736B
CN108134736B CN201810055169.5A CN201810055169A CN108134736B CN 108134736 B CN108134736 B CN 108134736B CN 201810055169 A CN201810055169 A CN 201810055169A CN 108134736 B CN108134736 B CN 108134736B
Authority
CN
China
Prior art keywords
data
group
terminal
audio
sound
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810055169.5A
Other languages
Chinese (zh)
Other versions
CN108134736A (en
Inventor
黄科超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Chengdu Co Ltd
Original Assignee
Tencent Technology Chengdu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Chengdu Co Ltd filed Critical Tencent Technology Chengdu Co Ltd
Priority to CN201810055169.5A priority Critical patent/CN108134736B/en
Publication of CN108134736A publication Critical patent/CN108134736A/en
Application granted granted Critical
Publication of CN108134736B publication Critical patent/CN108134736B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/185Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a group establishing method and device, and belongs to the technical field of communication. The method comprises the following steps: when the group building operation is detected, a group is built and group data is obtained, wherein the group data comprises a group identifier and a group entering password; converting the group data into audio data; and playing audio data, wherein the audio data is used for indicating a second terminal which acquires the audio data to convert the audio data into group data, and joining the group according to the group identification and the group entering password. In the invention, the group owner can invite the group members to join the group at the same time through the audio data played by the first terminal, thereby simplifying the group building operation and improving the group building efficiency.

Description

Group establishing method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for group establishment.
Background
Group chat refers to different users communicating in the same group. In practical applications, in order to implement group chat, a user generally needs to establish a group first, and then invite other users to join the group, so that group chat can be performed between users who successfully join the group. Wherein, the user who establishes the group is generally called a group owner, and the other users who join the group are generally called group members.
In the related art, a clustering method is provided, including: the first terminal establishes a group according to the group establishing operation of the group owner and acquires group data of the group, wherein the group data comprises a group identifier and a group entering password of the group. Thereafter, referring to fig. 1A, group members can join the group by 3 ways: 1. code scanning grouping: the first terminal displays the two-dimensional code, the two-dimensional code carries the group data, and the group members can join the group by scanning the two-dimensional code displayed by the first terminal through the second terminal. 2. Inputting group data into a group: the first terminal displays the group data, the group owner informs the group members of the group data displayed by the first terminal, and the group members can join the group by inputting the group data in the second terminal. 3. Entering a group according to the invitation: the first terminal sends invitation group information to the second terminal used by the group members according to the invitation operation of the group, and the second terminal can join the group according to the confirmation group-entering operation of the group members after receiving the invitation group information.
The clustering method provided by the related art has the disadvantages of complex operation, long clustering time and low clustering efficiency. For example, approach 1 requires each group member to scan into the group one by one; mode 2 requires the group owner to inform each group member of group data one by one; approach 3 requires the group to send invitations to the various group members on a group-by-group basis.
Disclosure of Invention
The embodiment of the invention provides a group establishing method and a group establishing device, which can be used for solving the problems of complex group establishing operation and low group establishing efficiency in the related technology. The technical scheme is as follows:
in one aspect, a group establishment method is provided, and is applied to a first terminal, where the method includes:
when the group building operation is detected, a group is built and group data is obtained, wherein the group data comprises a group identification and a group entering password of the group;
converting the group data into audio data;
and playing the audio data, wherein the audio data is used for indicating a second terminal which receives the audio data to convert the audio data into the group data, and the second terminal joins the group according to the group identification and the group entering password.
In one aspect, an apparatus for clustering is provided and applied to a first terminal, the apparatus includes:
the group establishing module is used for establishing a group and acquiring group data when group establishing operation is detected, wherein the group data comprises a group identifier and a group entering password of the group;
the conversion module is used for converting the group data into audio data;
and the playing module is used for playing the audio data, the audio data is used for indicating a second terminal which receives the audio data to convert the audio data into the group data, and the second terminal is added into the group according to the group identification and the group entering password.
In one aspect, a first terminal is provided, which includes a processor and a memory, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the instruction, the program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the above clustering method.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a set of codes, or a set of instructions is stored, which is loaded and executed by a processor to implement the above-mentioned clustering method.
In one aspect, a group establishment method is provided, and is applied to a second terminal, where the method includes:
acquiring audio data;
when the audio data are converted to obtain group data, the group indicated by the group identification is added according to the group identification and the group entering password included in the group data, the audio data are obtained by converting the group data by the first terminal, and the group data are obtained by the first terminal according to the group establishing operation.
In one aspect, an apparatus for clustering is provided and applied to a second terminal, the apparatus includes:
the acquisition module is used for acquiring audio data;
and the joining module is used for joining the group indicated by the group identification according to the group identification and the group entering password included in the group data when the group data is obtained by converting the audio data, wherein the audio data is obtained by converting the group data by a first terminal, and the group data is obtained by the first terminal according to group establishing operation.
In one aspect, a second terminal is provided, which includes a processor and a memory, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the instruction, the program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the above clustering method.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a set of codes, or a set of instructions is stored, which is loaded and executed by a processor to implement the above-mentioned clustering method.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the first terminal can establish the group and acquire the group data comprising the group identifier and the group entering password according to the group establishing operation of the group owner, then the group data is sent to the second terminals of the group members by playing the audio data, and the second terminals can directly join the group according to the group data received by the audio data. That is, the group owner can invite the group members to join the group at the same time through the audio data played by the first terminal, and each group member can join the group at the same time according to the audio data received by the second terminal, thereby avoiding the tedious operation that the group owner needs to invite the group members one by one, or the group members need to join the group one by one, saving the group building time and improving the group building efficiency.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1A is a flow chart of a clustering method provided in the related art;
FIG. 1B is a diagram illustrating a clustering system according to an embodiment of the present invention;
FIG. 1C is a schematic diagram of another clustering system provided by an embodiment of the present invention;
FIG. 1D is a flowchart of a clustering method according to an embodiment of the present invention;
fig. 1E is a schematic diagram of a solomon encoding and decoding process according to an embodiment of the present invention;
FIG. 1F is a flowchart illustrating a method for converting group data into audio data according to an embodiment of the present invention;
fig. 1G is a flowchart of converting audio data according to an embodiment of the present invention;
FIG. 1H is a flowchart of another clustering method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a clustering apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a clustering apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal 400 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Before explaining the embodiments of the present invention in detail, an application scenario of the embodiments of the present invention will be described.
In daily life, people who need to participate in certain activities or have certain relationships are often pulled into a group in instant messaging software, so that the people can negotiate certain problems in the group together or share certain viewpoints or information.
In the current group establishment mode, the group owner is relied on to invite the group members one by one or the group members are relied on to join one by one, so that the operation is complicated, the interference is easy to happen, the group establishment time is long, the group establishment efficiency is low, and the rapid group establishment requirement that the group owner pulls the related members into the group cannot be met.
For example, when group members scan codes into a group, if there are many group members, it is necessary to queue each group member to scan codes into a group, which takes a long time. For another example, when group members enter a group according to group data notified by the group owner, the group owner is required to notify each group member of the group data one by one, which is time consuming, and in a noisy environment, the group members easily receive wrong group data, resulting in group entry failure. For another example, when the group members enter the group according to the invitation of the group owner, the group owner needs to send the invitation to each group member one by one through the terminal operation, which is also time consuming.
In order to solve the problems of long group building time and low group building efficiency in the related art and meet the requirement of fast group building that after a group owner establishes a group, the group owner can pull related members into the group at the same time, the embodiment of the invention provides a group building method which can pull all the members in the nearby range into the group at the same time by playing sound.
The clustering method provided by the embodiment of the invention is mainly applied to a scene of clustering in an open occasion in a nearby range. For example, a player group is quickly established on a football stadium, or a participant group is quickly established in a meeting room, or a party group is quickly established on a dining table, at a family party, etc.
The system architecture of the embodiments of the present invention is described next.
Fig. 1B is a schematic diagram of a group establishment system according to an embodiment of the present invention, as shown in fig. 1B, the group establishment system includes a first terminal 10 and a second terminal 20. The first terminal 10 is a terminal used by a group owner, and the second terminal 20 is a terminal used by a group member.
It should be noted that the group establishment system may include one second terminal 20, or may include a plurality of second terminals 20, and fig. 1B only illustrates that the group establishment system includes a plurality of second terminals 20 as an example.
The first terminal 10 is configured to, when detecting a group establishment operation, establish a group and acquire group data, where the group data includes a group identifier and a group entry password of the group; converting the group data into audio data; and playing the audio data, wherein the audio data is used for indicating a second terminal which acquires the audio data to convert the audio data into group data, and joining the group according to a group identifier and a group entering password which are included in the group data.
Wherein, the second terminal 20 is used for obtaining audio data; and when the audio data is converted to obtain group data, adding the group indicated by the group identifier according to the group identifier and the group entering password included in the group data.
In practical applications, the first terminal 10 and the second terminal 20 may be specifically terminals such as a mobile phone, a tablet computer, and a wearable device, which is not limited in the embodiment of the present invention.
Further, the clustering system further comprises a server 30, and the server 30 may be a background server for maintaining the group. Taking the example of the clustering system establishing a group based on an instant messaging application, the server 30 may be a background server of the instant messaging application.
In the process of establishing a group and acquiring group data by the first terminal 10, the first terminal 10 may generate group data according to the group establishing operation, and then send the group data to the server 30, and the server 30 establishes the group according to the group data. Alternatively, the first terminal 10 may send a group request to the server 30 according to a group operation, the server 30 generates group data based on the group request, establishes a group according to the group data, and sends the group data to the first terminal 10.
In the process that the second terminal 20 joins the group according to the group identifier and the group entering password, the second terminal 20 may first obtain the user identifier currently logged in by the second terminal 20, and then send a group entering request to the server 30, where the group entering request carries the user identifier, the group identifier, and the group entering password, and the server 30 adds the user identifier to the group according to the group identifier and the group entering password.
For example, fig. 1C is a schematic diagram of another group building system provided in an embodiment of the present invention, where the group building system includes a first terminal 10, a plurality of second terminals 20, and a server 30, and based on the group building system, the embodiment of the present invention may complete the group building operation through the following steps 1) to 5):
1) the first terminal 10 generates group data according to the group establishment operation of the group owner and uploads the group data to the server 30, and the server 30 establishes a group according to the group data. The group data comprises a group identification and a group entering password of the group.
2) The first terminal 10 transmits the group data to the second terminal 20 within range of the accessory by voice.
3) The second terminal 20 sends a group entry request to the server 30 according to the group data received by voice, where the group entry request carries the user identifier, the group identifier, and the group entry password logged in by the second terminal 20.
4) The server 30 transmits a group success message to the second terminal 20 after successfully adding the user id to the group according to the group id and the group entry password.
5) The server 30 sends a notification message to the first terminal 20, the notification message being used to notify the subscriber identity to join the group, i.e. to notify the group members of successful group joining.
It should be noted that, in the embodiment of the present invention, the group building operation is completed through the above steps 1) to 5) based on the group building system shown in fig. 1C, and it can be understood in the art that the above steps 1) to 5) do not limit the group building method provided in the embodiment of the present invention.
The clustering method provided by the embodiment of the invention will be described in detail below.
Fig. 1D is a flowchart of a clustering method according to an embodiment of the present invention, which can be applied to the clustering system shown in fig. 1B or fig. 1C, as shown in fig. 1D, the method includes the following steps:
step 101, when detecting a group establishing operation, a first terminal establishes a group and acquires group data, wherein the group data comprises a group identification and a group entering password of the group.
The first terminal is a terminal used by a group owner. The group establishment operation is used to instruct the first terminal to establish a group, and specifically may trigger an operation of a group establishment option for a group owner. The group option may be an icon or button, etc. For example, the group option may be a "quick pull" button that a group owner may trigger a group operation by clicking on.
Further, the group establishing operation may be implemented based on an installed instant messaging application, and the first terminal may establish a group and acquire group data when the group establishing operation is detected by the installed instant messaging application. In particular, the group operation may be an operation in which the group owner triggers a group option displayed in the instant messaging application.
The group identifier is used to uniquely identify the group, and may specifically be a group name or a group ID (identification, account number). The group ID may consist of letters, numbers, or a combination of both.
The group entry password is a password for joining the group corresponding to the group, and may be referred to as a group entry password. In practical applications, a group entry password is usually set for a group when the group is established, so that group members join the group based on the group entry password. The group entering password is set for the group, so that the group management is convenient, the group security is ensured, and the group management confusion caused by that group members can randomly join any group is avoided.
The group-entering password and the group identifier can be generated independently, and the group-entering password can also be generated according to the group identifier. For example, in the case that the group entry password is generated according to the group ID, when the group ID is the group ID and the group ID is a number, the group entry password may be composed of the first M even-numbered digits of the group ID.
Wherein, M can be preset and is a positive integer. For example, M may be 3 or 4, etc. The group ID may be calculated from even bits 0 or odd bits 1, which is not limited in the embodiment of the present invention. When starting with even 0, the first digit of the group ID is located at even 0, the second digit is located at odd 1, and so on. When starting with odd digit 1, the first digit of the group ID is at odd digit 1, the second digit is at even digit 2, and so on.
Further, when the number of even digits of the group ID is less than M, after selecting the digits corresponding to all the even digits from the group ID, padding data may be added before the selected digits, so that the number of digits of the obtained group-entering password is equal to M. The padding data may be 0, or may be other preset numbers, which is not limited in this embodiment of the present invention.
For example, as shown in table 1 below, assuming that the group ID is 1234567, the group entry password consists of the first 4 even-numbered digits of the group ID, and the group ID is calculated from the even-numbered digits 0, the group entry password may consist of the digits 1 corresponding to the first even-numbered digit 0, the digits 3 corresponding to the second even-numbered digit 2, the digits 5 corresponding to the third even-numbered digit 4, and the digits 7 corresponding to the fourth even-numbered digit 6, i.e., the group entry password is 1357.
TABLE 1
Figure BDA0001553541190000071
Figure BDA0001553541190000081
It should be noted that, in the embodiment of the present invention, only the group ID and the group entry password shown in table 1 are taken as an example for description, but the group ID and the group entry password shown in table 1 do not limit the group data.
In practical applications, the group data may be generated by the first terminal or generated by the server. Specifically, the operation of establishing a group and acquiring group data may include the following two implementation manners:
the first implementation mode comprises the following steps: the first terminal generates group data according to the detected group establishing operation, then the group data is sent to the server, and the server establishes a group according to the group data.
In practical application, the first terminal may randomly generate group data according to a preset group data generation algorithm. After receiving the group data, the server may generate a group corresponding to the group identifier included in the group data.
Further, after receiving the group data, the server may further determine whether a group identifier included in the group data exists in the group identifier of the established group, that is, determine whether the group identifier is occupied by the established group; when the group mark does not exist in the group marks of the established groups, establishing the groups according to the group data; and when the group identifier exists in the group identifier of the established group, sending regeneration indication information to the first terminal, wherein the regeneration indication information is used for indicating the first terminal to regenerate the group data until the group identifier included in the generated group data does not exist in the group identifier of the established group, and establishing the group according to the group data.
When the group identification included in the group data does not exist in the group identification of the established group, the step of establishing the group according to the group data is executed, so that the generation of the group according to the occupied group identification can be avoided, and the newly established group and the established group can be clearly distinguished.
The second implementation mode comprises the following steps: sending a group building request to a server according to the group building operation, generating group data by the server based on the group building request, building a group according to the group data, and sending the group data to a first terminal; and receiving the group data sent by the server.
In a second manner, the first terminal may obtain the group data by receiving the group data sent by the server. After receiving the group establishment request, the server may generate group data according to the established group identifier, so that the generated group data includes a group identifier different from the established group identifier.
Step 102: the first terminal converts the group data into audio data.
In the embodiment of the present invention, in order to send the group data by voice, the first terminal may convert the group data into audio data.
Specifically, the operation of converting the group data into the audio data may include the following steps 1021-:
step 1021: and combining the group identification and the group entering password to obtain source code data.
The source code data refers to data obtained by combining the group identifier and the group entering password.
Specifically, the source code data may be obtained by adding the group entry password to the group identifier. For example, assuming the group id is 1234567 and the group entry password is 1357, the source code data may be 12345671357. Of course, the source code data may also be obtained by adding the group entry password to the group id. For example, assuming the group id is 1234567 and the group entry password is 1357, the source code data may be 13571234567. The embodiment of the present invention does not limit the combination manner of the source code data.
Step 1022: and carrying out Solomon coding on the source code data, and determining to obtain coded data according to a coding result.
By performing the solomon encoding on the source code data, the source code data can be encrypted to ensure the security and stability of the group data in the transmission process.
Specifically, when the group ID is the group ID and the source code data is the decimal data, performing solomon encoding on the source code data, and determining the encoded data according to the encoding result may include: converting the source code data into hexadecimal data; and carrying out Solomon coding on the hexadecimal data, and determining to obtain the coded data according to a coding result.
Since the solomon code is a hexadecimal code and each code word to be coded is a hexadecimal number, the source code data needs to be converted into hexadecimal data in the process of determining the coded data according to the source code data. Furthermore, in order to facilitate conversion of the source code data into hexadecimal data, the source code data may be set in advance as decimal data, i.e., Int (integer) type data. Specifically, the source code data may be guaranteed to be decimal data by setting the group identifier as the group ID and setting both the group ID and the group-in password as positive integers. By limiting the original data to decimal data, the success rate of sound wave transmission and identification can be greatly improved, and the complexity of the Solomon code is reduced.
Further, as the solomon code is a fixed-length code, that is, after the source code data is converted into hexadecimal data, the hexadecimal data with preset digits needs to be obtained, so performing the solomon code on the source code data, and determining to obtain the coded data according to the coding result may further include: when the digit of the hexadecimal data is equal to a preset digit, carrying out Solomon coding on the hexadecimal data, and determining to obtain the coded data according to a coding result; when the number of bits of the hexadecimal data is less than the preset number of bits, adding a specified number of filling data before the hexadecimal data to obtain the hexadecimal data with the preset number of bits; performing Solomon coding on the hexadecimal data with the preset digit, and determining to obtain the coded data according to a coding result, wherein the specified number is the difference between the preset digit and the digit of the hexadecimal data.
The padding data may be 0, and certainly may also be other preset data, which is not limited in this embodiment of the present invention. The preset number of digits may be set in advance, and since the number of digits of hexadecimal data obtained by converting decimal data is 8 at maximum, the preset number of digits may be set to 8.
For example, assuming that the predetermined number of bits is 8, the padding data is 0, and the hexadecimal data obtained after the decimal source code data is converted is 123ABCD, a 0 may be added before 123ABCD to obtain encoded data 0123 ABCD.
Specifically, performing solomon encoding on the hexadecimal data with the preset number of bits, and obtaining the encoded data according to the encoding result includes: performing Solomon coding on the hexadecimal data with the preset digit to obtain a redundant code; and adding the redundant code to the hexadecimal data with the preset digit to obtain the coded data. That is, the encoded data includes hexadecimal source code data and redundant codes.
It should be noted that the solomon code is a channel code for forward error correction, which is a technique for controlling transmission errors in a unidirectional communication system. In the process of the Solomon coding, redundancy of data to be coded can be obtained in a mode of solving redundancy at a plurality of points to obtain redundant codes, and then the redundant codes are transmitted or stored. When the receiver correctly receives enough points, the original data to be coded can be recovered through the directional processing of the Solomon code, namely the Solomon decoding.
Errors generated in the data transmission process can be recovered by carrying out the Solomon coding on the source code data, the error rate of the transmitted data is reduced, the finally obtained audio data is prevented from being interfered by external sound when being played, or the data transmission errors caused by equipment difference are prevented, the accuracy of data transmission is improved, and the success rate of data transmission is improved.
For example, referring to fig. 1E, assuming that the hexadecimal data with the preset number of bits is 0123ABCD, the 0123ABCD is encoded in a solomon encoding manner, and the obtained redundant code is FEDCBA9, FEDCBA9 may be added after 0123ABCD to obtain encoded data 0123ABCDFEDCBA9
Referring to FIG. 1E, assume encoded data 0123ABCDFEDCBA9After transmission, 3-bit error codes are generated, and data received by a receiving end becomes 12CAB7DFEECBA9After the data received by the receiving end is subjected to the solomon decoding, the 12CAB7D can be usedFEECBA9Reducing to 0123 ABCDFADDCBA 9, so that the receiving end can obtain the correct processing result.
Step 1023: and determining sound frequency corresponding to each data in a plurality of data included in the coded data according to the corresponding relation between the stored data and the sound frequency.
That is, the encoded data may be converted into sound frequencies according to the correspondence between the stored data and the sound frequencies. The correspondence between the stored data and the sound frequency may be preset, and the sound frequency stored in the correspondence may be cut from a plurality of sound frequencies included in the treble table in advance.
In practical applications, the sound frequency stored in the correspondence relationship may be a sound frequency that can be heard by human ears, or a sound frequency that cannot be heard by human ears. At present, it is generally considered that the sound frequency that can be heard by human ears is 20-20KHz, when it is desired that the first terminal has a corresponding sound effect in the process of transmitting the group data by sound, the sound frequency stored in the corresponding relationship may be set between 20-20KHz, and when it is not desired that the first terminal has a corresponding sound effect in the process of transmitting the group data by sound, i.e. when it is desired that the first terminal transmits the group data in a mute manner (when the human ears cannot hear sound), the sound frequency stored in the corresponding relationship may be set above 20KHz or below 20 Hz.
Specifically, determining the sound frequency corresponding to each of the plurality of data included in the encoded data according to the stored correspondence relationship between the data and the sound frequency may include the following two implementations:
the first implementation mode comprises the following steps: if the corresponding relation between the stored data and the sound frequency comprises a plurality of first data and corresponding sound frequencies, and the plurality of first data are determined based on all the constituent data of the group identification and the group entering password, the sound frequency corresponding to the designated data is determined according to the plurality of first data and the corresponding sound frequencies, and the designated data is any one of the plurality of data included in the encoded data.
The plurality of first data may include data obtained by encoding all constituent data of the group identifier and the group entry password. For example, when the data obtained by encoding the source code data composed of the group identifier and the group entry password is hexadecimal data, the plurality of first data may include all the component data of the hexadecimal data, i.e., 16 data between 0 and F. Where 16 data between 0-F includes 10 numbers between 0-9 and 6 letters between A-F.
The sound frequencies corresponding to the plurality of first data may be preset, for example, may be obtained from a high-pitched sound chart. For example, 16 sound frequencies corresponding to (+1) - (+16) may be extracted from the high sound table shown in table 2 below as the sound frequencies corresponding to 16 data between 0 and F, respectively.
TABLE 2
Figure BDA0001553541190000111
Figure BDA0001553541190000121
In table 2, the unit of the sound frequency is Hz (hertz), and the content in parentheses after the sound frequency is used to indicate the semitone distance from the center C (261.63Hz) of the corresponding sound frequency.
After intercepting the 16 sound frequencies corresponding to (+1) - (+16) as the sound frequencies corresponding to the 16 data between 0 and F, respectively, the correspondence relationship between the stored data and the sound frequencies can be shown in table 3 below. Suppose the encoded data is 0123ABCDFEDCBA9,The audio frequency corresponding to each data in the encoded data can be found from table 3 below.
TABLE 3
First data Frequency of sound First data Frequency of sound
0 277.18 8 440.00
1 293.66 9 466.16
2 311.13 A 493.88
3 329.63 B 523.25
4 349.23 C 554.37
5 369.99 D 587.33
6 392.00 E 622.25
7 415.30 F 659.26
It should be noted that, in the embodiment of the present invention, only the correspondence between the data and the sound frequency described in table 3 is taken as an example for description, but table 3 does not limit the embodiment of the present invention.
The second implementation mode comprises the following steps: if the corresponding relationship between the data and the sound frequency comprises a plurality of first data and corresponding sound frequencies, and a plurality of second data and corresponding sound frequencies, the sound frequencies corresponding to the second data are greater than the sound frequencies corresponding to the first data, the first data are determined based on all the component data of the group identification and the group entering password, the second data correspond to the first data one by one, the second data are obtained by respectively converting the first data, when the number of bits of the specified data in the coded data is a first number of bits, the sound frequency corresponding to the specified data is determined according to the first data and the corresponding sound frequencies, the specified data is any one of the data, and the first number of bits is an odd number or an even number; when the number of bits of the specified data in the coded data is a second number of bits, converting the specified data into second data according to the stored corresponding relation between the plurality of first data and the plurality of second data; determining a sound frequency corresponding to the second data according to the plurality of second data and the corresponding sound frequency; and determining the sound frequency corresponding to the second data as the sound frequency corresponding to the specified data, wherein the second number of bits is different from the first number of bits.
The plurality of first data may include data obtained by encoding all constituent data of the group identifier and the group entry password. For example, when the data obtained by encoding the source code data composed of the group identifier and the group entering password is hexadecimal data, the plurality of first data may include all the component data of the hexadecimal data, that is, the plurality of first data includes 16 data between 0 and F. Where 16 data between 0-F includes 10 numbers between 0-9 and 6 letters between A-F.
Wherein, the plurality of second data correspond to the plurality of first data one to one. For example, when the plurality of first data are 16 data between 0-F, the second data may be 16 data between G-V, and G-V corresponds to 0-F one to one. That is, the corresponding relationship may store 32 data items between 0 and V.
The sound frequencies corresponding to the plurality of first data and the plurality of second data may be preset, for example, may be obtained from a high-pitched sound chart. The sound frequencies corresponding to the first data are bass frequencies, and the frequencies corresponding to the second data are treble frequencies.
For example, assuming that the plurality of first data includes 16 data between 0-F and the plurality of second data includes 16 data between G-V, in one example, 16 sound frequencies corresponding to (+33) - (+48) may be intercepted as the sound frequencies corresponding to the 16 first data, respectively, and 16 sound frequencies corresponding to (+49) - (+64) may be intercepted as the sound frequencies corresponding to the 16 second data, respectively, from the high-pitched table shown in the above table 2. Accordingly, the correspondence between the stored data and the sound frequency can be shown in table 4 below:
TABLE 4
Figure BDA0001553541190000131
Figure BDA0001553541190000141
It should be noted that, in the embodiment of the present invention, only the correspondence between the data and the sound frequency described in table 4 is taken as an example for description, but table 4 does not limit the embodiment of the present invention.
The encoded data may be calculated from even bits 0 or odd bits 1, which is not limited in this embodiment of the present invention. Assuming that the encoded data is calculated from the even bit 0, and the first bit is even and the second bit is odd, the data corresponding to the even bit data and the odd bit data in the encoded data can be as shown in table 5 below.
TABLE 5
Even bit data First data Odd bit data Second data
0 0 0 G
1 1 1 H
2 2 2 I
3 3 3 J
D D D T
E E E U
F F F V
In the embodiment of the invention, for even bit data of coded data, the bass frequency corresponding to the data can be directly determined; for odd-numbered data of the encoded data, the data may be first converted into second data, and then the treble frequency corresponding to the second data may be determined. Or, for odd-numbered data of the coded data, directly determining the bass frequency corresponding to the data; for even-numbered data of the encoded data, the data is first converted into second data, and then the treble frequency corresponding to the second data is determined. By the method, the coded data are converted into audio data with alternate high and low sound frequencies by adopting an odd-even high and low frequency audio coding algorithm, so that the success rate of the subsequent receiving end for identifying the audio can be improved.
Exemplary, suppose 0123ABCDFEDCBA9Based on the data corresponding to the even bit data and the odd bit data described in table 5, 0123ABCD can be usedFEDCBA9Conversion to 0H2IARCTFUDIBQ9. Then, according to the data and voice frequency correspondence shown in table 4, 0H2IAR shown in table 6 below can be obtainedCTFUDIBQ9Each data corresponding to a voice frequency.
TABLE 6
Data of 0 H 2 I A R C
Frequency of sound 1760.0 4698.6 1975.5 4978.0 6136.0 8372.0 3520.0
T F U D I B Q 9
9397.3 4186.0 9956.1 3729.3 4978.0 3322.4 7902.1 2926.0
Step 1024: and performing audio conversion on the sound frequencies corresponding to the plurality of data to obtain the audio data.
In practical applications, a PCM (Pulse-code modulation) encoding method may be adopted to convert the audio frequencies corresponding to the plurality of data into PCM data corresponding to the plurality of data, respectively. The PCM sound data corresponding to each sound frequency is a segment of continuous sound. That is, by performing audio conversion on audio frequencies corresponding to a plurality of data, a plurality of point-like audio frequencies can be converted into continuous audio data.
Specifically, one data may be selected from the plurality of data, and the following processing may be performed on the selected data until each of the plurality of data is processed:
generating PCM audio data corresponding to the selected data according to the sound frequency corresponding to the selected data by the following formula:
Figure BDA0001553541190000151
wherein z is PCM audio data corresponding to the selected data, x is a preset number of samples, and the number of samples is greater than the number of samplesyAnd S is a preset sampling frequency and A is a preset parameter for the sound frequency corresponding to the selected data.
When the PCM audio data corresponding to the plurality of data is obtained through the above processing, the PCM audio data corresponding to the plurality of data may be sequentially combined to obtain the audio data.
The preset sampling frequency is the reciprocal of the preset number of samples, and the preset number of samples may be preset, for example, the preset number of samples may be 4000 or 4096.
When the preset number of samples is 4096, the preset sampling frequency is 44.1Hz, and the values of x are respectively 0 to 4095, that is, 4096 z values are respectively calculated for the sound frequency corresponding to each selected data according to the difference of the values of x, and the 4096 z values can constitute the audio data corresponding to the selected data.
In one possible implementation, the flow of converting the group data into the audio data may be as shown in fig. 1F. Firstly, hexadecimal conversion can be carried out on source code data to obtain hexadecimal data, wherein the source code data is composed of a group identifier and a group entering password; then, carrying out Solomon coding on the hexadecimal data to obtain coded data; then, carrying out audio conversion on the coded data to obtain audio data; and finally, playing the audio data to generate sound.
Step 103: the first terminal plays the audio data, and sends the group data to the second terminal through the played audio data.
The second terminal is a terminal used by the group member, is located around the first terminal, and can acquire the audio data played by the first terminal. The audio data is used for indicating a second terminal which acquires the audio data to convert the audio data into the group data, and the second terminal joins the group according to the group identification and the group entering password.
Specifically, the first terminal may transmit the audio data to music playing software for playing. The first terminal playing the audio data can generate sound, and the audio data is obtained by converting the group data, so that the group data can be sent to a second terminal nearby the first terminal through the sound. For example, by playing the audio data, a sound of a droplet of a specified duration may be emitted, and the second terminal may acquire the group data by listening to the sound of the droplet emitted by the first terminal.
It should be noted that the propagation form of sound is sound wave, so the clustering method provided by the embodiment of the present invention is a clustering method based on sound wave communication. With respect to the widespread use of infrared, bluetooth or NFC (Near Field Communication), acoustic Communication is often ignored by people, and in fact is an excellent handshaking Communication that can interact with nearby devices without any connection or matching.
Further, before playing the audio data, a specified identifier may be further added to a specified position of the audio data, where the specified identifier is used to indicate that the audio data is the audio data corresponding to the group data. After the second terminal acquires the audio data, whether the audio data contains group data may be determined according to whether the designated identifier exists at the designated position of the audio data. The designated position may be a header field of the audio data, or may be other fields.
Specifically, a specific identifier may be added at a specific position of the audio data corresponding to each data in the encoded data, for example, a specific identifier may be added in a header field of the audio data corresponding to each data.
Step 104: the second terminal acquires the audio data.
The second terminal may acquire the audio data from the collected sound. Specifically, the second terminal may collect surrounding sounds through the installed microphone, and when the sounds are collected through the installed microphone, the collected sounds may be first converted into audio data. Furthermore, the collected sound can be recorded first, and then the recorded sound is converted into audio data.
Specifically, the operation of converting the collected sound into the audio data may be: and carrying out digital processing on the collected sound to obtain the audio data. The second terminal may perform PCM decoding on the collected sound to obtain PCM audio data, and then determine the PCM audio data as the audio data.
Step 105: and when the second terminal converts the audio data to obtain group data, the second terminal joins the group according to the group identification and the group entering password included in the group data.
After the audio data is acquired, the second terminal may further convert the audio data to convert the audio data into group data.
Specifically, converting the audio data may include the following steps 1051 and 1055:
step 1051: the audio data is subjected to fast fourier transform to obtain a plurality of sound frequencies.
By performing fast fourier transform on the audio data, a sound frequency corresponding to each of a plurality of pieces of sound included in the audio data can be obtained.
Step 1052: and determining data corresponding to the plurality of sound frequencies according to the corresponding relation between the stored data and the sound frequencies.
Specifically, the operation of determining the data corresponding to the plurality of sound frequencies according to the correspondence between the stored data and the sound frequencies may include the following two implementation manners:
the first implementation mode comprises the following steps: if the stored data and the sound frequency corresponding relationship includes a plurality of first data and corresponding sound frequencies, and the plurality of first data are determined based on all the constituent data of the group identification and the group entering password, the first data corresponding to the specified sound frequency may be determined according to the stored data and the sound frequency corresponding relationship, and the first data is determined as the data corresponding to the specified sound frequency. The specified sound frequency may be any one of the plurality of sound frequencies. The first data may be determined based on all constituent data of the group identification and the group entry password.
The second implementation mode comprises the following steps: if the corresponding relationship between the data and the sound frequency comprises a plurality of first data and corresponding sound frequencies, and a plurality of second data and corresponding sound frequencies, the sound frequencies corresponding to the plurality of second data are greater than the sound frequencies corresponding to the plurality of first data, the plurality of second data and the plurality of first data are in one-to-one correspondence, and the plurality of second data are obtained by respectively converting the plurality of first data, when the initial data corresponding to the specified sound frequency is determined to be the first data according to the corresponding relationship between the stored data and the sound frequency, the first data is determined to be the data corresponding to the specified sound frequency, and the specified sound frequency is any sound frequency in the plurality of sound frequencies; when the initial data corresponding to the specified sound frequency is determined to be the second data according to the corresponding relation between the stored data and the sound frequency, the second data is converted into the first data according to the corresponding relation between the plurality of stored first data and the plurality of stored second data, and the first data is determined to be the data corresponding to the specified sound frequency.
Step 1053: the encoded data is determined based on the data corresponding to the plurality of audio frequencies.
Specifically, data composed of data corresponding to the plurality of audio frequencies may be determined as the encoded data. In the embodiment of the present invention, the encoded data is generally hexadecimal data.
Step 1054: the source code data is obtained by performing a solomon decoding on the encoded data.
The source code data is obtained by the group identification and the group entering password. The group identification is a group ID.
Specifically, the encoded data may be subjected to solomon decoding to obtain decoded data, and then the source code data may be determined by converting the decoded data into decimal data.
Wherein, the coded data obtained by performing the solomon coding on the source code data is hexadecimal data, and the coded data includes both the hexadecimal source code data and the hexadecimal redundant code, so that the determining the source code data by converting the decoded data into decimal data includes: and converting the data except the redundant codes in the decoded data into decimal data, and determining the decimal data as the source code data.
In one embodiment, the data of the first preset number of bits in the decoded data may be determined as data other than the redundancy code, that is, the data of the first preset number of bits in the decoded data may be converted into decimal data, and the decimal data may be determined as the source code data. For example, when the preset number of bits is 8, the first 8-bit data in the decoded data may be converted into decimal data.
For example, when the encoded data is 12CAB7DFEECBA9Then, by performing solomon decoding on the encoded data, 123ABCD can be obtainedFEDCBA9Then removing the redundancy codeData other than FEDCBA9123ABCD is converted into decimal data, which is the source code data.
Step 1055: and determining the group data according to the source code data.
The source code data is composed of a group identifier and an group entering password, so that the group identifier and the group entering password can be determined from the source code data, and the group identifier and the group entering password are the group data.
For example, when the group ID is a group ID, and the group ID is a number and the group-in password is composed of the first M even-numbered digits of the group ID, the last M data of the source code data may be determined as the group-in password, and the remaining data may be determined as the group ID.
In one possible embodiment, the process of converting the audio data may be as shown in fig. 1G, first performing fourier transform on the audio data to obtain a plurality of sound frequencies; then decoding the plurality of sound frequencies to obtain hexadecimal data; and then, performing Solomon decoding on the hexadecimal data to determine to obtain source code data, and obtaining the group data based on the source code data.
Further, before converting the audio data into group data, the method further includes: and when the specified identification is acquired from the specified position of the audio data, the step of converting the audio data into group data is executed. When the specified identification is not acquired from the specified position of the audio data, the audio data is not converted. Therefore, meaningless conversion of the audio data irrelevant to the group data can be avoided, the processing load of converting the audio data is reduced, and the accuracy of data processing is improved.
According to the group identifier and the group entering password, the operation of joining the group indicated by the group identifier may be: acquiring a user identifier of the current login of the second terminal; sending a group sending request to the server, wherein the group sending request carries the user identifier, the group identifier and the group entering password, and the group entering request is used for requesting the server to add the user identifier to the group according to the group identifier and the group entering password.
Through the steps, the second terminal can automatically join the group based on the acquired audio data, namely, the group members can rapidly join the group without performing extra task operation, and the group joining efficiency is improved.
Further, in order to protect the privacy of the user, the user can also join the group according to the group identifier and the group entering password when the group entering operation for the group data is detected. Wherein the confirmation of the group entry operation may be triggered by the group member based on a confirmation window displayed by the second terminal.
For example, after the second terminal determines that the group data is obtained, a confirmation window for inquiring whether to join the group may be displayed based on the group data. When the confirmation group entering operation is detected based on the confirmation window, the group identification and the group entering password can be added into the group; when no confirmed group entry operation is detected based on the confirmation window, then the group is not added.
In an embodiment, by using the clustering method provided in the embodiment of the present invention, a group can implement one-key clustering, and the clustering process can be as shown in fig. 1H. 1. The group owner clicks a 'quick group pulling' button displayed by the first terminal; 2. the first terminal generates group data and uploads the group data to the server; 3. the first terminal converts the group data into audio data and plays the audio data; 4. a second terminal near the first terminal hears the sound and decodes the heared sound into group data. 5. And the second terminal joins the group according to the group data.
The embodiment of the invention creates a brand-new group pulling mode on the basis of sound wave communication, realizes the function of quickly establishing a group and simultaneously pulling the members of the nearby group into the group, well optimizes the establishment flow and establishment experience in a development scene, and can establish the group simply and quickly by one step through the method.
Further, when a microphone or a processor of the second terminal fails to acquire audio data or cannot convert the acquired audio data into group data, the second terminal may join the group according to the group data input by the group members. The group data input by the group member can be informed by the group owner, and the group owner can acquire the group data based on the group data displayed by the first terminal. By setting group data including the group entering password, the group entering mode is enriched.
In the embodiment of the invention, the first terminal can establish the group and acquire the group data comprising the group identifier and the group entering password according to the group establishing operation of the group owner, then the group data is sent to the second terminals of the group members through the audio data, and the second terminals can directly join the group according to the group data received through the audio data. That is, the group owner can invite the group members to join the group at the same time through the audio data played by the first terminal, and each group member can join the group at the same time according to the audio data received by the second terminal, thereby avoiding the tedious operation that the group owner needs to invite the group members one by one, or the group members need to join the group one by one, saving the group building time and improving the group building efficiency.
Fig. 2 is a schematic structural diagram of a clustering apparatus according to an embodiment of the present invention, which is applied to a first terminal, and as shown in fig. 2, the apparatus includes a clustering module 201, a converting module 202, and a playing module 203.
The group establishing module 201 is configured to establish a group and acquire group data when a group establishing operation is detected, where the group data includes a group identifier and a group entering password of the group;
a conversion module 202, configured to convert the group data into audio data;
the playing module 203 is configured to play the audio data, where the audio data is used to instruct a second terminal that receives the audio data to convert the audio data into the group data, and join the group according to the group identifier and the group entering password.
Optionally, the conversion module 202 comprises:
the combination unit is used for combining the group identification and the group entering password to obtain source code data;
the encoding unit is used for carrying out the Solomon encoding on the source code data and determining to obtain encoded data according to an encoding result;
a first determining unit configured to determine an acoustic frequency corresponding to each of a plurality of data included in the encoded data, based on a correspondence relationship between the stored data and the acoustic frequency;
and the conversion unit is used for carrying out audio conversion on the sound frequencies corresponding to the plurality of data to obtain the audio data.
Optionally, the group identification is a group ID, the source code data is decimal data;
the encoding unit is specifically configured to:
converting the source code data into hexadecimal data;
when the digit of the hexadecimal data is equal to a preset digit, carrying out Solomon coding on the hexadecimal data, and determining to obtain the coded data according to a coding result;
when the number of bits of the hexadecimal data is less than the preset number of bits, adding a specified number of filling data before the hexadecimal data to obtain the hexadecimal data with the preset number of bits; performing Solomon coding on the hexadecimal data with the preset digit, and determining to obtain the coded data according to a coding result, wherein the specified number is the difference between the preset digit and the digit of the hexadecimal data.
Optionally, the correspondence between the data and the sound frequency includes a plurality of first data and corresponding sound frequencies, and a plurality of second data and corresponding sound frequencies, the sound frequencies corresponding to the plurality of second data are greater than the sound frequencies corresponding to the plurality of first data, the plurality of first data include all constituent data of the group identifier and the group entry password, the plurality of second data correspond to the plurality of first data one to one, and the plurality of second data are obtained by converting the plurality of first data respectively;
the first determining unit is specifically configured to:
when the number of bits of the designated data in the coded data is odd, determining the sound frequency corresponding to the designated data according to the plurality of first data and the corresponding sound frequency, wherein the designated data is any one of the plurality of data;
when the number of digits of the specified data in the coded data is an even number, converting the specified data into second data according to the stored corresponding relation between the plurality of first data and the plurality of second data; determining a sound frequency corresponding to the second data according to the plurality of second data and the corresponding sound frequency; and determining the sound frequency corresponding to the second data as the sound frequency corresponding to the specified data.
Optionally, the conversion unit is specifically configured to:
selecting one data from the plurality of data, and executing the following processing on the selected data until each data in the plurality of data is processed:
generating PCM audio data corresponding to the selected data according to the sound frequency corresponding to the selected data by the following formula:
Figure BDA0001553541190000211
wherein z is PCM audio data corresponding to the selected data, x is a preset sampling number, y is a sound frequency corresponding to the selected data, S is a preset sampling frequency, and A is a preset parameter;
when the PCM audio data corresponding to the plurality of data are obtained through the processing, the PCM audio data corresponding to the plurality of data are combined in sequence to obtain the audio data.
Optionally, the apparatus further comprises:
and the adding module is used for adding a specified identifier at a specified position of the audio data, wherein the specified identifier is used for indicating that the audio data is the audio data corresponding to the group data.
In the embodiment of the invention, the first terminal can establish the group and acquire the group data comprising the group identifier and the group entering password according to the group establishing operation of the group owner, and then the group data is sent to the second terminals of the group members by playing the audio data, so that the second terminals directly join the group according to the group data received through the audio data. That is, the group owner can invite the group members to join the group at the same time through the audio data played by the first terminal, and each group member can join the group at the same time according to the audio data received by the second terminal, thereby avoiding the tedious operation that the group owner needs to invite the group members one by one, or the group members need to join the group one by one, saving the group building time and improving the group building efficiency.
Fig. 3 is a schematic structural diagram of a clustering apparatus according to an embodiment of the present invention, which is applied to a second terminal, and as shown in fig. 3, the apparatus includes an obtaining module 301 and a joining module 302.
An obtaining module 301, configured to obtain audio data;
the joining module 302 is configured to, when the audio data is converted to obtain group data, join the group indicated by the group identifier according to the group identifier and the group entering password included in the group data, where the audio data is obtained by converting the group data by the first terminal, and the group data is obtained by the first terminal according to the group establishing operation.
Optionally, the apparatus further comprises a conversion module, the conversion module comprising:
a transform unit, configured to perform fast fourier transform on the audio data to obtain a plurality of sound frequencies;
a first determining unit configured to determine data corresponding to the plurality of sound frequencies based on a correspondence between the stored data and the sound frequencies;
a second determining unit configured to determine encoded data from data corresponding to the plurality of audio frequencies;
a third determining unit configured to obtain source code data by performing solomon decoding on the encoded data;
and a third determining unit, configured to determine the group data according to the source code data.
Optionally, the correspondence between the data and the sound frequency includes a plurality of first data and corresponding sound frequencies, and a plurality of second data and corresponding sound frequencies, the sound frequencies corresponding to the plurality of second data are greater than the sound frequencies corresponding to the plurality of first data, the plurality of second data and the plurality of first data are in one-to-one correspondence, and the plurality of second data are obtained by converting the plurality of first data respectively;
the first determining unit is specifically configured to:
when the initial data corresponding to the specified sound frequency is determined to be the first data according to the corresponding relation between the stored data and the sound frequency, determining the first data to be the data corresponding to the specified sound frequency, wherein the specified sound frequency is any one of the sound frequencies;
when the initial data corresponding to the specified sound frequency is determined to be the second data according to the corresponding relation between the stored data and the sound frequency, the second data is converted into the first data according to the corresponding relation between the plurality of stored first data and the plurality of stored second data, and the first data is determined to be the data corresponding to the specified sound frequency.
Optionally, the third determining unit is specifically configured to:
performing a solomon decoding on the encoded data to obtain decoded data;
converting the data of the front preset digit in the decoded data into decimal data;
the decimal data is determined as the source code data.
Optionally, the apparatus further comprises:
and the triggering module is used for triggering the conversion module to convert the audio data to obtain group data when a specified identifier is acquired from a specified position of the audio data, and the specified identifier is used for indicating that the audio data is the audio data corresponding to the group data.
Optionally, the adding module is specifically configured to:
acquiring a user identifier of the current login of the second terminal;
sending a group sending request to the server, wherein the group sending request carries the user identifier, the group identifier and the group entering password, and the group entering request is used for requesting the server to add the user identifier to the group according to the group identifier and the group entering password.
In the embodiment of the invention, the second terminal can acquire the group data through the audio data played by the first terminal and join the group according to the group data, namely, each group member can join the group simultaneously according to the audio data received by the second terminal, thereby avoiding the complex operation that a group owner needs to invite the group members one by one or the group members need to join the group one by one, saving the group building time and improving the group building efficiency.
It should be noted that: in the clustering apparatus provided in the above embodiment, only the division of the functional modules is illustrated when a group is established, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above. In addition, the embodiments of the clustering apparatus and the clustering method provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in the embodiments of the methods for details, and are not described herein again.
Fig. 4 is a schematic structural diagram of a terminal 400 according to an embodiment of the present invention, where the terminal 400 may be the first terminal or the second terminal according to the foregoing embodiment. Specifically, the terminal 400 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 400 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
Generally, the terminal 400 includes: a processor 401 and a memory 402.
Processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 401 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 402 is used to store at least one instruction for execution by processor 401 to implement the XXXX methods provided by method embodiments herein.
In some embodiments, the terminal 400 may further optionally include: a peripheral interface 403 and at least one peripheral. The processor 401, memory 402 and peripheral interface 403 may be connected by bus or signal lines. Each peripheral may be connected to the peripheral interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 404, touch screen display 405, camera 406, audio circuitry 407, positioning components 408, and power supply 409.
The peripheral interface 403 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 401 and the memory 402. In some embodiments, processor 401, memory 402, and peripheral interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402 and the peripheral interface 403 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 404 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 404 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 404 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 404 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 404 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 405 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 405 is a touch display screen, the display screen 405 also has the ability to capture touch signals on or over the surface of the display screen 405. The touch signal may be input to the processor 401 as a control signal for processing. At this point, the display screen 405 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 405 may be one, providing the front panel of the terminal 400; in other embodiments, the display screen 405 may be at least two, respectively disposed on different surfaces of the terminal 400 or in a folded design; in still other embodiments, the display 405 may be a flexible display disposed on a curved surface or a folded surface of the terminal 400. Even further, the display screen 405 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The Display screen 405 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 406 is used to capture images or video. Optionally, camera assembly 406 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 406 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 407 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 401 for processing, or inputting the electric signals to the radio frequency circuit 404 for realizing voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 400. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 407 may also include a headphone jack.
The positioning component 408 is used to locate the current geographic position of the terminal 400 for navigation or LBS (location based Service). The positioning component 408 can be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, or the galileo System in russia.
The power supply 409 is used to supply power to the various components in the terminal 400. The power source 409 may be alternating current, direct current, disposable or rechargeable. When the power source 409 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 400 also includes one or more sensors 410. The one or more sensors 410 include, but are not limited to: acceleration sensor 411, gyro sensor 412, pressure sensor 413, fingerprint sensor 414, optical sensor 415, and proximity sensor 416.
The acceleration sensor 411 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 400. For example, the acceleration sensor 411 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 401 may control the touch display screen 405 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 412 may detect a body direction and a rotation angle of the terminal 400, and the gyro sensor 412 may cooperate with the acceleration sensor 411 to acquire a 3D motion of the terminal 400 by the user. From the data collected by the gyro sensor 412, the processor 401 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 413 may be disposed on a side bezel of the terminal 400 and/or a lower layer of the touch display screen 405. When the pressure sensor 413 is disposed on the side frame of the terminal 400, a user's holding signal to the terminal 400 can be detected, and the processor 401 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is disposed at the lower layer of the touch display screen 405, the processor 401 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 405. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 414 is used for collecting a fingerprint of the user, and the processor 401 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, processor 401 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 414 may be disposed on the front, back, or side of the terminal 400. When a physical key or vendor Logo is provided on the terminal 400, the fingerprint sensor 414 may be integrated with the physical key or vendor Logo.
The optical sensor 415 is used to collect the ambient light intensity. In one embodiment, the processor 401 may control the display brightness of the touch display screen 405 based on the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 405 is turned down. In another embodiment, the processor 401 may also dynamically adjust the shooting parameters of the camera assembly 406 according to the ambient light intensity collected by the optical sensor 415.
A proximity sensor 416, also known as a distance sensor, is typically disposed on the front panel of the terminal 400. The proximity sensor 416 is used to collect the distance between the user and the front surface of the terminal 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front surface of the terminal 400 gradually decreases, the processor 401 controls the touch display screen 405 to switch from the bright screen state to the dark screen state; when the proximity sensor 416 detects that the distance between the user and the front surface of the terminal 400 gradually becomes larger, the processor 401 controls the touch display screen 405 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 4 is not intended to be limiting of terminal 400 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In this embodiment, the terminal also includes one or more programs, stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing the clustering method performed by the first terminal or the second terminal as described in the embodiment of fig. 1D.
In an embodiment of the present invention, a computer-readable storage medium is further provided, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the storage medium, and the instruction, the program, the code set, or the set of instructions is loaded and executed by a processor to implement the group building method executed by the first terminal or the second terminal according to the embodiment of fig. 1D.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (15)

1. A method for group establishment, applied in a first terminal, the method comprising:
when the group building operation is detected, a group is built and group data is obtained, wherein the group data comprises a group identification and a group entering password of the group;
converting the group data into audio data;
and playing the audio data, wherein the audio data is used for indicating a second terminal which acquires the audio data to convert the audio data into the group data, and joining the group according to the group identification and the group entering password.
2. The method of claim 1, wherein the converting the group data into audio data comprises:
combining the group identification and the group entering password to obtain source code data;
performing Solomon coding on the source code data, and determining to obtain coded data according to a coding result;
determining sound frequency corresponding to each data in a plurality of data included in the encoded data according to the corresponding relation between the stored data and the sound frequency;
and carrying out audio conversion on the sound frequencies corresponding to the plurality of data to obtain the audio data.
3. The method of claim 2, wherein the group identification is a group identification number ID, and the source code data is decimal data;
the performing solomon encoding on the source code data and obtaining encoded data according to an encoding result includes:
converting the source code data into hexadecimal data;
when the number of bits of the hexadecimal data is equal to a preset number of bits, performing Solomon coding on the hexadecimal data, and determining to obtain the coded data according to a coding result;
when the number of bits of the hexadecimal data is smaller than the preset number of bits, adding a specified number of filling data before the hexadecimal data to obtain the hexadecimal data with the preset number of bits; and carrying out Solomon coding on the hexadecimal data with the preset digit, and determining to obtain the coded data according to a coding result, wherein the specified number is the difference between the preset digit and the digit of the hexadecimal data.
4. The method according to claim 2, wherein the correspondence relationship between the data and the sound frequency includes a plurality of first data and corresponding sound frequencies, and a plurality of second data and corresponding sound frequencies, the sound frequencies corresponding to the plurality of second data are greater than the sound frequencies corresponding to the plurality of first data, the plurality of first data are determined based on all the constituent data of the group id and the group entry password, the plurality of second data and the plurality of first data have one-to-one correspondence, and the plurality of second data are obtained by converting the plurality of first data respectively;
the determining a sound frequency corresponding to each of a plurality of data included in the encoded data according to the correspondence between the stored data and the sound frequency includes:
when the number of bits of the designated data in the encoded data is a first number of bits, determining a sound frequency corresponding to the designated data according to the plurality of first data and corresponding sound frequencies, wherein the designated data is any one of the plurality of data, and the first number of bits is an odd number or an even number;
when the number of bits of the specified data in the coded data is a second number of bits, converting the specified data into second data according to the stored corresponding relation between the plurality of first data and the plurality of second data; determining a sound frequency corresponding to the second data according to the plurality of second data and the corresponding sound frequencies; and determining the sound frequency corresponding to the second data as the sound frequency corresponding to the specified data, wherein the second number of bits is different from the first number of bits.
5. The method as claimed in claim 2, wherein said audio converting the sound frequencies corresponding to the plurality of data to obtain the audio data comprises:
selecting one data from the plurality of data, and executing the following processing on the selected data until each data in the plurality of data is processed:
generating PCM audio data corresponding to the selected data according to the sound frequency corresponding to the selected data by the following formula:
Figure FDA0001553541180000021
wherein z is PCM audio data corresponding to the selected data, x is a preset sampling number, y is a sound frequency corresponding to the selected data, S is a preset sampling frequency, and a is a preset parameter;
when the PCM audio data corresponding to the multiple data are obtained through the processing, the PCM audio data corresponding to the multiple data are combined in sequence to obtain the audio data.
6. The method of any of claims 1-5, wherein prior to playing the audio data, further comprising:
and adding a specified identifier at a specified position of the audio data, wherein the specified identifier is used for indicating that the audio data is the audio data corresponding to the group data.
7. A method for group establishment, applied to a second terminal, the method comprising:
acquiring audio data;
when the audio data are converted to obtain group data, the group indicated by the group identification is added according to the group identification and the group entering password included in the group data, the audio data are obtained by converting the group data by the first terminal, and the group data are obtained by the first terminal according to the group establishing operation.
8. The method of claim 7, wherein the converting the audio data into group data comprises:
performing fast Fourier transform on the audio data to obtain a plurality of sound frequencies;
determining data corresponding to the plurality of sound frequencies according to the corresponding relation between the stored data and the sound frequencies;
determining coded data according to the data corresponding to the plurality of sound frequencies;
performing Solomon decoding on the encoded data to obtain source code data;
and determining the group data according to the source code data.
9. The method according to claim 8, wherein the correspondence relationship between the data and the sound frequency includes a plurality of first data and corresponding sound frequencies, and a plurality of second data and corresponding sound frequencies, the sound frequencies corresponding to the second data are greater than the sound frequencies corresponding to the first data, the second data and the first data are in one-to-one correspondence, and the second data are obtained by respectively converting the first data;
the determining the data corresponding to the plurality of sound frequencies according to the corresponding relationship between the stored data and the sound frequencies includes:
when determining that initial data corresponding to a specified sound frequency is first data according to a corresponding relation between stored data and the sound frequency, determining the first data as data corresponding to the specified sound frequency, wherein the specified sound frequency is any one of the sound frequencies;
when the initial data corresponding to the specified sound frequency is determined to be the second data according to the corresponding relation between the stored data and the sound frequency, the second data is converted into the first data according to the corresponding relation between the plurality of stored first data and the plurality of stored second data, and the first data is determined to be the data corresponding to the specified sound frequency.
10. The method of claim 8, wherein said obtaining source code data by performing solomon decoding on said encoded data comprises:
performing Solomon decoding on the encoded data to obtain decoded data;
converting the data of the front preset digit in the decoded data into decimal data;
determining the decimal data as the source code data.
11. The method of any of claims 7-10, wherein prior to converting the audio data into group data, further comprising:
when a specified identifier is acquired from a specified position of the audio data, the step of converting the audio data to obtain group data is performed, and the specified identifier is used for indicating that the audio data is the audio data corresponding to the group data.
12. A group establishment apparatus, for use in a first terminal, the apparatus comprising:
the group establishing module is used for establishing a group and acquiring group data when group establishing operation is detected, wherein the group data comprises a group identifier and a group entering password of the group;
the conversion module is used for converting the group data into audio data;
and the playing module is used for playing the audio data, the audio data is used for indicating a second terminal which acquires the audio data to convert the audio data into the group data, and the second terminal joins the group according to the group identification and the group entering password.
13. A group establishment apparatus, for use in a second terminal, the apparatus comprising:
the acquisition module is used for acquiring audio data;
and the joining module is used for joining the group indicated by the group identification according to the group identification and the group entering password included in the group data when the group data is obtained by converting the audio data, wherein the audio data is obtained by converting the group data by a first terminal, and the group data is obtained by the first terminal according to group establishing operation.
14. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of clustering according to any one of claims 1-6 or claims 7-11.
15. A terminal, characterized in that the terminal comprises a processor and a memory, in which at least one instruction, at least one program, set of codes or set of instructions is stored, which is loaded and executed by the processor to implement the clustering method according to any one of claims 1-6 or claims 7-11.
CN201810055169.5A 2018-01-19 2018-01-19 Group establishing method and device Active CN108134736B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810055169.5A CN108134736B (en) 2018-01-19 2018-01-19 Group establishing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810055169.5A CN108134736B (en) 2018-01-19 2018-01-19 Group establishing method and device

Publications (2)

Publication Number Publication Date
CN108134736A CN108134736A (en) 2018-06-08
CN108134736B true CN108134736B (en) 2020-11-06

Family

ID=62399959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810055169.5A Active CN108134736B (en) 2018-01-19 2018-01-19 Group establishing method and device

Country Status (1)

Country Link
CN (1) CN108134736B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984621A (en) * 2018-06-14 2018-12-11 王怡科 Information storage, read method
CN111831367A (en) * 2019-04-18 2020-10-27 奇酷互联网络科技(深圳)有限公司 Application operation method, wearable device and device with storage function
CN114826802B (en) * 2020-03-18 2023-08-01 腾讯科技(成都)有限公司 Group entering method, device, group management system, computer equipment and storage medium
CN111600725B (en) * 2020-04-03 2022-03-08 厦门快商通科技股份有限公司 Group chat establishing method and system based on voice recognition and mobile terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090005455A (en) * 2007-07-09 2009-01-14 주식회사 케이티네트웍스 Linkage and db management system of ip pbx
CN104980339A (en) * 2015-06-24 2015-10-14 小米科技有限责任公司 File sharing method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854582A (en) * 2009-03-31 2010-10-06 北京首科软件及系统集成有限责任公司 Touring team management terminal and method
US20130191026A1 (en) * 2012-01-25 2013-07-25 Haidar Ahmad Navigation system with a Personality
CN103220151A (en) * 2013-04-17 2013-07-24 合肥华恒电子科技有限责任公司 User correlation method based on voice recognition
CN103795578A (en) * 2014-03-05 2014-05-14 广州天通智能技术有限公司 Method and system for setting wireless internet access of WIFI equipment, intelligent terminal and WIFI equipment
CN105099874B (en) * 2015-06-24 2019-02-12 小米科技有限责任公司 Group's method for building up and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090005455A (en) * 2007-07-09 2009-01-14 주식회사 케이티네트웍스 Linkage and db management system of ip pbx
CN104980339A (en) * 2015-06-24 2015-10-14 小米科技有限责任公司 File sharing method and device

Also Published As

Publication number Publication date
CN108134736A (en) 2018-06-08

Similar Documents

Publication Publication Date Title
CN108243481B (en) File transmission method and device
CN108134736B (en) Group establishing method and device
CN108966008B (en) Live video playback method and device
CN110022489B (en) Video playing method, device and storage medium
CN112312226B (en) Wheat connecting method, system, device, electronic equipment and storage medium
CN111596885B (en) Audio data processing method, server and storage medium
CN110996305A (en) Method, device, electronic equipment and medium for connecting Bluetooth equipment
WO2019165786A1 (en) Data transmission method, apparatus, and system, and display apparatus
CN111131531B (en) Method and device for generating nickname in chat group and readable storage medium
CN111327928A (en) Song playing method, device and system and computer storage medium
CN110149491B (en) Video encoding method, video decoding method, terminal and storage medium
WO2022037261A1 (en) Method and device for audio play and device management
CN112788359A (en) Live broadcast processing method and device, electronic equipment and storage medium
CN110856152A (en) Method, device, electronic equipment and medium for playing audio data
CN111045945B (en) Method, device, terminal, storage medium and program product for simulating live broadcast
CN115278625A (en) Method, device, equipment and system for transmitting Bluetooth multimedia packet
CN111628925A (en) Song interaction method and device, terminal and storage medium
CN111064657B (en) Method, device and system for grouping concerned accounts
CN114390426A (en) Volume calibration method and device
CN108966026B (en) Method and device for making video file
CN110827830A (en) Voiceprint recognition method, voiceprint recognition device, terminal and storage medium based on voice data
CN110597840A (en) Partner relationship establishing method, device, equipment and storage medium based on block chain
CN111918084B (en) Wheat loading method and device, server and terminal
CN110912830A (en) Method and device for transmitting data
CN112153404B (en) Code rate adjusting method, code rate detecting method, code rate adjusting device, code rate detecting device, code rate adjusting equipment and storage medium

Legal Events

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