CN112187868B - Information transmission method, readable storage medium, and electronic device - Google Patents

Information transmission method, readable storage medium, and electronic device Download PDF

Info

Publication number
CN112187868B
CN112187868B CN202010917167.XA CN202010917167A CN112187868B CN 112187868 B CN112187868 B CN 112187868B CN 202010917167 A CN202010917167 A CN 202010917167A CN 112187868 B CN112187868 B CN 112187868B
Authority
CN
China
Prior art keywords
information
sequence number
version
version sequence
virtual space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010917167.XA
Other languages
Chinese (zh)
Other versions
CN112187868A (en
Inventor
朱为
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dami Technology Co Ltd
Original Assignee
Beijing Dami Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dami Technology Co Ltd filed Critical Beijing Dami Technology Co Ltd
Priority to CN202010917167.XA priority Critical patent/CN112187868B/en
Publication of CN112187868A publication Critical patent/CN112187868A/en
Application granted granted Critical
Publication of CN112187868B publication Critical patent/CN112187868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Cardiology (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses an information transmission method, a readable storage medium and electronic equipment, wherein the corresponding first version serial number is updated when user information comprising a virtual space identifier is received by determining the first version serial number corresponding to the virtual space identifier. And returning user feedback information comprising the updated first version sequence number to the first terminal equipment for sending the user information, and simultaneously sending broadcast information comprising the updated first version sequence number to the second terminal equipment corresponding to the virtual space identifier. According to the embodiment of the invention, the first version sequence number corresponding to the virtual space is introduced in the communication process, so that the information transmission process is monitored in a mode of updating the first version sequence number when information is received each time, the situation of missing or losing the information is avoided, and the reliability of the information transmission process is ensured.

Description

Information transmission method, readable storage medium, and electronic device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an information transmission method, a readable storage medium, and an electronic device.
Background
With the development of internet technology, more and more information can be transmitted online through a network, so that the speed, efficiency and quality of the information transmission process are improved. In the prior art, when information is transmitted between two devices, the situation that communication information is lost occurs when interference of factors such as dropped lines, lost packets, stuck, delay and the like is encountered in the data communication process.
Disclosure of Invention
In view of this, the embodiments of the present invention provide an information transmission method, a readable storage medium, and an electronic device, which aim to avoid information loss in a communication process and ensure reliability of the communication process.
In a first aspect, an embodiment of the present invention provides an information transmission method, where the method includes:
determining a first version number corresponding to the virtual space identifier;
in response to receiving user information including a virtual space identifier, updating the corresponding first version number;
returning user feedback information comprising the first version sequence number to first terminal equipment for sending the user information;
and sending the broadcast information comprising the first version sequence number to the second terminal equipment corresponding to the virtual space identifier.
Further, the method further comprises:
receiving heartbeat information comprising a virtual space identifier and a second version sequence number;
responding to the second version sequence number smaller than the first version sequence number corresponding to the virtual space identifier, and determining at least one missed broadcasting message according to the second version sequence number and the first version sequence number;
and returning the heartbeat feedback information comprising the first version sequence number and each missed broadcasting information.
Further, the user information is access information or operation signaling.
In a second aspect, an embodiment of the present invention provides an information transmission method, where the method includes:
transmitting user information;
determining a second version sequence number in response to receiving user feedback information returned by the server based on the user information;
and updating the second version sequence number according to the first version sequence number in the user feedback information.
Further, the method further comprises:
and retransmitting the user information in response to not receiving the user feedback information returned by the server based on the user information.
Further, the updating the second version sequence number according to the first version sequence number in the user feedback information specifically includes:
and updating the second version sequence number to be the first version sequence number in response to the difference value between the first version sequence number and the second version sequence number being a preset value.
Further, the updating the second version sequence number according to the first version sequence number in the user feedback information specifically includes:
transmitting heartbeat information including the second version sequence number in response to the difference between the first version sequence number and the second version sequence number being greater than a preset value;
receiving heartbeat feedback information returned by the server based on the heartbeat information, wherein the heartbeat feedback information comprises a first version sequence number and at least one corresponding broadcast information;
and storing the broadcast information and updating the second version sequence number to the first version sequence number.
Further, the storing the broadcast information includes:
determining a local broadcast information set, wherein the local broadcast information set comprises a plurality of local broadcast information received in a history mode;
judging whether broadcast information different from each local broadcast information in a local broadcast information set exists in the heartbeat feedback information;
in response to there being broadcast information different from the local broadcast information, the broadcast information is stored as local broadcast information to the local broadcast information set.
In a third aspect, embodiments of the present invention provide a computer readable storage medium storing computer program instructions which, when executed by a processor, implement the method of any one of the first and second aspects.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory is configured to store one or more computer program instructions, and wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of the first aspect and the second aspect.
The embodiment of the invention updates the corresponding first version serial number when receiving the user information comprising the virtual space identifier by determining the first version serial number corresponding to the virtual space identifier. And returning user feedback information comprising the updated first version sequence number to the first terminal equipment for sending the user information, and simultaneously sending broadcast information comprising the updated first version sequence number to the second terminal equipment corresponding to the virtual space identifier. According to the embodiment of the invention, the first version sequence number corresponding to the virtual space is introduced in the communication process, so that the information transmission process is monitored in a mode of updating the first version sequence number when information is received each time, the situation of missing or losing the information is avoided, and the reliability of the information transmission process is ensured.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of embodiments of the present invention with reference to the accompanying drawings, in which:
fig. 1 is a schematic diagram of an information transmission system to which an information transmission method according to an embodiment of the present invention is applied;
fig. 2 is a flowchart of an information transmission method at a server according to an embodiment of the present invention;
FIG. 3 is a data flow chart of a method for transmitting information at a server according to an embodiment of the present invention;
FIG. 4 is a data flow chart of an information synchronization process at a server side according to an embodiment of the present invention;
fig. 5 is a flowchart of an information transmission method at a terminal device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an information synchronization process at a terminal device according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The present invention is described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth in detail. The present invention will be fully understood by those skilled in the art without the details described herein. Well-known methods, procedures, flows, components and circuits have not been described in detail so as not to obscure the nature of the invention.
Moreover, those of ordinary skill in the art will appreciate that the drawings are provided herein for illustrative purposes and that the drawings are not necessarily drawn to scale.
Unless the context clearly requires otherwise, the words "comprise," "comprising," and the like in the description are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, it is the meaning of "including but not limited to".
In the description of the present invention, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
Fig. 1 is a schematic diagram of an information transmission system to which the information transmission method according to the embodiment of the present invention is applied, and as shown in fig. 1, the information transmission system includes a server 10, a first terminal device 11, and a second terminal device 12. The server 10 is configured to receive user information sent by the first terminal device 11, and update a corresponding first version sequence number according to the user information. And then the user feedback information comprising the first version serial number is returned to the first terminal equipment 11, and the broadcast information comprising the first version serial number is sent to the corresponding at least one second terminal equipment 12.
The embodiment of the invention can be applied to any information transmission system in which the terminal equipment and the server transmit information. Such as social software, live software, and application scenarios such as online educational websites. In the embodiment of the present invention, the first terminal device 11 and the second terminal device 12 may be general-purpose data processing terminals with communication functions, such as smart phones or tablet computers, capable of running computer programs. The server 10 may be a single server or may be a cluster of servers configured in a distributed manner.
The application scenario of the information transmission method for the online education platform is described as an example. The server 10 is a platform server of an online education platform, the first terminal device 11 may be a teacher terminal used by a teacher user or a student terminal used by a student user, and the second terminal device 11 is a teacher terminal or a student terminal logged in the same virtual classroom with the first terminal device 11. When the student user and the teacher user enter the virtual classroom, and when the students perform actions such as displaying courseware, controlling PPT page turning, and submitting homework, the student user and the teacher user need to send corresponding user information to the server 10. The server 10 maintains a first version number corresponding to each virtual classroom, and when user information is received, updates the corresponding first version number according to the virtual classroom corresponding to the user information. Meanwhile, after updating the first version number, the server 10 synchronizes the updated first version number to the first terminal device 11 that sends the user information and the second terminal device 12 that logs in the same virtual classroom with the first terminal device 11 by feeding back the user feedback message and pushing the broadcast information.
For example, when the teacher terminal initiates the PPT page turning action instruction, the first terminal device 11 in the information transmission system is a teacher terminal, and the second terminal device 12 is a student terminal. The teacher terminal sends a page turning action instruction to the server 10, and the server 10 updates the first version serial number of the virtual classroom where the teacher terminal is located after receiving the page turning action instruction. And returning a page turning action instruction feedback message comprising the first version sequence number to the teacher terminal so as to inform the teacher terminal of receiving the page turning action instruction, and synchronizing the first version number at the teacher terminal. Meanwhile, the server 10 also transmits broadcast information including the first version number and page turning information to the student terminals. And displaying the turned PPT at the student terminal and synchronizing the corresponding first version serial number at the student terminal.
Fig. 2 is a flowchart of an information transmission method at a server according to an embodiment of the present invention. As shown in fig. 2, the information transmission method includes the steps of:
s100, determining a first version serial number corresponding to the virtual space identifier.
Specifically, the server may create a corresponding virtual space based on a virtual space creation request sent by a preset virtual space creation rule terminal device, where the virtual space is a specific space that may log in a plurality of terminal devices, for example, may be an online classroom of an online education platform, a live room of a live platform, a group chat of a social platform, a group, a channel of a music broadcasting platform, and so on. And each virtual space generates a corresponding first version sequence number when the creation is successful, and the corresponding first version sequence number is used for representing the state of the corresponding virtual space. And when events such as an information transmission process, a data processing process and the like occur in the corresponding virtual space, determining the final state of the corresponding virtual space by updating the first version sequence number. Meanwhile, the server can synchronize the final state of the virtual space through the terminal devices which log in the virtual space in a mode of sending the updated first version serial number. In the embodiment of the invention, the correspondence between the virtual space and the first version number may be stored by maintaining a key value pair table in the server, that is, storing a virtual space identifier and the corresponding first version number in a key value pair manner, where the virtual space identifier is used to characterize the corresponding virtual space. Optionally, when each virtual space is created by the server, the initial value of the corresponding generated first version sequence number is 0. And when the server receives an information transmission request or a data processing request corresponding to the virtual space, adding one on the basis of the current first version sequence number.
The embodiment of the invention is applied to an online education platform for explanation. The server of the online education platform can create a corresponding online virtual classroom according to a classroom creation request sent by a teacher terminal or preset classroom configuration information, and creates a corresponding first version serial number while creating the virtual classroom. The online virtual classroom can be used for a plurality of teacher terminals and student terminals to log in for online teaching.
Step 200, in response to receiving the user information including the virtual space identifier, updating the corresponding first version number.
Specifically, in the process of requesting to log in the virtual space and performing information transmission and data processing in the logged in virtual space, the terminal device sends corresponding user information to the server, where the user information is used to characterize a task that the terminal device requests the server to process. When the terminal equipment requests to log in the virtual space, the user information sent to the server is access information comprising the virtual space identifier. The access information is information of the terminal device accessing the virtual space and exiting the virtual space, and may be, for example, a request for logging in the virtual space, a notification for exiting the virtual space, or the like. And when the terminal equipment performs information transmission and data processing in the logged-in virtual space, sending an operation instruction comprising the virtual space identifier to a server. The operation instruction is an instruction for triggering an event in the virtual space, such as a PPT page turning instruction, a job submitting instruction, a forbidden language instruction of a live broadcast platform and the like in the online education process. And when receiving the user information, the server performs corresponding processing based on the user information. And simultaneously, the server determines a corresponding first version sequence number according to the virtual space identifier in the user information, and updates the first version sequence number according to a preset version sequence number updating rule. In the embodiment of the present invention, the version sequence number updating rule may be to add one to the current first version sequence number when receiving the user information each time, so as to obtain an updated first version sequence number.
The embodiment of the invention is applied to an online education platform for explanation. And for the online virtual classrooms which are not logged in the user terminal, the corresponding first version serial number is 0. When the teacher terminal sends access information comprising the virtual space identifier to the server, the server adds the teacher terminal into an online virtual classroom corresponding to the virtual space identifier. And meanwhile, the server also determines that the corresponding first version serial number is 0 according to the virtual space identifier, and updates the first version serial number to 1.
And step S300, returning user feedback information comprising the first version sequence number to the first terminal equipment for sending the user information.
Specifically, each virtual space in the server may log in at least one terminal device. Among the terminal devices registered in the virtual space, the terminal device that transmits the user information to the server is the first terminal device, and the terminal device that does not transmit the user information to the server is the second terminal device. The first terminal equipment and the second terminal equipment which are logged in each virtual space need to be dynamically determined, when the server receives user information corresponding to the virtual space, the terminal equipment which sends the user information is determined to be the first terminal equipment corresponding to the virtual space, and the terminal equipment which is logged in the virtual space is the second terminal equipment except the first terminal equipment.
In the embodiment of the invention, after receiving the user information and determining the first terminal equipment for sending the user information, the server returns user feedback information based on the user information. The user feedback information is used for reminding the first terminal equipment that the user information is successfully sent. Meanwhile, the user feedback information further comprises an updated first version sequence number, and the updated first version sequence number is used for synchronizing the current state of the corresponding virtual space with the first terminal equipment.
The embodiment of the invention is applied to an online education platform for explanation. And for the online virtual classrooms which are not logged in the user terminal, the corresponding first version serial number is 0. When the teacher terminal sends access information comprising the virtual space identifier to the server, the server adds the teacher terminal into an online virtual classroom corresponding to the virtual space identifier and updates the first version number to 1. After updating the first version number, the server transmits access success information including the first version number having a value of 1 to the teacher terminal. And the teacher terminal judges that the teacher terminal is added into the corresponding online virtual classroom after receiving the access success information, and simultaneously stores the first version serial number 1 as a second version serial number to the local.
And step 400, sending the broadcast information comprising the first version sequence number to the second terminal equipment corresponding to the virtual space identifier.
Specifically, step S400 in the embodiment of the present invention may be performed simultaneously with step S300, that is, after updating the first version sequence number, the server may simultaneously send user feedback information and broadcast information including the first version sequence number to the first terminal device and the second terminal device, respectively. The broadcast information is used for notifying details of the change of the current state of the corresponding virtual space of the second terminal equipment, and the first version sequence number is used for synchronizing the current state of the corresponding virtual space with the second terminal equipment.
The embodiment of the invention is applied to an online education platform for explanation. For the online virtual classroom in which the teacher terminal is logged in, the corresponding first version number is 1. When a student terminal sends access information comprising a virtual space identifier to a server, the server adds the student terminal into an online virtual classroom corresponding to the virtual space identifier and updates the first version serial number to 2. After updating the first version number, the server transmits access success information including the first version number of 2 to the student terminals, and simultaneously transmits a student terminal joining broadcast including the first version number of 2 to the teacher terminal. And the student terminal judges that the student terminal is added into the corresponding online virtual classroom after receiving the access success information, and simultaneously stores the first version serial number 2 as a second version serial number to the local. And after receiving the student terminal joining broadcast, the teacher terminal displays an online virtual classroom interface after the student terminal joining. And updating the local second version sequence number value to 2 according to the received first version sequence number.
Fig. 3 is a data flow chart of an information transmission method at a server according to an embodiment of the present invention. As shown in fig. 3, the information transmission process is as follows:
s30: the user information is sent by the first terminal device 30 to the server 31.
S31: the server 31 updates the first version number based on the user information. Wherein, after receiving the user information, the server 31 determines a virtual space corresponding to a virtual space identifier included in the user information. Further, the corresponding first version number and the second terminal device 32 of the virtual space login are determined according to the corresponding virtual space. And updating the first version sequence number.
S32: the user feedback information including the updated first version number is sent to the first terminal device 30.
S33: the broadcast information including the updated first version number is transmitted to the second terminal device 32.
In the process of information transmission, information may be missed due to network failure or the like. For example, in the embodiment of the present invention, the server may miss broadcast information or feedback information from the user. Therefore, in order to avoid the situation that the information leaks, the information transmission method according to the embodiment of the present invention may further include the following steps:
step S500, receiving heartbeat information including the virtual space identifier and the second version serial number.
Specifically, the terminal device registered in the virtual space may periodically send heartbeat information to the server. The heartbeat information is a small data packet sent to the server by the terminal equipment at intervals, and is used for reporting the activity to the server, and judging whether the communication link is disconnected or not through the reply condition of the server. In the information transmission process of the embodiment of the invention, in order to ensure that the virtual space state determined by the terminal equipment is the same as the virtual space state determined by the server, the terminal equipment logged in the virtual space sends the local second version serial number and the logged-in virtual space identifier to the server together with the heartbeat information.
Further, in order to improve efficiency of the heartbeat information transmission process, the embodiment of the invention can further send the heartbeat information including the virtual space identifier and the second version sequence number to the server under the preset condition. For example, when the terminal device does not receive new broadcast information within a preset time period after receiving the broadcast information last time, the new broadcast information can be sent to the server together with the second version serial number by carrying the virtual space identifier by heartbeat information sent to the server at regular time.
And step S600, responding to the second version sequence number smaller than the first version sequence number corresponding to the virtual space identifier, and determining at least one missed broadcasting message according to the second version sequence number and the first version sequence number.
Specifically, after the server receives the heartbeat information, the heartbeat information is analyzed to obtain a second version serial number and a virtual space identifier corresponding to the terminal equipment. And determining a corresponding first version signal according to the virtual space identifier, and comparing the first version signal with the second version sequence number to judge whether missed broadcasting information exists. And when the first version sequence number is the same as the second version sequence number, the server successfully updates and judges that the missed broadcasting information does not exist according to the second version sequence number. When the first version sequence number is larger than the second version sequence number, the server judges that missed broadcasting information exists according to unsuccessful updating of the second version sequence number, so that the first version sequence number included in the server is not timely synchronized to the terminal equipment.
After creating the virtual space, the server receives the user information sent by the terminal equipment logged in by the virtual space, and stores the user information according to the time sequence of receiving the user information. Therefore, when the server determines that the first version sequence number is greater than the second version sequence number, the server can determine the quantity of missed broadcast information according to the difference value between the first version sequence number and the second version sequence number. And acquiring the missed transmission quantity of the user information from the stored user information according to the storage time from late to early, and generating corresponding broadcast information based on each piece of the user information.
Step S700, returning the heartbeat feedback information including the first version number and each missed broadcast information.
Specifically, after receiving the heartbeat information sent by the terminal device, the server feeds back heartbeat feedback information to the terminal device each time, so as to inform the terminal device that the heartbeat information is received. Meanwhile, when the server compares the first version sequence number with the second version sequence number and finds that missed broadcast information exists, the missed broadcast information and the first version sequence number are transmitted to the terminal equipment together with heartbeat feedback information. And the terminal equipment updates a local second version sequence number according to the first version sequence number and stores each piece of broadcasting information.
Fig. 4 is a data flow chart of an information synchronization process at a server side according to an embodiment of the present invention. As shown in fig. 4, the information synchronization process includes:
s40: and sending heartbeat information to the server 40 through the terminal equipment 41, wherein the heartbeat information comprises the virtual space identifier logged in by the terminal equipment 41 and the corresponding second version serial number.
S41: when determining that the second version number is smaller than the first version number corresponding to the virtual space identifier, the server 40 determines at least one missed broadcast message according to the second version number and the first version number.
S42: after determining the missed broadcast information, the server 40 transmits the missed broadcast information and the first version sequence number to the terminal device 41 together with the heartbeat feedback information.
The information transmission method of the embodiment of the invention is based on the virtual space for communication, and a first version sequence number corresponding to the virtual space is introduced in the communication process. The information transmission process is monitored by updating the first version sequence number when the information is received each time, and the situation that the information is missed or lost is avoided by synchronizing the first version sequence number with the terminal equipment logged in the virtual space after the information is transmitted each time, so that the reliability of the information transmission process is ensured.
Fig. 5 is a flowchart of an information transmission method at a terminal device according to an embodiment of the present invention. As shown in fig. 5, the information transmission method of the terminal device side includes the following steps:
step S800, user information is sent.
Specifically, in the process of requesting to log in the virtual space and performing information transmission and data processing in the logged in virtual space, the terminal device sends corresponding user information to the server, where the user information is used to characterize a task that the terminal device requests the server to process. For example, when the terminal device requests to log in the virtual space, the user information sent to the server is access information including the virtual space identifier; and when the terminal equipment performs information transmission and data processing in the logged-in virtual space, sending an operation instruction comprising the virtual space identifier to a server.
Step S900, the second version serial number is determined in response to receiving user feedback information returned by the server based on the user information.
Specifically, after receiving user information sent by the terminal equipment, the server returns user feedback information based on the user information. The user feedback information is used for reminding the terminal equipment that the user information is successfully sent. Meanwhile, the user feedback information also comprises an updated version sequence number which is used for synchronizing the current state of the corresponding virtual space with the terminal equipment.
And after receiving the user feedback information, the terminal equipment determines a local second version sequence number. The second version serial number corresponds to a virtual space in which the terminal equipment logs in. Therefore, when the user information is a request to log in the virtual space, the second version number of the current local is null. And when the user information is other information such as access information, determining that the current second version sequence number is the version sequence number updated last time.
Further, when the terminal device does not receive the user feedback information within a preset time period after sending the user information, the user information is considered to be failed to send, and the user information is sent to the server again.
And step S1000, updating the second version sequence number according to the first version sequence number in the user feedback information.
Specifically, the terminal device updates the local second version serial number according to the first version serial number sent by the server so as to synchronize the current state of the virtual classroom. In the embodiment of the invention, when the user information sent by the terminal equipment is a request for logging in the virtual space, the current local second version sequence number is null, and the received first version sequence number is directly determined to be the second version sequence number. And when the user information is other information such as access information, the second version sequence number exists in the terminal equipment. The terminal equipment presets a preset value, and further updates the second version sequence number according to the relation between the difference value of the first version sequence number and the local second version sequence number in the user feedback information and the preset value.
In an optional implementation manner of the embodiment of the present invention, a difference value between the first version serial number and the second version serial number is a preset value, and the terminal device directly updates the second version serial number to the first version serial number. The embodiment of the invention is applied to an online education platform, and the server adds one first version serial number to the first version serial number after receiving the user information each time. For the online virtual classroom in which the teacher terminal is logged in, the corresponding first version number in the server is 1, and the second version number stored in the teacher terminal is also 1. Meanwhile, the preset value is 1. When the teacher terminal sends a PPT page turning request comprising a virtual space identifier to a server, the server updates the online virtual classroom corresponding to the virtual space identifier in the PPT page turning request to 2. After updating the first version serial number, the server sends PPT page turning request feedback information comprising the first version serial number with the value of 2 to the teacher terminal. After receiving the feedback information, the teacher terminal calculates the difference value between the first version serial number 2 and the local second version serial number 1 to be a preset value 1, so that the second version serial number is directly updated to be 2.
In another optional implementation manner of the embodiment of the present invention, a difference between the first version sequence number and the second version sequence number is greater than a preset value. When the difference is greater than a preset value, the terminal device judges that the server has missed broadcast information, so that the broadcast information needs to be further synchronized to update the second version serial number. The method for updating the second version sequence number comprises the following steps:
step 1100, sending heartbeat information including the second version sequence number in response to the difference between the first version sequence number and the second version sequence number being greater than a preset value.
Specifically, when the terminal device determines that the difference value between the first version sequence number and the second version sequence number is greater than a preset value, it is determined that the server has missed broadcast information, and heartbeat information including the second version sequence number is sent to the server. To synchronize information in the process of reporting to the server. The embodiment of the invention is applied to an online education platform, and the server adds one first version serial number to the first version serial number after receiving the user information each time. For the online virtual classroom in which the teacher terminal is logged in, the corresponding first version number in the server is 2. Meanwhile, the preset value is 1. When the second version serial number stored in the teacher terminal is 1, a PPT page turning request comprising a virtual space identifier is sent to a server, and the server updates the online virtual classroom corresponding to the virtual space identifier in the PPT page turning request to 3. After updating the first version serial number, the server sends PPT page turning request feedback information comprising the first version serial number with the value of 3 to the teacher terminal. And after receiving the feedback information, the teacher terminal calculates that the difference value between the first version serial number 3 and the local second version serial number 1 is 2 and is larger than a preset value. Therefore, the teacher terminal determines that there is missed broadcast information in the server history, and transmits heartbeat information including the second version number 1 to the server.
Step 1200, receiving heartbeat feedback information returned by the server based on the heartbeat information, where the heartbeat feedback information includes a first version sequence number and at least one corresponding broadcast information.
Specifically, after receiving the heartbeat information, the server analyzes the heartbeat information to obtain a second version serial number corresponding to the terminal equipment. The server determines a virtual space in which the terminal equipment logs in, further determines a first version signal corresponding to the virtual space identifier, and compares the first version signal with a second version sequence number to determine whether missed broadcasting information exists. When the first version sequence number is larger than the second version sequence number, the server judges that missed broadcasting information exists according to unsuccessful updating of the second version sequence number, so that the first version sequence number included in the server is not timely synchronized to the terminal equipment. And further determining the quantity of missed broadcasting information according to the difference value between the first version sequence number and the second version sequence number, acquiring the user information of the missed broadcasting quantity from late to early according to the storage time in the user information stored in the server, and generating corresponding broadcasting information based on each user information. And sending the heartbeat feedback information comprising the broadcasting information and the first version sequence number to the terminal equipment.
Step S1300, storing the broadcast information, and updating the second version sequence number to the first version sequence number.
Specifically, after receiving the heartbeat feedback information, the terminal device stores broadcast information missed by the server included in the heartbeat feedback information, and updates the local second version sequence number to the first version sequence number so as to synchronize the current state of the virtual space. Optionally, the buffer area in the terminal device for storing broadcast information is an area with a preset length. When the buffer space is occupied, the terminal device deletes the historically stored broadcast information from the buffer according to the storage time from long to short when storing the new broadcast information.
Fig. 6 is a schematic diagram of an information synchronization process at a terminal device according to an embodiment of the present invention. As shown in fig. 6, the information synchronization process is that after receiving user feedback information fed back by the server based on the user information, the terminal device calculates a difference 61 between the first version sequence number and the local second version sequence number in the user feedback information 60. An update process 62 of the second version number is further determined by comparing the difference value with a preset value. And when the difference value is equal to a preset value, directly updating the second version sequence number to be the first version sequence number 65. When the difference is greater than the threshold, it is determined that there is missed broadcast information in the server, and the heartbeat information including the second version number is sent to the server 63. The server returns heartbeat feedback information 64 including missed broadcast information and the first version sequence number to the terminal device based on the heartbeat information, and the terminal device stores each broadcast information after receiving the heartbeat feedback information. And simultaneously, updating the second version sequence number to be the first version sequence number 65.
The information transmission method of the embodiment of the invention is based on the virtual space for communication, and a first version sequence number corresponding to the virtual space is introduced in the communication process. The information transmission process is monitored according to the difference between the first version sequence number and the local second version sequence number of the server when the user feedback information is received each time, and the information is prevented from being missed or lost in a mode of synchronizing the heartbeat information under the condition of missed information transmission, so that the reliability of the information transmission process is ensured.
Fig. 7 is a schematic diagram of an electronic device according to an embodiment of the invention. As shown in fig. 7, the electronic device shown in fig. 7 is a general address query device, which includes a general computer hardware structure including at least a processor 70 and a memory 71. The processor 70 and the memory 71 are connected by a bus 72. The memory 71 is adapted to store instructions or programs executable by the processor 70. Processor 70 may be a stand-alone microprocessor or may be a set of one or more microprocessors. Thus, the processor 70, by executing instructions stored in the memory 71, performs the method flows of embodiments of the invention as described above to effect processing of data and control of other devices. The bus 72 connects the above-described components together, and connects the above-described components to a display controller 73 and a display device and an input/output (I/O) device 74. Input/output (I/O) devices 74 may be mice, keyboards, modems, network interfaces, touch input devices, somatosensory input devices, printers, and other devices which are well known in the art. Typically, the input/output devices 74 are connected to the system through input/output (I/O) controllers 75.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, apparatus (device) or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may employ a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations of methods, apparatus (devices) and computer program products according to embodiments of the application. It will be understood that each of the flows in the flowchart may be implemented by computer program instructions.
These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows.
These computer program instructions may also be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows.
Another embodiment of the present invention is directed to a non-volatile storage medium storing a computer readable program for causing a computer to perform some or all of the method embodiments described above.
That is, it will be understood by those skilled in the art that all or part of the steps in implementing the methods of the embodiments described above may be implemented by specifying relevant hardware by a program, where the program is stored in a storage medium, and includes several instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments described herein. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations may be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. An information transmission method, the method comprising:
determining a first version number corresponding to the virtual space identifier;
in response to receiving user information including a virtual space identifier, updating the corresponding first version number;
returning user feedback information comprising the first version sequence number to first terminal equipment for sending the user information;
transmitting broadcast information comprising the first version sequence number to a second terminal device corresponding to the virtual space identifier;
wherein the method further comprises:
receiving heartbeat information comprising a virtual space identifier and a second version sequence number;
responding to the second version sequence number smaller than the first version sequence number corresponding to the virtual space identifier, and determining at least one missed broadcasting message according to the second version sequence number and the first version sequence number;
returning heartbeat feedback information comprising the first version sequence number and each missed broadcast message;
and determining at least one missed broadcast message according to the second version sequence number and the first version sequence number, specifically, determining at least one missed broadcast message according to the difference value between the first version sequence number and the second version sequence number.
2. The method of claim 1, wherein the user information is access information or operation signaling.
3. An information transmission method, the method comprising:
transmitting user information;
determining a second version sequence number in response to receiving user feedback information returned by the server based on the user information;
updating the second version sequence number according to the first version sequence number in the user feedback information
Wherein, updating the second version sequence number according to the first version sequence number in the user feedback information specifically includes:
transmitting heartbeat information including the second version sequence number in response to the difference between the first version sequence number and the second version sequence number being greater than a preset value;
receiving heartbeat feedback information returned by the server based on the heartbeat information, wherein the heartbeat feedback information comprises a first version sequence number and at least one corresponding broadcast information;
storing the broadcast information and updating the second version sequence number to the first version sequence number, wherein the method further comprises:
and transmitting the heartbeat information including the second version sequence number in response to the received broadcast information and the last received broadcast information meeting a preset time condition.
4. A method according to claim 3, characterized in that the method further comprises:
and retransmitting the user information in response to not receiving the user feedback information returned by the server based on the user information.
5. The method of claim 3, wherein updating the second version number according to the first version number in the user feedback information is specifically:
and updating the second version sequence number to be the first version sequence number in response to the difference value between the first version sequence number and the second version sequence number being a preset value.
6. The method of claim 3, wherein the storing the broadcast information comprises:
determining a local broadcast information set, wherein the local broadcast information set comprises a plurality of local broadcast information received in a history mode;
judging whether broadcast information different from each local broadcast information in a local broadcast information set exists in the heartbeat feedback information;
in response to there being broadcast information different from the local broadcast information, the broadcast information is stored as local broadcast information to the local broadcast information set.
7. A computer readable storage medium storing computer program instructions which, when executed by a processor, implement the method of any one of claims 1-6.
8. An electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method of any of claims 1-6.
CN202010917167.XA 2020-09-03 2020-09-03 Information transmission method, readable storage medium, and electronic device Active CN112187868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010917167.XA CN112187868B (en) 2020-09-03 2020-09-03 Information transmission method, readable storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010917167.XA CN112187868B (en) 2020-09-03 2020-09-03 Information transmission method, readable storage medium, and electronic device

Publications (2)

Publication Number Publication Date
CN112187868A CN112187868A (en) 2021-01-05
CN112187868B true CN112187868B (en) 2023-05-02

Family

ID=73924131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010917167.XA Active CN112187868B (en) 2020-09-03 2020-09-03 Information transmission method, readable storage medium, and electronic device

Country Status (1)

Country Link
CN (1) CN112187868B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491356A (en) * 2017-08-28 2017-12-19 广州市百果园信息技术有限公司 Message treatment method, terminal device and server based on sequence number
CN110113256A (en) * 2019-05-14 2019-08-09 北京达佳互联信息技术有限公司 Information interaction method, device, server, user terminal and readable storage medium storing program for executing
CN110290211A (en) * 2019-06-27 2019-09-27 北京大米科技有限公司 The online communication means of more people, electronic equipment and readable storage medium storing program for executing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491356A (en) * 2017-08-28 2017-12-19 广州市百果园信息技术有限公司 Message treatment method, terminal device and server based on sequence number
CN110113256A (en) * 2019-05-14 2019-08-09 北京达佳互联信息技术有限公司 Information interaction method, device, server, user terminal and readable storage medium storing program for executing
CN110290211A (en) * 2019-06-27 2019-09-27 北京大米科技有限公司 The online communication means of more people, electronic equipment and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN112187868A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
US9425973B2 (en) Resource-based synchronization between endpoints in a web-based real time collaboration
CN109788020B (en) Agent distribution method and related equipment
US8990325B2 (en) Real-time and interactive community-based content publishing system
CN110765744A (en) Multi-person collaborative document editing method and system
JP2007534076A (en) System and method for chat load management in a network chat environment
US9609031B1 (en) Propagating state information to network nodes
US9740537B2 (en) Contention and selection of controlling work coordinator in a distributed computing environment
CN112988013B (en) Information interaction method and device and storage medium
CN112039718A (en) Upgrade state detection method, server, device and storage medium
US8161113B2 (en) Rich signaling feedback mechanism for group communication
CN112187868B (en) Information transmission method, readable storage medium, and electronic device
CN113254217A (en) Service message processing method and device and electronic equipment
JP5961471B2 (en) Output comparison method in multiple information systems
CN112040564B (en) Information transmission method, readable storage medium and electronic device
CN112202616B (en) Fault processing method, readable storage medium and electronic device
CN110971669B (en) Message notification method, device, server, electronic equipment and readable storage medium
CN111970340A (en) Information transmission method, readable storage medium and electronic device
CN114979234A (en) Session control sharing method and system in distributed cluster system
TWI720627B (en) Online education resource automatic switching method, system, device, electronic equipment, and storage medium
CN109656535B (en) Voice skill off-line development method based on browser
CN108574622B (en) Instant message processing method and device based on XMPP
CN114189507B (en) Application screen control method and device, electronic equipment and storage medium
CN114257630B (en) Classroom real-time interaction method, system, terminal equipment and readable storage medium
KR20150022972A (en) Method and system for communicating between web pages
JP2011100370A (en) Device, system and method for providing information

Legal Events

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