Method and device for realizing single-account-number separate room entering, electronic equipment and storage medium
By adjusting the communication architecture of the voice social software client, the function of a single account clone entering multiple voice rooms is realized, solving the problem that the anchor cannot enter multiple rooms at the same time and improving communication efficiency and user experience.
Patent Information
- Application Number
- CN202411760554.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-14
AI Technical Summary
The anchor cannot enter multiple voice rooms to interact at the same time when he is on the meter. The existing technology requires creating multiple accounts to realize this function, but it will lead to the inability to transition the rights and interests, increasing user costs and affecting the experience.
By adjusting the communication architecture of the voice social software client, the main process is built into a communication management center, connecting multiple voice room process groups, the main process receives messages pushed by the server and differentiates them to the corresponding voice room process group according to the room ID, realizing the function of a single account clone entering multiple rooms.
It realizes that the anchor can enter multiple rooms to interact without recreating a small account during the shift, improves the efficiency of multi-process communication, saves the consumption of resources for multiple software opening, and improves the efficiency of software operation, and allows the anchor to enjoy relevant rights and benefits in other rooms.
Smart Images

Figure CN119629143A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a method, device, electronic device and storage medium for implementing single-account avatar entry into a room. Background Art
[0002] With the development of Internet technology, real-time voice chat has become a popular form of entertainment, such as organizing live chats and singing interactions in voice rooms. In the voice chat room, in order to ensure that there are anchors who can broadcast live at different time periods and interact with users in real time, multiple anchors can be scheduled, that is, the live broadcast schedule of the anchors can be arranged so that the anchors can broadcast live according to a fixed schedule, thereby cultivating the audience's viewing habits and improving the popularity of the live broadcast room and the loyalty of fans.
[0003] On the PC voice social software, when the anchor uses his own account to go to the microphone stall, he cannot enter other rooms to interact at the same time. Currently, he can only create another account, open multiple accounts with the main account, log in at the same time, and enter different rooms to interact and communicate. However, when creating a small account to enter other rooms, the rights and interests of the original main account cannot be transferred to the small account, some gifts or avatar frames cannot be fully experienced, and some title privileges cannot be used on the small account. If you want to use them on the small account, you need to activate the relevant rights and interests on the small account, which greatly increases user costs and affects user experience. Summary of the invention
[0004] The present invention provides a method, device, electronic device and storage medium for implementing a single-account avatar entering a room, which are used to solve the problem of allowing an anchor to enter multiple rooms for interactive communication at the same time with the same account when he / she is on the microphone.
[0005] The present invention provides a method for implementing a single-account clone entering a room, which is applied to a client, wherein the client includes a main process and at least one voice room process group, and the main process is connected to the voice room process group. The method includes:
[0006] The main process receives the push message from the server;
[0007] The main process determines the target voice room process group corresponding to the room ID according to the room ID carried in the push message;
[0008] The main process transmits the push message to the target voice room process group;
[0009] The target voice room process group receives the push message and responds according to the push message.
[0010] According to a method for implementing a single-account clone entering a room provided by the present invention, the push message includes a message structure and a context structure, and the context structure carries the room ID.
[0011] A method for implementing a single-account clone entering a room according to the present invention also includes:
[0012] The main process generates a target event in response to a user instruction;
[0013] The main process reads a preset tag of the target event in the local event bus, wherein the preset tag is used to indicate whether the event is sent to all voice rooms;
[0014] If the preset mark read by the main process is yes, the target event is sent to all voice room process groups; if the preset mark read is no, the target event is sent to the voice room process group corresponding to the main room.
[0015] A method for implementing a single-account clone entering a room according to the present invention also includes:
[0016] The main process responds to an update event of the target state information by sending the update data of the target state information to all voice room process groups;
[0017] All voice room process groups synchronously update the target status information based on the update data.
[0018] The present invention also provides another method for implementing a single-account clone entering a room, which is applied to a server and includes:
[0019] Create a push message with the room ID;
[0020] Send the push message to at least one client according to any one of claims 1 to 4 in the voice room corresponding to the room ID.
[0021] According to another method for implementing a single-account clone entering a room provided by the present invention, the creating a push message includes:
[0022] Create a message structure and a context structure of the push message;
[0023] Add the room ID to the context structure.
[0024] The present invention also provides a device for implementing a single-account clone entering a room, comprising a main process and at least one voice room process group, wherein the main process is connected to the voice room process group;
[0025] The main process is used to receive push messages from the server;
[0026] The main process is used to determine the voice room process group corresponding to the room ID according to the room ID carried in the push message;
[0027] The main process is used to transmit the push message to the voice room process group;
[0028] The voice room process group is used to receive the push message and respond according to the push message.
[0029] The present invention also provides another device for implementing single-account clone entry into a room, comprising:
[0030] Create a module to create a push message with the room ID;
[0031] The sending module is used to send the push message to at least one client in the voice room corresponding to the room ID.
[0032] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for implementing a single-account clone entering a room as described in any one of the above-mentioned methods is implemented.
[0033] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for implementing a single-account clone entering a room.
[0034] The present invention provides a method, device, electronic device and storage medium for implementing a single account clone entering a room. By adjusting the communication architecture of the voice social software client, the main process is built as a communication management center, connecting multiple voice room process groups, and the main process obtains the push message pushed from the server. According to the room ID carried by the push message, it can distinguish which room or rooms are pushed to, so that the push message is sent to the voice room process group corresponding to the room ID, so that only a single voice room process group can receive the message, avoiding room concatenation, and realizing communication isolation; on the basis of isolation, the state or information that needs to be synchronized can also be pushed to multiple rooms for synchronization. Correspondingly, before pushing the message, the server adds a room ID to the push message to distinguish the source of the message. Under such a communication architecture, a single user account can enter multiple voice rooms, and the main process completes the information transmission. The corresponding voice room process group of each voice room receives information and completes specific operations, realizing a solution that a single user account can clone and enter multiple voice rooms. As a result, the anchor will not need to create a new account to enter multiple rooms for interaction during the schedule, nor will they need to log in to multiple programs, which will improve the efficiency of multi-process communication, save resources consumed by multiple software, and improve the operating efficiency of the software. At the same time, when the anchor enters other rooms during the schedule, he can also enjoy the relevant rights and interests of the anchor account. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 It is a structural diagram of a client process communication architecture of a voice social software in the prior art;
[0037] Figure 2 It is a structural diagram of a client process communication architecture of a voice social software provided by the present invention;
[0038] Figure 3 It is a flowchart of a method for implementing a single-account clone entering a room provided by the present invention;
[0039] Figure 4 It is a flowchart of another method for implementing a single-account clone entering a room provided by the present invention;
[0040] Figure 5 It is a structural schematic diagram of a device for realizing a single-account clone entering a room provided by the present invention;
[0041] Figure 6 It is an interactive schematic diagram of a voice social platform provided by the present invention;
[0042] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] It should be noted that, in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0045] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0046] Combine the following Figure 1-Figure 7 The present invention describes a method, device, electronic device and storage medium for implementing single-account avatar entry into a room.
[0047] Figure 1 The structure diagram of the client process communication architecture of a voice social software in the prior art is shown in FIG. Figure 1As shown, the client includes the communication process, main process, room process, gift process, and game process. Among them, the main process, room process, gift process, and game process are connected to the communication process respectively, and these processes communicate directly through the communication process. In this communication architecture, the communication process is the center, and 1 main process, 1 room process, and other processes related to the voice room are directly associated with the communication process, and it is impossible to expand to enter multiple rooms at the same time at the architectural level.
[0048] Figure 2 A schematic diagram of the structure of the client process communication architecture of a voice social software provided by the present invention. Figure 2 As shown, the client includes a main process 210 and at least one voice room process group 220, and the main process 210 is connected to the voice room process group 220. A voice room process group may include a room process, a gift process, a game process, etc. Figure 1 Compared with the prior art, the process communication architecture of the client of the present invention merges the communication process and the main process. The main process builds a communication management center to coordinate the management of the room ID, voice room process group ID, room status information, etc. of each voice room process group; the room process, gift process, game process and other related processes in the voice room are combined and grouped, and one voice room process group corresponds to one voice room.
[0049] Specifically, the room process is mainly responsible for handling basic services in the voice room, the gift process is responsible for handling services related to virtual gifts in the voice room, and the game process is responsible for handling services related to the voice room. When the push message received by the voice room process group is related to basic services, the room process will respond and process it; when the push message received by the voice room process group is related to virtual gift services, the gift process will respond and process it; when the push message received by the voice room process group is related to game services, the game process will respond and process it.
[0050] Since the information between each voice room process group is independent of each other, but the data structure is consistent, in order to distinguish each voice room process group, there is a status in each voice room process group that marks whether the current process group is in the main state. In some embodiments, one of the voice rooms is set as the main room, and the other voice rooms that are online at the same time are set as clone rooms. If a user enters multiple voice rooms with a single account, one of the voice rooms is the main room, and the other voice rooms are clone rooms. When the main and clone rooms are online at the same time, if the user exits the main room first, the client only needs to modify the main state of the voice room process group of one clone room to achieve hot switching of the main and clone states, which is consistent with the normal operation of opening the room.
[0051] Figure 3The present invention provides a method for implementing a single-account clone entering a room, which can be applied to a client, such as Figure 3 As shown, the method specifically comprises the following steps:
[0052] Step 310, the main process receives the push message from the server;
[0053] Step 320, the main process determines the target voice room process group corresponding to the room ID according to the room ID carried in the push message;
[0054] Step 330, the main process transmits the push message to the target voice room process group;
[0055] Step 340: The target voice room process group receives the push message and responds according to the push message.
[0056] Specifically, the main process obtains the push message pushed from the server, distinguishes which room the push message is sent to based on the room ID carried in the push message, obtains the corresponding voice room process group (i.e., the target voice room process group) based on the room ID, and then the main process only transmits the message to the target voice room process group, so that only a single voice room process group receives the push message, and the target voice room process group responds based on the push message, avoiding cross-room operations.
[0057] In some embodiments, the push message may include a message structure, in which the room ID is recorded. In this embodiment, the main process of the client needs to unpack each specific push message, and then read the room ID to determine which voice room process group the message needs to be dispatched to.
[0058] In order to further improve efficiency, in some embodiments, the push message may include a message structure and a context structure, and the context structure carries a room ID. In this embodiment, the message structure of the push message is wrapped with a context structure. By specifying the room ID in the context structure, after receiving the push message, the main process of the client can dispatch the message to the corresponding voice room process group at the bottom layer for response processing according to the room ID in the context structure. The main process does not need to process each specific message separately, and can uniformly handle the dispatch of room messages at the bottom layer. Subsequent newly added push messages can be processed according to regulations, which can effectively reduce the workload of the client, avoid missing messages and not being processed, and effectively reduce the cost of development and transformation.
[0059] In some embodiments, the method further comprises:
[0060] The main process generates a target event in response to a user instruction;
[0061] The main process reads a preset tag of the target event in the local event bus, wherein the preset tag is used to indicate whether the event is sent to all voice rooms;
[0062] If the preset mark read by the main process is yes, the target event is sent to all voice room process groups; if the preset mark read is no, the target event is sent to the voice room process group corresponding to the main room.
[0063] In this embodiment, for the interaction between the client and the user, when the main process receives a user instruction, it generates a corresponding target event in response to the user instruction, and reads the preset tag of the target event in the local event bus. The preset tag is used to indicate whether it is sent to all voice rooms, otherwise it is only sent to the main body room by default. When registering the event received across processes on the local event bus (EventBus), this embodiment adds a parameter to mark whether it is sent to all voice rooms. The underlying sending logic directly distinguishes the voice room process group to be sent according to this tag, thereby achieving an isolation mechanism.
[0064] In some embodiments, the method further includes: the main process sends the updated data of the target state information to all voice room process groups in response to an update event of the target state information;
[0065] All voice room process groups synchronously update the target status information based on the update data.
[0066] In this embodiment, if some status information needs to be synchronized to all voice room process groups, the main process can synchronize the data to all voice room process groups.
[0067] Accordingly, if Figure 4 As shown, the present invention also provides a method for implementing a single-account clone entering a room, which is applied to a server and specifically includes the following steps:
[0068] Step 410, creating a push message carrying the room ID;
[0069] Step 420: Send the push message to at least one client in the voice room corresponding to the room ID.
[0070] Specifically, the message types pushed by the server may include push messages generated in response to client requests and push messages generated spontaneously. When creating a message, the server needs to add a room ID to the push message, so that when the client's main process receives the push message, it can send the push message to the corresponding voice room process group according to the room ID carried in the push message.
[0071] In some embodiments, step 410 specifically includes:
[0072] Create a message structure of the push message;
[0073] Add the room ID to the message structure.
[0074] In this embodiment, a new room ID is added to all specific message structures pushed to distinguish the source of the message. The main process of the client needs to unpack each specific push message and then read the room ID to determine which voice room process group the message needs to be sent to.
[0075] To further improve efficiency, in some embodiments, step 410 specifically includes:
[0076] Create a message structure and a context structure of the push message;
[0077] Add the room ID to the context structure.
[0078] In this embodiment, the outer layer of the message structure of the push message is wrapped with a context structure. When the server pushes messages in a specified room, it specifies the room ID in the context structure. In this way, after receiving the push message, the main process of the client can dispatch the message to the corresponding voice room process group at the bottom layer for response processing according to the room ID in the context structure. The main process does not need to process each specific message separately, but can uniformly process the dispatch of room messages at the bottom layer. Subsequent newly added push messages can be processed according to regulations, which can effectively reduce the workload of the client, avoid missing messages and not being processed, and effectively reduce the cost of development and transformation.
[0079] For some special push messages, such as changes in user account data, multiple voice room process groups must respond and update the data of users in this room. In some embodiments, for this type of push message, the server does not need to specify the room in the context structure. After the client receives it, it will be dispatched to all voice room process groups for processing.
[0080] In some embodiments, step 410 specifically includes:
[0081] Create a message structure and a context structure of the push message;
[0082] Marking the push message in the context structure only requires the client to process it once.
[0083] Specifically, there are some special cases where push messages only need to be processed by one voice room process group. The background can mark in the context structure that the message only needs to be processed once by the client. After the client main process receives it, it will only be dispatched to the main room for processing. As for why the context structure is not used to specify a specific voice room for processing, it is because the message is sent asynchronously. The room specified by the server in the message may have been exited when the client receives it, resulting in missing the message and causing inconsistent status between the client and the server. Therefore, the server marks the message to be processed only once, and the client is left to determine which voice room process group will process it, to ensure that all messages can be processed normally.
[0084] In some embodiments, the server uses a Redis list data structure to maintain the primary and secondary room status of the client.
[0085] Specifically, when the user enters the first voice room, he / she joins the end of the list. At this time, only one room is recorded in the list, and the voice room is the main room (corresponding to the main room of the client).
[0086] When the user enters the second voice room, he continues to join the end of the list. At this time, the list records two rooms. The voice room at the head of the line is the main room, and the voice room at the end of the line is the secondary room (corresponding to the client's clone room).
[0087] If the user leaves the main room, the main room will be deleted from the queue head. At this time, the end of the queue will automatically become the head of the queue, that is, the secondary room will be automatically upgraded to the main room in the background.
[0088] Under concurrent check-in and check-out requests, the background does not need to add additional distributed locks. By making full use of the characteristics of the Redis list, the automatic conversion of room status can be well completed without the need for complex processing procedures, which improves code readability.
[0089] The implementation method of the above-mentioned single account clone entering the room provided by the present invention, by adjusting the communication architecture of the voice social software client, the main process is built as a communication management center, connecting multiple voice room process groups, the main process obtains the push message pushed from the server, and can distinguish which room or rooms are pushed according to the room ID carried by the push message, so as to send the push message to the voice room process group corresponding to the room ID, so that only a single voice room process group can receive the message, avoid stringing rooms, and realize communication isolation; on the basis of isolation, the state or information that needs to be synchronized can also be pushed to multiple rooms for synchronization. Correspondingly, before pushing the message, the server adds a room ID to the push message to distinguish the source of the message. Under such a communication architecture, a user's single account can enter multiple voice rooms, and the main process completes the transmission of information. Each voice room corresponds to the voice room process group to receive information and complete specific operations, realizing the solution that a user's single account can clone into multiple voice rooms. As a result, during the gear period, the anchor will not need to re-create a small account to enter multiple rooms for interaction, nor will it need to log in to multiple programs, which improves the efficiency of multi-process communication, saves resources consumed by multiple software, and can also improve the running efficiency of the software. At the same time, the anchor can enter other rooms during the schedule and enjoy the relevant rights and interests of the anchor account at the same time. In addition, the client of the present invention only needs one bottom layer modification, and the upper layer business processing does not need to sense whether the user has opened multiple rooms, so the modification cost is low.
[0090] The following is a description of an implementation device for a single-account clone entering a room provided by the present invention. The implementation device for a single-account clone entering a room described below and the implementation method for a single-account clone entering a room described above can correspond to each other.
[0091] The present invention also provides a device for implementing a single-account clone entering a room, the structure of which is similar to Figure 2 Similar to, including a main process and at least one voice room process group, the main process is connected to the voice room process group;
[0092] The main process is used to receive push messages from the server;
[0093] The main process is used to determine the voice room process group corresponding to the room ID according to the room ID carried in the push message;
[0094] The main process is used to transmit the push message to the voice room process group;
[0095] The voice room process group is used to receive the push message and respond according to the push message.
[0096] like Figure 5 As shown, the present invention also provides another device for implementing single-account clone entry into a room, comprising:
[0097] Create a module to create a push message with the room ID;
[0098] The sending module is used to send the push message to at least one client in the voice room corresponding to the room ID.
[0099] The present invention also provides a voice social platform, such as Figure 6 As shown, the platform includes a server and a client, where:
[0100] The server creates a push message carrying a room ID and sends the push message to at least one client in the voice room corresponding to the room ID. The client's main process receives the push message from the server, and determines the target voice room process group corresponding to the room ID according to the room ID carried in the push message, and passes the push message to the target voice room process group; the target voice room process group receives the push message and responds according to the push message.
[0101] The voice social networking platform provided by the present invention can realize that a single user account allows clones to enter multiple voice rooms. Therefore, during the schedule, the host does not need to re-create a small account to enter other rooms for interaction, nor does it need to open multiple programs to log in, which improves the efficiency of multi-process communication, saves resources consumed by multiple software, and improves the operating efficiency of the software. At the same time, when the host enters other rooms during the schedule, he can enjoy relevant rights and interests at the same time.
[0102] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute a method for implementing a single-account clone entering a room, the method comprising:
[0103] The main process receives the push message from the server;
[0104] The main process determines the target voice room process group corresponding to the room ID according to the room ID carried in the push message;
[0105] The main process transmits the push message to the target voice room process group;
[0106] The target voice room process group receives the push message and responds according to the push message;
[0107] or,
[0108] Create a push message with the room ID;
[0109] The push message is sent to at least one of the clients in the voice room corresponding to the room ID.
[0110] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0111] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the implementation method of the single-account avatar entering the room provided by the above methods, the method includes:
[0112] The main process receives the push message from the server;
[0113] The main process determines the target voice room process group corresponding to the room ID according to the room ID carried in the push message;
[0114] The main process transmits the push message to the target voice room process group;
[0115] The target voice room process group receives the push message and responds according to the push message;
[0116] or,
[0117] Create a push message with the room ID;
[0118] The push message is sent to at least one of the clients in the voice room corresponding to the room ID.
[0119] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for implementing the single-account avatar entering a room provided by the above methods is implemented, and the method includes:
[0120] The main process receives the push message from the server;
[0121] The main process determines the target voice room process group corresponding to the room ID according to the room ID carried in the push message;
[0122] The main process transmits the push message to the target voice room process group;
[0123] The target voice room process group receives the push message and responds according to the push message;
[0124] or,
[0125] Create a push message with the room ID;
[0126] The push message is sent to at least one of the clients in the voice room corresponding to the room ID.
[0127] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for implementing a single-account clone entering a room, characterized in that: Applied to a client, the client includes a main process and at least one voice room process group, the main process is connected to the voice room process group, and the method includes: The main process receives push messages from the server; The main process determines the target voice room process group corresponding to the room ID according to the room ID carried in the push message; The main process transmits the push message to the target voice room process group; The target voice room process group receives the push message and responds according to the push message.
2. The method for implementing a single-account clone entering a room according to claim 1, characterized in that: The push message includes a message structure and a context structure, and the context structure carries the room ID.
3. The method for implementing a single-account clone entering a room according to claim 1, characterized in that: Also includes: The main process generates a target event in response to a user instruction; The main process reads a preset tag of the target event in the local event bus, wherein the preset tag is used to indicate whether the event is sent to all voice rooms; If the preset mark read by the main process is yes, the target event is sent to all voice room process groups; if the preset mark read is no, the target event is sent to the voice room process group corresponding to the main room.
4. The method for implementing a single-account clone entering a room according to claim 1, characterized in that: Also includes: The main process responds to an update event of the target state information by sending the update data of the target state information to all voice room process groups; All voice room process groups synchronously update the target status information based on the update data.
5. A method for implementing a single-account clone entering a room, characterized in that: Applied to the server, including: Create a push message with the room ID; Send the push message to at least one client according to any one of claims 1 to 4 in the voice room corresponding to the room ID.
6. The method for implementing a single-account clone entering a room according to claim 5, characterized in that: The creating a push message includes: Create a message structure and a context structure of the push message; Add the room ID to the context structure.
7. A device for implementing a single-account clone entering a room, characterized in that: It includes a main process and at least one voice room process group, wherein the main process is connected to the voice room process group; The main process is used to receive push messages from the server; The main process is used to determine the voice room process group corresponding to the room ID according to the room ID carried in the push message; The main process is used to transmit the push message to the voice room process group; The voice room process group is used to receive the push message and respond according to the push message.
8. A device for implementing a single-account clone entering a room, characterized in that: include: Create a module to create a push message with the room ID; The sending module is used to send the push message to at least one client in the voice room corresponding to the room ID.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for implementing a single-account clone entering a room as described in any one of claims 1 to 6 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for implementing a single-account clone entering a room as described in any one of claims 1 to 6 is implemented.