Method and system for setting user role in instant messaging, server and medium
By detecting the connection status of the terminal device in the instant communication scenario and updating the user role of other devices, the problem of disconnected terminal devices affecting the stability of the scene is solved, and the adaptability adjustment of user roles and the improvement of scene stability is achieved.
Patent Information
- Application Number
- CN202311355770.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2043-10-18
AI Technical Summary
In real-time communication scenarios shared by multiple people, due to network instability and other reasons, after the terminal device is disconnected, the user role with important permissions may affect the normal operation of the scenario, resulting in a decrease in stability.
By detecting the connection status of the terminal device and the server, when a terminal device disconnects the communication connection, the server acquires its user role before disconnection and updates the user role of other terminal devices that remain connected to ensure that there is always a target role with the highest privileges in the scenario.
The user role adaptability adjustment after the terminal device is disconnected is realized, the operation stability of the instant communication scenario is improved, and the normal operation of the scenario is ensured, even if the terminal device is disconnected.
Smart Images

Figure CN119854251A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of instant messaging technology, and in particular to a method, system, server and storage medium for setting user roles in instant messaging. Background Art
[0002] In an instant messaging scenario shared by multiple people, there are usually multiple terminal devices connected to the server at the same time for multi-person conversations and other interactions. The server will assign corresponding user roles to each terminal device, such as host role and audience role, etc. Different user roles have different operation permissions. However, due to network instability and other reasons, the terminal device may be disconnected after connecting to the server. If the user role of the disconnected terminal device has important permissions, its disconnection is likely to affect the normal operation of the instant messaging scenario, resulting in reduced stability of the scenario operation. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a method, system, server and storage medium for setting user roles in instant messaging, which can improve the stability of instant messaging scenario operation.
[0004] A first aspect of an embodiment of the present application provides a method for setting a user role in instant messaging, comprising:
[0005] Detecting the connection status between each of the multiple terminal devices and the server, and the multiple terminal devices interact through the server;
[0006] When it is detected that a communication connection between a first terminal device among the multiple terminal devices and the server is disconnected, obtaining a user role of the first terminal device before the communication connection with the server is disconnected;
[0007] According to the user role of the first terminal device before the communication connection with the server is disconnected, the user role of at least one other terminal device among the plurality of terminal devices except the first terminal device and maintaining the communication connection with the server is updated.
[0008] In the embodiment of the present application, when multiple terminal devices are connected to the server for multi-person conversation and other interactions, the server will detect the connection status of each terminal device with the server. If it is detected that a terminal device is disconnected from the communication connection, the user role of the terminal device before the communication connection is disconnected will be obtained, and the user role of at least one other terminal device except the terminal device will be updated according to the user role, so that the user role can be adaptively adjusted after the terminal device is disconnected, thereby improving the stability of the operation of the instant communication scene. For example, assuming that a terminal device assumes a target role with important permissions, when it is disconnected, the server can select a terminal device from other currently connected terminal devices as a substitute to assume the target role on its behalf, thereby ensuring the normal operation of the instant communication scene.
[0009] In one implementation of the embodiment of the present application, updating the user role of at least one other terminal device among the multiple terminal devices other than the first terminal device and maintaining a communication connection with the server according to the user role of the first terminal device before the communication connection with the server is disconnected includes:
[0010] If the user role of the first terminal device before disconnecting the communication connection with the server is the target role, the user role of the second terminal device in at least one other terminal device is updated to the target role, and the target role is the user role with the highest authority among the user roles of the multiple terminal devices.
[0011] By setting in this way, it can be ensured that there is at least one online target role with the highest authority in the scene, thereby improving the stability of the operation of the instant messaging scene.
[0012] Specifically, the second terminal device meets any one or more of the following conditions:
[0013] The place where the second terminal device is located is the designated place;
[0014] The user identity of the second terminal device is a designated identity;
[0015] The activity of the second terminal device is greater than or equal to a preset threshold, and the activity is determined according to the operation performed by the second terminal device on the virtual three-dimensional model created by the server.
[0016] In one implementation of the embodiment of the present application, selecting a second terminal device from other terminal devices includes:
[0017] Obtaining the geographic location and IP address of each terminal device among other terminal devices;
[0018] Determine the location of each of the other terminal devices based on the geographical location and IP address of each terminal device;
[0019] A terminal device located at a designated location is selected from other terminal devices as the second terminal device.
[0020] The target role is generally suitable for professionals, and professionals are generally located in certain designated office locations, such as schools or hospitals, etc. Therefore, by selecting a terminal device located in a designated location as the second terminal device, the possibility of assigning the target role to the professional can be increased, thereby improving the rationality and accuracy of assigning the target role.
[0021] In another implementation of the embodiment of the present application, selecting a second terminal device from other terminal devices includes:
[0022] Obtaining a user image of each terminal device in other terminal devices;
[0023] Determining the user identity of each terminal device in other terminal devices according to the user image of each terminal device;
[0024] A terminal device whose user identity is a specified identity is selected from other terminal devices as the second terminal device.
[0025] The target role is generally suitable for professionals, and professionals generally have a specified user identity, such as a teacher or a doctor, etc. Therefore, by selecting a terminal device with a specified user identity as the second terminal device, the possibility of assigning the target role to the professional can be increased, thereby improving the rationality and accuracy of assigning the target role.
[0026] In another implementation of the embodiment of the present application, selecting a second terminal device from other terminal devices includes:
[0027] Obtaining the activity of each terminal device among other terminal devices, where the activity is determined according to the number of operations performed by the corresponding terminal device on the virtual three-dimensional model created by the server;
[0028] A terminal device whose activity is greater than a preset threshold is selected from other terminal devices as the second terminal device.
[0029] Since the activity is determined based on the number of operations performed by the corresponding terminal device on the virtual three-dimensional model created by the server, users with high activity are generally more familiar with the scene or more skilled in operation, and are more suitable for the target role. Therefore, this method of selecting the second terminal device can also improve the rationality and accuracy of assigning the target role.
[0030] In one implementation of the embodiment of the present application, updating the user role of the second terminal device to the target role includes:
[0031] Setting the user role of the second terminal device to a temporary target role;
[0032] If the first terminal device does not reacquire the target role within the first time period, the user role of the second terminal device is set as a permanent target role during the interaction process.
[0033] Since the first terminal device is currently only disconnected, it can reconnect to the server through the disconnection reconnection mechanism, and can regain and assume the target role after joining a multi-person session or other interactive process. Therefore, the server can first set the user role of the second terminal device as a temporary target role. In addition, considering that the time of a multi-person session is limited, the server cannot always retain the right of the first terminal device to regain the target role. Therefore, the server can set a time limit for retaining the authority, that is, the first time period. If the first terminal device does not regain the target role within the first time period, the server sets the user role of the second terminal device as a permanent target role. By setting this up, the rationality and practicality of user role allocation can be effectively improved.
[0034] In one implementation of the embodiment of the present application, the method further includes:
[0035] When it is detected that the third terminal device is connected to the server and requests to join the interaction process, if the third terminal device meets the condition for obtaining the target role, the user role of the third terminal device is set as the target role.
[0036] Through this setting, each terminal device joining a multi-person session can obtain a corresponding user role according to the situation, thereby improving the integrity and comprehensiveness of the scenario application.
[0037] In one implementation of the embodiment of the present application, whether the third terminal device meets the condition for obtaining the target role is determined in the following manner:
[0038] If the third terminal device is a terminal device that is disconnected and reconnected from multiple terminal devices, and the user role of the third terminal device before disconnecting the communication connection is the target role, it is determined that the third terminal device meets the conditions for obtaining the target role.
[0039] Through this setting, the terminal device of the original target role has the reasonable right to get back the target role after disconnection and reconnection, thereby improving the rationality and practicality of the scene application.
[0040] In another implementation of the embodiment of the present application, whether the third terminal device meets the condition for obtaining the target role is determined in the following manner:
[0041] If the third terminal device is a terminal device that is disconnected and reconnected from multiple terminal devices, the user role of the third terminal device before disconnecting the communication connection is the target role, and the third terminal device confirms to re-acquire the target role, it is determined that the third terminal device meets the conditions for acquiring the target role.
[0042] By setting it in this way, a comprehensive judgment can be made based on the willingness of the terminal device of the original target role to take back the target role, and whether to reallocate the target role to the terminal device can be determined, which can further improve the rationality and practicality of the scene application. Specifically, whether the third terminal device confirms to reacquire the target role is determined in the following way:
[0043] Obtaining parameter data sent by a third terminal device when connecting to the server;
[0044] According to the transmitted parameter data, it is determined whether the third terminal device confirms to re-acquire the target role.
[0045] By analyzing the transmitted parameter data, the server can easily identify the user intention of the third terminal device, that is, determine whether the third terminal device confirms to re-acquire the target role.
[0046] In another implementation of the embodiment of the present application, whether the third terminal device meets the condition for obtaining the target role is determined in the following manner:
[0047] If the third terminal device is a terminal device that is disconnected and reconnected among multiple terminal devices, the user role of the third terminal device before disconnecting the communication connection is the target role, the third terminal device confirms the re-acquisition of the target role, and the disconnection time of the third terminal device does not exceed the second time, then it is determined that the third terminal device meets the conditions for acquiring the target role.
[0048] Considering that the server cannot always retain the right of a terminal device to reacquire the target role, a permission retention time limit can be set, that is, the second time limit. When the terminal device is disconnected for longer than the permission retention time limit, the terminal device loses the right to reacquire the target role, which can also improve the rationality and practicality of the scene application.
[0049] In another implementation of the embodiment of the present application, whether the third terminal device meets the condition for obtaining the target role is determined in the following manner:
[0050] If the third terminal device is not a terminal device that is disconnected and reconnected by multiple terminal devices, it is determined that the third terminal device does not meet the condition for obtaining the target role.
[0051] If the third terminal device is not a disconnected and reconnected terminal device, it means that other terminal devices in the multi-terminal interaction scenario must have been assigned the target role. Therefore, the server can determine that the third terminal device does not meet the conditions for obtaining the target role, and thus assign a non-target role to the third terminal device.
[0052] In an implementation of the embodiment of the present application, before detecting the connection status between each terminal device among the multiple terminal devices and the server, the method further includes:
[0053] The user role of the first terminal device connected to the server among multiple terminal devices is set as the target role.
[0054] Through such an arrangement, a mechanism for allocating target roles in priority according to the access order can be implemented.
[0055] A second aspect of an embodiment of the present application provides a device for setting a user role in instant messaging, including:
[0056] A detection module, used to detect the connection status of each terminal device among a plurality of terminal devices and a server, through which the plurality of terminal devices interact;
[0057] an acquisition module, configured to, when detecting that a communication connection between a first terminal device among the plurality of terminal devices and the server is disconnected, acquire a user role of the first terminal device before the communication connection between the first terminal device and the server is disconnected;
[0058] The updating module is used to update the user role of at least one other terminal device among the multiple terminal devices except the first terminal device and maintaining a communication connection with the server according to the user role of the first terminal device before the communication connection with the server is disconnected.
[0059] A third aspect of an embodiment of the present application provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for setting user roles in instant messaging provided in the first aspect of the embodiment of the present application is implemented.
[0060] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method for setting user roles in instant messaging provided in the first aspect of the embodiment of the present application.
[0061] A fifth aspect of an embodiment of the present application provides an instant messaging system, which includes a server provided in the third aspect of an embodiment of the present application and a plurality of terminal devices connected to the server.
[0062] A sixth aspect of the embodiments of the present application provides a computer program product. When the computer program product runs on a server, the server executes the method for setting user roles in instant messaging provided in the first aspect of the embodiments of the present application.
[0063] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a schematic diagram of an instant messaging system provided by an embodiment of the present application;
[0065] Figure 2 It is a schematic diagram of a practical demonstration scenario shared by multiple people provided in an embodiment of the present application;
[0066] Figure 3 yes Figure 2 The software system structure diagram corresponding to the practical demonstration scenario shown;
[0067] Figure 4 It is a flowchart of a method for setting a user role in instant messaging provided by an embodiment of the present application;
[0068] Figure 5 This is a schematic diagram of the interaction process between devices in a multi-person sharing scenario of instant messaging provided by an embodiment of the present application;
[0069] Figure 6 This is a schematic diagram of an operation flow of assigning a user role to an accessed terminal device by a server provided in an embodiment of the present application;
[0070] Figure 7 It is a structural diagram of a device for setting a user role in instant messaging provided by an embodiment of the present application;
[0071] Figure 8 It is a schematic diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures, technologies, etc. are proposed, so as to thoroughly understand the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, the detailed description of well-known systems, devices, circuits and methods is omitted to prevent unnecessary details from hindering the description of the present application. In addition, in the description of the present application specification and the attached claims, the terms "first", "second", "third" etc. are only used to distinguish the description, and cannot be interpreted as indicating or suggesting relative importance.
[0073] At present, there are many instant messaging scenarios shared by multiple people, such as online multi-person conferences, online courses or virtual practical demonstrations, etc. In such scenarios, there are generally multiple terminal devices that interact by connecting to the server, and the server will assign corresponding user roles to each terminal device, such as host role and audience role, teacher role and student role, etc., and different user roles have different operating permissions. However, the terminal device may be disconnected after connecting to the server. If the user role of the disconnected terminal device has important permissions (such as the host role in the following embodiments), it is likely to affect the normal operation of the instant messaging scenario after it is disconnected, resulting in a decrease in the stability of the scenario operation. In view of this, the embodiments of the present application provide a method, system, server and storage medium for setting user roles in instant messaging, which can improve the stability of the instant messaging scenario operation. For more specific technical implementation details of the embodiments of the present application, please refer to the various embodiments described below.
[0074] like Figure 1 FIG. 1 is a schematic diagram of an instant messaging system provided by an embodiment of the present application. Figure 1 In the embodiment, a server and a plurality of terminal devices connected to the server for communication are included, namely, terminal device 1 to terminal device N. Each terminal device can conduct multi-person conversation and other interactions through the server. For different instant messaging scenarios, the server can assign different user roles to each connected terminal device, and different user roles can have different operating permissions. For example, for an online multi-person meeting or a practical demonstration scenario, the server can assign a host role to at least one of the multiple terminal devices, and assign an audience role to the remaining terminal devices. The operating permissions of the host role are higher than those of the audience role. For example, the operating permissions of the host role may include all permissions such as perspective switching, microphone switching and switching, conversation communication, and transfer of the host role, and the operating permissions of the audience role only include conventional permissions such as conversation communication. For another example, for an online course scenario, the server can assign a teacher role to one or more terminal devices, and assign a student role to the remaining terminal devices. The operating permissions of the teacher role are higher than those of the student role. It should be noted that the multiple terminal devices can be distributed in the same place / location or in different places / locations, and the embodiments of the present application do not limit this. About Figure 1 The specific working principle of the system shown can be referred to the method embodiment described below.
[0075] Figure 1The server and terminal device in the description may be various types of devices, such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, desktop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), large-screen TVs, etc., which are not limited in the embodiments of the present application.
[0076] like Figure 2 , which is a schematic diagram of a multi-person shared practical demonstration scenario provided in an embodiment of the present application. Figure 2 In the example, there are four terminal devices, namely, terminal device A, terminal device B, terminal device C and terminal device D, which are all connected to the server and can establish a multi-person shared demonstration of instant communication through the server. Among them, the user role of terminal device A is the host role, and the user roles of terminal devices B, terminal devices C and terminal devices D are all audience roles, that is, in Figure 2 In the scenario, there is only one host role at the same time, but multiple audience roles are allowed. The host role has the highest operating authority for all functions, while the audience role can obtain lower operating authority for some functions. In addition, a virtual three-dimensional model can be created on the server side, such as a three-dimensional model of an organ such as the heart or liver of the human body. Each terminal device can perform various operations on the three-dimensional model (such as cutting, rotation, and translation, etc.) and observe the changes in the three-dimensional model. As an example, terminal device A can operate the virtual three-dimensional model and input model operation data to the server, and the server can synchronize the model operation data to terminal device B, terminal device C, and terminal device D, so that each terminal device can obtain and display the changed virtual three-dimensional model.
[0077] Figure 3 for Figure 2 The software system structure diagram corresponding to the practical demonstration scenario shown in the figure, Figure 3The software system structure includes three parts: user login, patient list and model browsing. Among them, after the terminal device is connected to the server, it can use user login, and its functions specifically include account login, mobile phone number login and application exit. The user can use his registered account or mobile phone number to complete the login, or he can operate to exit the system application. The interface of the patient list is mainly used to display the list of patient models, and can refresh the list, load more lists, log out and select models. The patient model here can be a virtual three-dimensional model of various diseased organs. By refreshing the list and loading more lists, the latest patient model data can be obtained; the user can use the logout function to log out of the currently logged in account and return to the user login interface; the user can use the model selection function to select the patient model that he wants to operate from the patient model list, so as to enter the single-person film reading or multi-person sharing mode. The technical solution of the embodiment of this application is mainly aimed at the multi-person sharing mode. When browsing the model, it has functions such as tools, model management, reset and exit model. For the multi-person sharing mode, it also has functions such as exiting multi-person sharing, sharing mode switching and field of view sharing. In addition, the multi-person sharing mode also supports the disconnection reconnection function, which can be initiated manually by the user or automatically by the terminal device after disconnection.
[0078] See also Figure 4 , shows a method for setting a user role in instant messaging provided by an embodiment of the present application, the method comprising:
[0079] 401. The server detects a connection status between each terminal device among multiple terminal devices and the server, and the multiple terminal devices interact with each other through the server.
[0080] When multiple terminal devices are connected to the server and interact with each other through the server, the server will detect the connection status of each terminal device and the server in real time or periodically to determine whether each terminal device is disconnected from the server. Specifically, the multi-person shared connections established by each terminal device and the server are all instant messaging, and since the connection is established, the heartbeat mechanism can be used to determine whether the terminal device is disconnected. For the heartbeat mechanism, the terminal device can send a heartbeat signal at regular intervals, and continuously cycle until the connection is disconnected. The terminal device can determine whether it is disconnected from the server by monitoring the number of heartbeat signal transmissions and server responses. For example, if the server does not receive a response for two consecutive heartbeat signals, it can be determined that the terminal device has been disconnected. At this time, the disconnection reconnection process can be executed to reconnect with the server. The server can determine whether the terminal device is offline by cyclically monitoring the instant messaging connection and the heartbeat connection. For example, if the heartbeat signal sent by a terminal device is not received within a certain period of time, it can be determined that the terminal device has been offline, that is, the communication connection with the server has been disconnected.
[0081] As an example, each terminal device among multiple terminal devices has its own user role, and the user role of at least one terminal device among the multiple terminal devices is different from the user roles of other terminal devices, and the authority of the user role of at least one terminal device is higher than the authority of the user roles of other terminal devices. For example, the user role of at least one terminal device is the target role with the highest authority.
[0082] The user role of each terminal device may be assigned by the server, or the user role of each terminal device may also be determined by the time when each terminal device establishes a communication connection with the server. Figure 3 The user role corresponding to at least one of the terminal devices can be determined by the user role corresponding to the account logged in by the terminal device, and this embodiment of the application does not limit this.
[0083] After a terminal device is connected to the server and joins a multi-person session or other interaction, the server can assign corresponding user roles to the terminal device, such as the host role and the audience role, etc. Different user roles have different operation permissions.
[0084] As an example, when determining the user role of each terminal device, the server may store the user role of each terminal device in the current multi-person session, and maintain the corresponding relationship between each terminal device and the user role in the current multi-person session.
[0085] 402. When the server detects that a communication connection between a first terminal device among multiple terminal devices and the server is disconnected, the server obtains a user role of the first terminal device before the communication connection with the server is disconnected.
[0086] As an example, in Figure 2 In the scenario shown, the host role has the highest authority. It has both the general functions of operating the virtual three-dimensional model, such as using the distance measurement, brush and cropping functions of the model, and the advanced functions of adjusting the authority, such as transferring the host role, turning on or off the authority of the audience role, etc. The audience role has lower authority, and it only has the general functions of operating the virtual three-dimensional model.
[0087] When the server detects that a terminal device is offline, assuming that the terminal device is the first terminal device, the server will obtain the user role of the first terminal device before the communication connection is disconnected. Figure 2In the scenario shown, if the first terminal device that drops offline is terminal device A, the server will obtain the user role "host role" of terminal device A before the communication connection is disconnected; if the first terminal device that drops offline is terminal device B, the server will obtain the user role "audience role" of terminal device B before the communication connection is disconnected.
[0088] 403. The server updates a user role of at least one other terminal device among the plurality of terminal devices that is in communication connection with the server, except the first terminal device, according to the user role of the first terminal device before the first terminal device is disconnected from the server.
[0089] The server will adjust and update the user role of at least one other terminal device among multiple terminal devices that maintains a communication connection with the server except the first terminal device based on the user role of the first terminal device before the communication connection is disconnected. This can achieve adaptive adjustment of the user role after the terminal device is disconnected, thereby improving the stability of the instant messaging scenario operation.
[0090] As an example, if the user role of the first terminal device before the communication connection is disconnected is the most important target role, such as the "host role" or the "teacher role", the server can select at least one other terminal device that maintains a communication connection with the server, and set its user role as the target role, such as selecting one or more other terminal devices as the target role; the server can also select at least one other terminal device that maintains a communication connection with the server, and set its user role to a secondary role whose authority is second only to the target role, such as the "class monitor role" or the "backup host role", and so on.
[0091] As another example, if the user role of the first terminal device before disconnecting the communication connection is a secondary role of average importance, such as a "squad leader role" or a "backup host role", the server can select another terminal device that maintains a communication connection with the server and set its user role to a secondary role.
[0092] As another example, if the user role of the first terminal device before the communication connection is disconnected is a non-target role of low importance, such as a "student role" or an "audience role", the server may not adjust the user roles of other terminal devices, or may adjust more than one other user roles to the non-target role. For example, when a terminal device with a "student role" disconnects the communication connection, if there are two terminal devices with a "class monitor role" among all the terminal devices currently connected to the server, the server may adjust one of the terminal devices with a "class monitor role" to a "student role". In one implementation of an embodiment of the present application, the server updates the user role of at least one other terminal device among multiple terminal devices that is in communication connection with the server except the first terminal device according to the user role of the first terminal device before the communication connection is disconnected, including:
[0093] If the user role of the first terminal device before disconnecting the communication connection with the server is the target role, the server updates the user role of the second terminal device in at least one other terminal device to the target role, and the target role is the user role with the highest authority among the user roles of multiple terminal devices.
[0094] If the user role of the first terminal device before disconnecting the communication connection is the target role with the highest authority, such as the host role or the teacher role, then its offline behavior will seriously affect the normal operation of the scene. Therefore, the server will select another terminal device from other terminal devices currently online as a substitute, which is called the second terminal device, and update the user role of the second terminal device to the target role, that is, let the second terminal device take the responsibility instead of the offline first terminal device to ensure the normal operation of the instant communication scene. On the contrary, if the user role of the first terminal device before disconnecting the communication connection is not the target role, but a non-target role such as an audience role or a student role with a lower degree of importance, then its offline behavior will not seriously affect the normal operation of the scene, and the server does not need to adjust the user roles of each terminal device. In addition, when the server selects the second terminal device from each terminal device, it can adopt a variety of different selection methods, such as specified selection, random selection, selection by connection order, selection by device number, or other methods described below, etc.
[0095] As an example, in Figure 2 In the scenario shown, if the first terminal device that goes offline is terminal device A, since it is the host role with the highest authority, the server needs to select a second terminal device from other terminal devices (terminal device B, terminal device C and terminal device D), assuming it is terminal device B, and then change the user role of terminal device B from the audience role to the host role. If the first terminal device that goes offline is terminal device B, since it is the audience role, the server does not need to adjust the user roles of each terminal device.
[0096] In an implementation of the embodiment of the present application, the server selects a second terminal device from other terminal devices, including:
[0097] The server selects a terminal device whose priority meets the requirement from other terminal devices as the second terminal device according to the priorities of other terminal devices.
[0098] In an implementation of the embodiment of the present application, the server selects a second terminal device from other terminal devices, including:
[0099] (1) The server obtains the geographic location and IP address of each terminal device among other terminal devices;
[0100] (2) The server determines the location of each of the other terminal devices based on the geographical location and IP address of each terminal device;
[0101] (3) The server selects a terminal device located at a designated location from other terminal devices as the second terminal device.
[0102] When selecting the second terminal device, the server first obtains the geographical location and IP address of each terminal device in other terminal devices except the first terminal device. Among them, since the terminal device is generally connected to the server via a network, the server can easily obtain the IP address of the terminal device. As for the geographical location of the terminal device, it can be obtained by using the positioning function of the terminal device itself and then sent to the server. Then, based on the geographical location and IP address of the terminal device, the server can determine the location of each terminal device, and finally select the terminal device whose location is the designated location as the second terminal device. For example, the target role is generally suitable for professionals, and professionals are generally located in certain designated office places, such as schools or hospitals. Therefore, by selecting a terminal device whose location is a designated location as the second terminal device, the possibility of assigning the target role to the professional can be increased, thereby improving the rationality and accuracy of assigning the target role.
[0103] In another implementation of the embodiment of the present application, selecting a second terminal device from other terminal devices includes:
[0104] (1) Obtaining the user identity of each terminal device in other terminal devices;
[0105] (2) A terminal device with a user identity of a specified identity is selected from other terminal devices as the second terminal device.
[0106] Wherein, obtaining the user identity of each terminal device in other terminal devices includes: obtaining a user image of each terminal device; and determining the user identity of each terminal device in other terminal devices according to the user image of each terminal device.
[0107] In another implementation of selecting the second terminal device, the server can obtain the user image of each terminal device, identify the user identity based on the user image, and then select the terminal device with the specified user identity as the second terminal device. Among them, the user image can be collected in advance by each terminal device and uploaded to the server, and the server can perform face recognition on the user image to determine the corresponding user identity. The target role is generally suitable for professionals, and professionals generally have a specified user identity, such as teachers or doctors. Therefore, by selecting a terminal device with a specified user identity as the second terminal device, the possibility of assigning the target role to the professional can be increased, thereby improving the rationality and accuracy of assigning the target role.
[0108] In another implementation of the embodiment of the present application, selecting a second terminal device from other terminal devices includes:
[0109] (1) obtaining the activity of each terminal device among other terminal devices, where the activity is determined according to the number of operations performed by the corresponding terminal device on the virtual three-dimensional model created by the server;
[0110] (2) A terminal device whose activity is greater than a preset threshold is selected from other terminal devices as the second terminal device.
[0111] In another implementation of selecting the second terminal device, the server can maintain a list for recording the activity of each terminal device. The activity can be determined according to the number of operations performed by the corresponding terminal device on the virtual three-dimensional model created by the server. Specifically, each time the terminal device operates the virtual three-dimensional model, the server can increase its activity by a certain value (for example, 1), and different types of operations can increase the activity by different values. The server can obtain the activity of each terminal device by querying the list, and then select the terminal device with an activity greater than a preset threshold or the highest activity as the second terminal device. Since users with high activity are generally more familiar with the scene or more skilled in operation, they are more suitable for important target roles such as hosts. Therefore, this method of selecting the second terminal device can improve the rationality and accuracy of allocating target roles.
[0112] In summary, the selected second terminal device may meet any one or more of the following conditions:
[0113] (1) The location of the second terminal device is the designated location;
[0114] (2) The user identity of the second terminal device is a designated identity;
[0115] (3) The activity of the second terminal device is greater than or equal to a preset threshold, and the activity is determined according to the operation performed by the second terminal device on the virtual three-dimensional model created by the server.
[0116] By comprehensively considering these conditions, a second terminal device that is more suitable for the target role can be selected, thereby further improving the rationality and accuracy of the user role adaptive adjustment.
[0117] In an implementation of the embodiment of the present application, before the server detects the connection status between each terminal device among the multiple terminal devices and the server, the method further includes:
[0118] The server sets the user role of the first terminal device connected to the server among the multiple terminal devices as the target role.
[0119] The server can assign user roles in the order in which each terminal device accesses the server. For example, the user role of the first terminal device connected to the server can be set as the target role, and the user roles of subsequent terminal devices connected to the server can be set as non-target roles, thereby realizing a mechanism for prioritizing the assignment of target roles according to the order of access.
[0120] In an implementation of the embodiment of the present application, the server updates the user role of the second terminal device to the target role, including:
[0121] (1) The server sets the user role of the second terminal device as a temporary target role;
[0122] (2) If the first terminal device does not reacquire the target role within the first time period, the server sets the user role of the second terminal device as a permanent target role during an interaction process such as a multi-person conversation.
[0123] Since the first terminal device is currently only disconnected, it can reconnect to the server through the disconnection and reconnection mechanism, and can regain and assume the target role after joining the multi-person session. Therefore, the server can first set the user role of the second terminal device to a temporary target role, such as assigning it a temporary host role, until the first terminal device regains the target role, and then restore the user role of the second terminal device to the audience role. Considering that the time of the multi-person session is limited, the server cannot always retain the right of the first terminal device to regain the target role. Therefore, the server can set a time limit for retaining the authority, such as a first time period (specifically, it can be set to about 2 minutes). If the first terminal device does not regain the target role within the first time period, the server sets the user role of the second terminal device to a permanent target role, such as assigning it a permanent host role. In this way, even if the first terminal device subsequently reconnects to the multi-person session, the host role identity of the second terminal device will not be changed, and the first terminal device will be made an audience role at this time. It should be noted that the permanent target role assigned to the second terminal device here means that if the second terminal device is not disconnected during the interaction process such as this multi-person conversation, it will always be the target role. However, if the second terminal device is disconnected, the server will reallocate the target role in the same way as the first terminal device is disconnected, that is, the second terminal device will no longer be the target role.
[0124] In one implementation of the embodiment of the present application, after the server updates the user role of the second terminal device to the target role, it will also notify all other online terminal devices of the target role change information, so that all participants in the multi-person session can be informed of the corresponding user role and permission changes.
[0125] like Figure 5 FIG. 1 is a schematic diagram of the interaction process between devices in a multi-person sharing scenario of instant messaging provided by an embodiment of the present application. Figure 5In the example, terminal device 1, terminal device 2, terminal device 3 and server are included, wherein the user role of terminal device 1 is the host role, and the user roles of terminal devices 2 and 3 are both audience roles. Terminal device 1 first establishes a multi-person sharing connection through the server, and the server returns a connection response and assigns the host role to terminal device 1. Subsequently, terminal devices 2 and 3 also establish a multi-person sharing connection through the server, and the server returns a connection response and assigns the audience role to terminal devices 2 and 3. The server will cyclically detect whether each terminal device is disconnected, for example, it can be detected by the heartbeat mechanism described above. When it is detected that terminal device 1 is disconnected, the server assigns a temporary host role to terminal device 2 and notifies terminal device 3 of the corresponding user role and permission changes. Afterwards, if terminal device 1 is disconnected and reconnected successfully, and a multi-person sharing connection is reestablished, the server will first determine whether terminal device 1 can take back the host role. The specific judgment conditions here can be referred to as described below. If terminal device 1 can take back the host role, the server will reclaim the host role of terminal device 2, reassign the host role to terminal device 1, and notify terminal device 3 of the corresponding user role and permission changes. If terminal device 1 cannot take back the moderator role, the server will assign a viewer role to terminal device 1 and may change the temporary moderator role of terminal device 2 to a permanent moderator role.
[0126] In one implementation of the embodiment of the present application, the method for setting a user role in instant messaging further includes:
[0127] When it is detected that the third terminal device is connected to the server and requests to join a multi-person session or other interaction, if the third terminal device meets the conditions for obtaining the target role, the server sets the user role of the third terminal device as the target role.
[0128] If the server detects that there is a terminal device currently connected to the server and requests to join a multi-person session, assuming that the terminal device is a third terminal device, the server will first determine whether the third terminal device meets the conditions for obtaining the target role. If the third terminal device meets the conditions for obtaining the target role, the user role of the third terminal device is set to the target role, such as the host role; conversely, if the third terminal device does not meet the conditions for obtaining the target role, the user role of the third terminal device is set to other non-target roles, such as the audience role. Obviously, the third terminal device here refers to any terminal device currently connected to the server, which may be a terminal device that is disconnected and reconnected, such as the first terminal device that is disconnected and reconnected as described above or another terminal device that is disconnected and reconnected, or it may be a terminal device that is newly added to the multi-person session and other interactions. Through such a setting, each terminal device that joins the multi-person session can obtain the corresponding user role as appropriate, thereby improving the integrity and comprehensiveness of the scene application.
[0129] In one implementation of the embodiment of the present application, whether the third terminal device meets the condition for obtaining the target role is determined in the following manner:
[0130] If the third terminal device is a terminal device that is disconnected and reconnected from multiple terminal devices, and the user role of the third terminal device before disconnecting the communication connection is the target role, the server determines that the third terminal device meets the conditions for obtaining the target role.
[0131] When the server determines whether the third terminal device meets the conditions for obtaining the target role, it can first detect whether the third terminal device is a terminal device that is disconnected and reconnected. Specifically, when the server receives the connection request of the third terminal device, it can obtain information such as the type and unique identifier of the third terminal device, and then, it can query according to the unique identifier to determine whether the server side saves the previous connection or disconnection record of the third terminal device. If there is a record, it means that the third terminal device is a terminal device that is disconnected and reconnected, otherwise it means that the third terminal device is not a terminal device that is disconnected and reconnected. If the third terminal device is a terminal device that is disconnected and reconnected, the server will continue to detect whether the user role of the third terminal device before disconnecting the communication connection is the target role. If so, it is determined that the third terminal device meets the conditions for obtaining the target role, otherwise it is determined that the third terminal device does not meet the conditions for obtaining the target role. Through this setting, the terminal device of the original target role has the reasonable right to get back the target role after disconnection and reconnection, thereby improving the rationality and practicality of the scene application.
[0132] In another implementation of the embodiment of the present application, whether the third terminal device meets the condition for obtaining the target role is determined in the following manner:
[0133] If the third terminal device is a terminal device that is disconnected and reconnected from multiple terminal devices, the user role of the third terminal device before disconnecting the communication connection is the target role, and the third terminal device confirms to re-acquire the target role, the server determines that the third terminal device meets the conditions for acquiring the target role.
[0134] In some cases, after the user of the original target role is disconnected and reconnected, since the server has assigned the target role to another terminal device, in order to ensure the smooth operation of the scene, the user may not necessarily want to get the target role back. In view of this situation, when the server determines whether the third terminal device meets the conditions for obtaining the target role, it can add a condition, that is, to determine whether the third terminal device confirms to re-acquire the target role. Specifically, after the server determines in sequence in the above manner that the third terminal device is a terminal device that is disconnected and reconnected and the user role before the communication connection is disconnected is the target role, it further determines whether the third terminal device confirms to re-acquire the target role. If so, it is determined that the third terminal device meets the conditions for obtaining the target role, otherwise it is determined that the third terminal device does not meet the conditions for obtaining the target role. Through such a setting, it is possible to make a comprehensive judgment based on the willingness of the terminal device of the original target role to take back the target role, and determine whether to reallocate the target role for the terminal device, which can further improve the rationality and practicality of the scene application.
[0135] Specifically, whether the third terminal device confirms to re-acquire the target role is determined in the following manner:
[0136] (1) The server obtains the parameter data sent by the third terminal device when connecting to the server;
[0137] (2) The server determines whether the third terminal device confirms to re-acquire the target role based on the transmitted parameter data.
[0138] When the third terminal device is connected to the server, it will send some parameter data, and the server can determine whether the third terminal device confirms to reacquire the target character based on the parameter data. For example, when the third terminal device is connected to the server and chooses to join a multi-person session, the server can provide two entrances to enter the session, one of which is the target character entrance and the other is the non-target character entrance. If the user of the third terminal device wants to get the target character back, he can choose the target character entrance to enter the session. If he does not want to get the target character back, he can choose the non-target character entrance to enter the session. Based on the parameter data of the third terminal device, the server can know which entrance it entered the session through, thereby determining whether the third terminal device confirms to reacquire the target character.
[0139] In another implementation of the embodiment of the present application, whether the third terminal device meets the condition for obtaining the target role is determined in the following manner:
[0140] If the third terminal device is a terminal device that is disconnected and reconnected among multiple terminal devices, the user role of the third terminal device before disconnecting the communication connection is the target role, the third terminal device confirms to re-acquire the target role, and the disconnection time of the third terminal device does not exceed the second time, the server determines that the third terminal device meets the conditions for acquiring the target role.
[0141] As described above, it is impossible for the server to always retain the right of a certain terminal device to reacquire the target role. Therefore, when the server determines whether the third terminal device meets the conditions for acquiring the target role, it can add another condition, that is, to determine whether the disconnection time of the third terminal device does not exceed the second time. The second time here and the first time described above can be the same permission retention time limit. Specifically, after the server determines in the above manner that the third terminal device is a terminal device that is disconnected and reconnected, the user role before the communication connection is disconnected is the target role, and confirms the reacquisition of the target role, it further determines whether the disconnection time of the third terminal device does not exceed the second time. If so, it is determined that the third terminal device meets the conditions for acquiring the target role, otherwise it is determined that the third terminal device does not meet the conditions for acquiring the target role.
[0142] In another implementation of the embodiment of the present application, whether the third terminal device meets the condition for obtaining the target role is determined in the following manner:
[0143] If any terminal device among all the terminal devices currently connected to the server has already acquired the permanent target role, the server determines that the third terminal device does not meet the condition for acquiring the target role.
[0144] Referring to the content described above, if the disconnected terminal device of the original target role does not reacquire the target role within the permission retention time limit, the server will change the temporary target role assigned to another terminal device to a permanent target role. Based on this situation, when the server determines whether the third terminal device meets the conditions for obtaining the target role, it can first detect whether any terminal device currently connected to the server has obtained the permanent target role. If it exists, it means that even if the third terminal device is the disconnected terminal device of the original target role, its disconnection time exceeds the permission retention time limit. Therefore, it can be determined that the third terminal device definitely does not meet the conditions for obtaining the target role, and it is not necessary to judge the above other conditions at this time, which can reduce system consumption to a certain extent. On the contrary, if it does not exist, continue to judge the above other conditions to determine whether the third terminal device meets the conditions for obtaining the target role.
[0145] In another implementation of the embodiment of the present application, whether the third terminal device meets the condition for obtaining the target role is determined in the following manner:
[0146] If the third terminal device is not a disconnected and reconnected terminal device, the server determines that the third terminal device does not meet the condition for acquiring the target role.
[0147] If the third terminal device is not a terminal device that is disconnected and reconnected, it means that the third terminal device is a newly connected terminal device. In order to ensure the normal operation of the instant messaging scenario, before the third terminal device is connected, the server can assign a target role to at least one connected terminal device. Therefore, the server can determine that the third terminal device does not meet the conditions for obtaining the target role, and thus assign a non-target role to the third terminal device. In another implementation of the embodiment of the present application, whether the third terminal device meets the conditions for obtaining the target role is determined in the following manner:
[0148] If the third terminal device is not a disconnected and reconnected terminal device, and the user roles of all terminal devices currently connected to the server are not the target role, the server determines that the third terminal device meets the condition for obtaining the target role.
[0149] If the third terminal device is not a terminal device that is disconnected and reconnected, it means that the third terminal device is a newly connected terminal device. At this time, the server can first determine whether there is a terminal device with a user role as the target role among all the terminal devices currently connected. If not, it is determined that the third terminal device meets the conditions for obtaining the target role, otherwise it is determined that the third terminal device does not meet the conditions for obtaining the target role. It can be seen that if the third terminal device is the first terminal device to access the multi-person session or other interactions, since there is no other terminal device connected to the server at this time, there is definitely no terminal device with a user role as the target role. Therefore, the server determines that the third terminal device meets the conditions for obtaining the target role, thereby assigning the target role to the third terminal device, which belongs to a mechanism for preferentially assigning the target role according to the access order. On the contrary, if there is a terminal device with a user role as the target role among all the terminal devices currently connected to the server, whether the terminal device is the initial target role or the temporary target role assigned by the server later, the server determines that the third terminal device does not meet the conditions for obtaining the target role, thereby assigning a non-target role to the third terminal device.
[0150] like Figure 6 FIG. 1 is a schematic diagram of an operation flow of assigning user roles to connected terminal devices by a server provided in an embodiment of the present application. Figure 6In , when the server detects that a terminal device has joined a multi-person sharing connection, it will first determine whether the terminal device is a disconnected and reconnected device. If it is not a disconnected and reconnected device, it can be determined that the user of the terminal device is a new user. At this time, it is detected whether there is a host role in other connected devices. If it exists, the terminal device is assigned a spectator role. If not, the terminal device is assigned a host role. If it does not exist, the terminal device is assigned a host role. If the terminal device is a disconnected and reconnected device, first determine whether the terminal device is the original host role. If not, the terminal device is assigned a spectator role. If so, continue to determine whether the terminal device wants to take back the host role. If the terminal device does not want to take back the host role, the terminal device is assigned a spectator role. Otherwise, continue to determine whether the disconnection time of the terminal device exceeds the permission retention time limit. If the disconnection time of the terminal device exceeds the permission retention time limit, the terminal device is assigned a spectator role. Otherwise, the terminal device is assigned a host role.
[0151] In the embodiment of the present application, when multiple terminal devices are connected to the server at the same time for multi-person conversation and other interactions, the server will detect the connection status of each terminal device in real time. If it is detected that a terminal device is disconnected from the communication connection, the user role of the terminal device before the communication connection is disconnected will be obtained, and the user role of at least one other terminal device except the terminal device will be updated according to the user role, so that the user role can be adaptively adjusted after the terminal device is disconnected, thereby improving the stability of the operation of the instant communication scene. For example, assuming that a terminal device assumes a target role with important permissions, when it is disconnected, the server can select a terminal device from other currently connected terminal devices as a substitute to assume the target role on its behalf, thereby ensuring the normal operation of the instant communication scene.
[0152] To summarize, the embodiment of the present application establishes multi-person sharing through instant messaging technology, supports permission protection based on the role situation before the terminal device is disconnected and reconnected after the terminal device is disconnected, and supports the allocation of temporary important permissions to other terminal devices during the terminal device disconnection, thereby improving the stability of the instant messaging scenario operation.
[0153] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0154] A method for setting a user role in instant messaging is mainly described above. A device for setting a user role in instant messaging will be described below.
[0155] See also Figure 7 In an embodiment of the present application, an embodiment of a device for setting a user role in instant messaging includes:
[0156] A detection module 701 is used to detect the connection status between each terminal device and a server among multiple terminal devices, and the multiple terminal devices interact with each other through the server;
[0157] The acquisition module 702 is used to acquire the user role of the first terminal device before the communication connection with the server is disconnected when it is detected that the communication connection between the first terminal device and the server is disconnected among the multiple terminal devices;
[0158] The updating module 703 is used to update the user role of at least one other terminal device among the multiple terminal devices except the first terminal device and maintaining communication connection with the server according to the user role of the first terminal device before the communication connection with the server is disconnected.
[0159] In one implementation of the embodiment of the present application, the updating module 703 includes:
[0160] The user role updating unit is used to update the user role of a second terminal device in at least one other terminal device to the target role if the user role of the first terminal device before disconnecting the communication connection with the server is the target role, and the target role is the user role with the highest authority among the user roles of multiple terminal devices.
[0161] In one implementation of the embodiment of the present application, the user role updating unit includes:
[0162] A temporary role setting subunit, used to set the user role of the second terminal device to a temporary target role;
[0163] The permanent role setting subunit is used to set the user role of the second terminal device as the permanent target role during the interaction process if the first terminal device does not re-acquire the target role within the first time period.
[0164] In one implementation of the embodiment of the present application, the device for setting a user role in instant messaging further includes:
[0165] The user role setting module is used to set the user role of the third terminal device to the target role when it is detected that the third terminal device is connected to the server and requests to join the interaction and the third terminal device meets the conditions for obtaining the target role.
[0166] In one implementation of the embodiment of the present application, the device for setting a user role in instant messaging further includes:
[0167] The target role setting module is used to set the user role of the first terminal device connected to the server among multiple terminal devices as the target role.
[0168] In one implementation of the embodiment of the present application, the device for setting a user role in instant messaging further includes:
[0169] The condition judgment module is used to determine that the third terminal device does not meet the condition for obtaining the target role if the third terminal device is not a terminal device that is disconnected and reconnected among multiple terminal devices.
[0170] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method for setting a user role in instant messaging as represented by any of the above embodiments.
[0171] An embodiment of the present application also provides a computer program product. When the computer program product runs on a server, the server executes the method for setting user roles in instant messaging as represented by any of the above embodiments.
[0172] Figure 8 Schematic diagram of a server provided by an embodiment of the present application. Figure 8 As shown, the server 8 of this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. When the processor 80 executes the computer program 82, the steps in the above-mentioned embodiments of each method are implemented, for example Figure 4 Alternatively, when the processor 80 executes the computer program 82, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 7 The functions of the detection module 701 to the update module 703 are shown.
[0173] The computer program 82 may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 82 in the server 8.
[0174] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0175] The memory 81 may be an internal storage unit of the server 8, such as a hard disk or memory of the server 8. The memory 81 may also be an external storage device of the server 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the server 8. Further, the memory 81 may also include both an internal storage unit of the server 8 and an external storage device. The memory 81 is used to store the computer program and other programs and data required by the server. The memory 81 may also be used to temporarily store data that has been output or is to be output.
[0176] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0177] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0178] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0179] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0180] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0181] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0182] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0183] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0184] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such 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 application, and should all be included in the protection scope of the present application.
Claims
1. A method for setting a user role in instant messaging, characterized in that: include: Detecting a connection status between each of a plurality of terminal devices and a server, wherein the plurality of terminal devices interact with each other through the server; When it is detected that a communication connection between a first terminal device among the plurality of terminal devices and the server is disconnected, obtaining a user role of the first terminal device before the communication connection between the first terminal device and the server is disconnected; According to the user role of the first terminal device before the communication connection with the server is disconnected, the user role of at least one other terminal device among the plurality of terminal devices except the first terminal device and maintaining the communication connection with the server is updated.
2. The method according to claim 1, characterized in that The updating, according to the user role of the first terminal device before the communication connection with the server is disconnected, of at least one other terminal device among the plurality of terminal devices except the first terminal device and maintaining a communication connection with the server comprises: If the user role of the first terminal device before disconnecting the communication connection with the server is the target role, the user role of the second terminal device in the at least one other terminal device is updated to the target role, and the target role is the user role with the highest authority among the user roles of the multiple terminal devices.
3. The method according to claim 2, characterized in that The second terminal device meets any one or more of the following conditions: The location of the second terminal device is a designated location; The user identity of the second terminal device is a designated identity; The activity of the second terminal device is greater than or equal to a preset threshold, and the activity is determined according to an operation performed by the second terminal device on the virtual three-dimensional model created by the server.
4. The method according to claim 2, characterized in that The updating the user role of the second terminal device in the at least one other terminal device to the target role includes: Setting the user role of the second terminal device as the temporary target role; If the first terminal device does not reacquire the target role within the first time period, the user role of the second terminal device is set as the permanent target role.
5. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: When it is detected that a third terminal device is connected to the server and requests to join the interaction, if the third terminal device meets the condition for acquiring the target role, the user role of the third terminal device is set as the target role.
6. The method according to claim 5, characterized in that When the third terminal device satisfies any one of the following conditions, it is determined that the third terminal device satisfies the condition for acquiring the target role: The third terminal device is a terminal device that is disconnected and reconnected from the multiple terminal devices, and the user role of the third terminal device before disconnecting the communication connection with the server is the target role; The third terminal device is a terminal device that is disconnected and reconnected from the multiple terminal devices, the user role of the third terminal device before disconnecting the communication connection with the server is the target role, and the third terminal device confirms to reacquire the target role; The third terminal device is a terminal device that is disconnected and reconnected among the multiple terminal devices, the user role of the third terminal device before disconnecting from the server is the target role, the third terminal device confirms the re-acquisition of the target role, and the disconnection duration of the third terminal device does not exceed the second duration.
7. The method according to claim 5, characterized in that Whether the third terminal device meets the condition for acquiring the target role is determined in the following manner: If the third terminal device is not a terminal device that is disconnected and reconnected from the multiple terminal devices, it is determined that the third terminal device does not meet the condition for acquiring the target role.
8. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for setting a user role in instant messaging as described in any one of claims 1 to 7 is implemented.
9. An instant messaging system, characterized in that: It comprises the server as claimed in claim 8 and a plurality of terminal devices connected to the server.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for setting a user role in instant messaging as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Fault processing method and device
CN109992452A
Conference joining link mode and charging duration confirmation method based on charging cloud conference
CN112468390A
Mobile terminal conference system
CN113038064A
Method and device for determining host of online conference, equipment and storage medium
CN113810204A
Method and arrangement for management of virtual meetings
US20090181659A1