CN112187868A - 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
CN112187868A
CN112187868A CN202010917167.XA CN202010917167A CN112187868A CN 112187868 A CN112187868 A CN 112187868A CN 202010917167 A CN202010917167 A CN 202010917167A CN 112187868 A CN112187868 A CN 112187868A
Authority
CN
China
Prior art keywords
information
version
serial number
virtual space
version serial
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.)
Granted
Application number
CN202010917167.XA
Other languages
Chinese (zh)
Other versions
CN112187868B (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. And returning user feedback information comprising the updated first version serial number to the first terminal equipment for sending the user information, and simultaneously sending broadcast information comprising the updated first version serial number to the second terminal equipment corresponding to the virtual space identifier. The embodiment of the invention introduces the first version serial number corresponding to the virtual space in the communication process, monitors the information transmission process in a mode of updating the first version serial number when receiving information every time, avoids the condition of information missing or losing and ensures the reliability of the information transmission process.

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 on line through a network, and the speed, efficiency and quality of the information transmission process are improved. However, in the prior art, when information is transmitted between two devices, communication information is lost when the data communication process is interfered by factors such as disconnection, packet loss, jamming, time delay, and the like.
Disclosure of Invention
In view of this, embodiments of the present invention provide an information transmission method, a readable storage medium, and an electronic device, which are used to avoid information loss during 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 a corresponding first version serial number;
returning user feedback information including the first version serial number to first terminal equipment which sends the user information;
and sending broadcast information including the first version serial number to a second terminal device corresponding to the virtual space identifier.
Further, the method further comprises:
receiving heartbeat information comprising a virtual space identifier and a second version serial number;
in response to that the second version serial number is smaller than the first version serial number corresponding to the virtual space identifier, determining at least one missed broadcast message according to the second version serial number and the first version serial number;
and returning heartbeat feedback information comprising the first version serial number and each missed broadcast 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:
sending user information;
in response to receiving user feedback information returned by the server based on the user information, determining a second version number;
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 in response to not receiving user feedback information returned by the server based on the user information, retransmitting the user information.
Further, the updating the second version number according to the first version number in the user feedback information specifically includes:
and in response to the difference value between the first version serial number and the second version serial number being a preset value, updating the second version serial number to the first version serial number.
Further, the updating the second version number according to the first version number in the user feedback information specifically includes:
responding to the difference value between the first version serial number and the second version serial number being larger than a preset value, and sending heartbeat information including the second version serial number;
receiving heartbeat feedback information returned by the server based on the heartbeat information, wherein the heartbeat feedback information comprises a first version serial number and at least one corresponding broadcast message;
and storing the broadcast information, and updating the second version sequence number into 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 pieces of historically received local broadcast information;
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 that is different from local broadcast information, storing the broadcast information as local broadcast information to the set of local broadcast information.
In a third aspect, the present invention provides a computer-readable storage medium for storing computer program instructions, which when executed by a processor implement the method according to 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 and second aspects.
According to the embodiment of the invention, the corresponding first version serial number is updated when the user information comprising the 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 serial number to the first terminal equipment for sending the user information, and simultaneously sending broadcast information comprising the updated first version serial number to the second terminal equipment corresponding to the virtual space identifier. The embodiment of the invention introduces the first version serial number corresponding to the virtual space in the communication process, monitors the information transmission process in a mode of updating the first version serial number when receiving information every time, avoids the condition of information missing or losing and ensures the reliability of the information transmission process.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of the 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 an information transmission method at a server according to an embodiment of the present invention;
FIG. 4 is a data flow diagram illustrating an information synchronization process at a server according to an embodiment of the present invention;
fig. 5 is a flowchart of an information transmission method of 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 will be 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. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
Unless the context clearly requires otherwise, throughout the description, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
In the description of the present invention, it is to 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. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
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, 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 the corresponding first version number according to the user information. And then, returning the user feedback information including the first version serial number to the first terminal device 11, and sending the broadcast information including the first version serial number to the corresponding at least one second terminal device 12.
The embodiment of the invention can be applied to any information transmission system for information transmission between the terminal equipment and the server. Application scenarios such as social software, live software, and online education websites. In the embodiment of the present invention, the first terminal device 11 and the second terminal device 12 may be general data processing terminals capable of running computer programs and having a communication function, for example, a smart phone or a tablet computer. The server 10 may be a single server or a cluster of servers configured in a distributed manner.
The information transmission method is used for explaining an application scene of an online education platform. 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 that logs in the same virtual classroom as the first terminal device 11. When entering a virtual classroom and performing actions such as displaying courseware, controlling page turning of the PPT, submitting homework, and the like, the student user and the teacher user need to send corresponding user information to the server 10. The server 10 maintains the first version number corresponding to each virtual classroom, and updates the corresponding first version number according to the virtual classroom corresponding to the user information when receiving 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 as the first terminal device 11 by feeding back the user feedback message and pushing the broadcast information, respectively.
For example, when the teacher terminal initiates a PPT page turning action command, the first terminal device 11 in the information transmission system is the teacher terminal, and the second terminal device 12 is the student terminal. The teacher terminal sends a page turning action instruction to the server 10, and the server 10 updates the first version number of the virtual classroom in which the teacher terminal is located after receiving the page turning action instruction. And returning a page turning action instruction feedback message including the first version number to the teacher terminal 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 the page turn information to the student terminal. And displaying the PPT after page turning 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 following steps:
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 terminal device according to a preset virtual space creation rule, where the virtual space is a specific space in which a plurality of terminal devices can log, and the virtual space may be, for example, 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 the like. And each virtual space generates a corresponding first version serial number when the virtual space is successfully created, and the first version serial number is used for representing the corresponding virtual space state. 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 serial number. Meanwhile, the server can synchronize the final state of the virtual space to each terminal device logged in the virtual space by sending the updated first version number. In the embodiment of the present invention, the correspondence between the virtual space and the first version serial number may be stored by maintaining a key-value pair table in the server, that is, storing the virtual space identifier and the corresponding first version serial number in a key-value pair manner, where the virtual space identifier is used to represent the corresponding virtual space. Optionally, when each virtual space is created by the server, the initial value of the correspondingly generated first version number is 0. And adding one to the current first version serial number when the server receives an information transmission request or a data processing request corresponding to one virtual space.
The embodiment of the invention is applied to an online education platform as an example for explanation. The server of the online education platform can establish a corresponding online virtual classroom according to a classroom establishing request sent by a teacher terminal or preset classroom configuration information, and establish a corresponding first version serial number while establishing 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 S200, in response to receiving the user information including the virtual space identifier, updating the corresponding first version serial number.
Specifically, the terminal device sends corresponding user information to the server in the processes of requesting to log in the virtual space, and performing information transmission and data processing in the logged-in virtual space, where the user information is used to represent 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 including virtual space identification. 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, and the like. And when the terminal equipment performs information transmission and data processing in the logged virtual space, sending an operation instruction comprising a 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 language forbidden 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 meanwhile, the server determines a corresponding first version serial number according to the virtual space identifier in the user information, and updates the first version serial number according to a preset version serial number updating rule. In the embodiment of the present invention, the version number update rule may be that, each time user information is received, one is added to the current first version number to obtain an updated first version number.
The embodiment of the invention is applied to an online education platform as an example for explanation. For an online virtual classroom in which a user terminal is not logged in, the corresponding first version serial number is 0. And when the teacher terminal sends the access information comprising the virtual space identification to the server, the server adds the teacher terminal into an online virtual classroom corresponding to the virtual space identification. Meanwhile, the server 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.
Step S300, returning user feedback information including the first version serial number to the first terminal equipment which sends the user information.
Specifically, each of the virtual spaces in the server may log in at least one terminal device. And in the terminal equipment logged in each virtual space, the terminal equipment which sends the user information to the server is the first terminal equipment, and the terminal equipment which does not send the user information to the server is the second terminal equipment. Namely, a first terminal device and a second terminal device logged in each virtual space need to be dynamically determined, when a server receives user information corresponding to the virtual space, the terminal device sending the user information is determined to be the first terminal device corresponding to the virtual space, and the terminal devices logged in the virtual space except the first terminal device are the second terminal devices.
In the embodiment of the invention, after the server receives the user information and determines the first terminal equipment for sending the user information, the server returns the 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 serial number, and the updated first version serial number is used for synchronously corresponding to the current state of the virtual space with the first terminal equipment.
The embodiment of the invention is applied to an online education platform as an example for explanation. For an online virtual classroom in which a user terminal is not logged in, the corresponding first version serial number is 0. When the teacher terminal sends access information including 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 serial number to 1. After updating the first version number, the server sends access success information including the first version number having a value of 1 to the teacher terminal. And after receiving the successful access information, the teacher terminal judges that the corresponding online virtual classroom has been added, and stores the first version serial number 1 serving as a second version serial number to the local.
Step S400, sending the broadcast information including the first version serial number to a second terminal device corresponding to the virtual space identifier.
Specifically, step S400 may be performed simultaneously with step S300 in this embodiment of the present invention, that is, after updating the first version number, the server may simultaneously send user feedback information and broadcast information including the first version number to the first terminal device and the second terminal device, respectively. The broadcast information is used for notifying the second terminal device of details of the current state change of the corresponding virtual space, and the first version number is used for synchronizing the current state of the corresponding virtual space with the second terminal device.
The embodiment of the invention is applied to an online education platform as an example for explanation. For an online virtual classroom in which a teacher terminal is logged, the corresponding first version number is 1. When the student terminal sends access information including a virtual space identifier to the server, the server adds the student terminal to 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 sends access success information including the first version number with a value of 2 to the student terminal, and simultaneously sends the student terminal including the first version number with a value of 2 to the teacher terminal to join in the broadcast. And after receiving the successful access information, the student terminal judges that the student terminal has joined the corresponding online virtual classroom, and stores the first version serial number 2 serving 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 joins. And meanwhile, updating the local second version sequence number value to be 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 according to the user information. After receiving the user information, the server 31 determines a virtual space corresponding to the virtual space identifier included in the user information. Further, the corresponding first version number and the second terminal device 32 registered in the virtual space are determined according to the corresponding virtual space. And meanwhile, updating the first version serial number.
S32: and sending the user feedback information including the updated first version serial number to the first terminal device 30.
S33: the broadcast information including the updated first version number is sent to the second terminal device 32.
In the process of information transmission, information is sometimes missed due to network failure and the like. For example, in the embodiment of the present invention, the server may miss broadcast information or user feedback information. Therefore, in order to avoid the information missing situation, the information transmission method according to the embodiment of the present invention may further include the following steps:
and step S500, receiving heartbeat information comprising the virtual space identification and the second version serial number.
Specifically, the terminal device logged in the virtual space sends heartbeat information to the server at regular time. 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 meanwhile, whether the communication link is disconnected or not is judged according to 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 side, the terminal equipment logged in the virtual space sends the local second version number and the logged virtual space identifier to the server together with the heartbeat information.
Further, in order to improve the efficiency of the heartbeat information transmission process, the embodiment of the invention can also send the heartbeat information including the virtual space identifier and the second version serial number to the server under the preset condition. For example, when the terminal device does not receive new broadcast information within a preset time after receiving the broadcast information last time, the terminal device may send the heartbeat information carrying the virtual space identifier and the second version number to the server together through the heartbeat information sent to the server at regular time.
Step S600, in response to that the second version serial number is smaller than the first version serial number corresponding to the virtual space identifier, determining at least one missed broadcast message according to the second version serial number and the first version serial 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 device. And determining a corresponding first version signal according to the virtual space identifier, and comparing the first version signal with the second version serial number to judge whether missed broadcast information exists. And when the first version serial number is the same as the second version serial number, the server successfully updates and judges that no broadcast information which is missed to send exists according to the second version serial number. And when the first version serial number is greater than the second version serial number, the server judges that the broadcast information which is missed to be sent exists according to the unsuccessful updating of the second version serial number, so that the included first version serial number is not synchronized to the terminal equipment in time.
After the server creates the virtual space and receives the user information sent by the terminal equipment logged in the virtual space, the server stores the user information according to the time sequence of the received user information. Therefore, when the server determines that the first version number is greater than the second version number, the server may determine the amount of missed broadcast information according to a difference between the first version number and the second version number. And acquiring the user information of the missed sending quantity from the stored user information according to the storage time from the late to the early, and generating corresponding broadcast information based on each user information.
And S700, returning heartbeat feedback information comprising the first version serial number and each missed broadcast information.
Specifically, after receiving heartbeat information sent by the terminal device each time, the server feeds back heartbeat feedback information to the terminal device to notify the terminal device that the heartbeat information is received. Meanwhile, when the server finds that missed broadcast information exists after comparing the first version serial number with the second version serial number, the missed broadcast information and the first version serial number are sent to the terminal equipment together with heartbeat feedback information. And the terminal equipment updates a local second version serial number according to the first version serial number and simultaneously stores each piece of broadcast information.
Fig. 4 is a data flow chart of an information synchronization process at a server 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 device 41, wherein the heartbeat information includes the virtual space identifier logged in by the terminal device 41 and the corresponding second version number.
S41: and when determining that the second version serial number is smaller than the first version serial number corresponding to the virtual space identifier, the server 40 determines at least one missed broadcast message according to the second version serial number and the first version serial number.
S42: after determining the missed broadcast information, the server 40 sends the missed broadcast information and the first version number to the terminal device 41 together with the heartbeat feedback information.
The information transmission method of the embodiment of the invention carries out communication based on the virtual space, and introduces the first version serial number corresponding to the virtual space in the communication process. The information transmission process is monitored by updating the first version serial number when information is received every time, and the first version serial number is synchronized with the terminal equipment logged in the virtual space after information transmission every time, so that the condition of information missing or loss is avoided, and the reliability of the information transmission process is ensured.
Fig. 5 is a flowchart of an information transmission method of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the information transmission method of the terminal device includes the following steps:
and step S800, sending the user information.
Specifically, the terminal device sends corresponding user information to the server in the processes of requesting to log in the virtual space, and performing information transmission and data processing in the logged-in virtual space, where the user information is used to represent 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 a virtual space identifier; and when the terminal equipment performs information transmission and data processing in the logged virtual space, sending an operation instruction comprising a virtual space identifier to a server.
And step S900, responding to the received user feedback information returned by the server based on the user information, and determining a second version serial number.
Specifically, after receiving user information sent by the terminal device, 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. And meanwhile, the user feedback information also comprises an updated version serial number which is used for synchronously corresponding to the current state of the virtual space with the terminal equipment.
And after receiving the user feedback information, the terminal equipment determines a local second version serial number. The second version number corresponds to a virtual space in which the terminal device logs in. Therefore, when the user information is a request for logging in the virtual space, the current local second version number is null. And when the user information is other information such as access information, determining that the current second version serial number is the version serial number updated last time.
Further, when the terminal device does not receive the user feedback information within a preset time after sending the user information, the terminal device considers that the user information is failed to be sent, and sends the user information to the server again.
And S1000, updating the second version serial number according to the first version serial number in the user feedback information.
Specifically, the terminal device updates the local second version number according to the first version number sent by the server so as to synchronize the current state of the virtual classroom. In the embodiment of the present invention, when the user information sent by the terminal device is a request to log in a virtual space, the current local second version number is null, and the received first version number is directly determined to be the second version number. And when the user information is other information such as access information, a second version serial number exists in the terminal equipment. And the terminal equipment presets a preset value, and further updates the second version serial number according to the relation between the difference value between the first version serial number and the local second version serial number in the user feedback information and the preset value.
In an optional implementation manner of the embodiment of the present invention, a difference between the first version number and the second version number is a preset value, and the terminal device directly updates the second version number to the first version number. The embodiment of the invention is applied to an online education platform, and the server adds one to the first version serial number after receiving the user information every time. For the online virtual classroom where 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 including a virtual space identifier to the server, the server updates an online virtual classroom corresponding to the virtual space identifier in the PPT page turning request and updates the first version serial number to 2. And 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. And after receiving the feedback information, the teacher terminal calculates that the difference value between the first version serial number 2 and the local second version serial number 1 is a preset value 1, so that the second version serial number is directly updated to 2.
In another optional implementation manner of the embodiment of the present invention, a difference between the first version number and the second version number is greater than a preset value. And when the difference value is greater than the preset value, the terminal equipment judges that the server has broadcast information which is missed to send, so that the broadcast information needs to be further synchronized to update the second version serial number. The method for updating the second version number comprises the following steps:
step S1100, responding to the difference value between the first version serial number and the second version serial number being larger than a preset value, and sending heartbeat information including the second version serial number.
Specifically, when the terminal device determines that the difference value between the first version serial number and the second version serial number is greater than the preset value, it is determined that broadcast information which is missed to be sent exists in the server, and the heartbeat information including the second version serial number is sent to the server. So as to carry out information synchronization 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 to the first version serial number after receiving the user information every time. For the online virtual classroom where the teacher terminal is logged in, the corresponding first version number in the server is 2. Meanwhile, the preset value is 1. And when the second version serial number stored in the teacher terminal is 1 and a PPT page turning request comprising a virtual space identifier is sent to the server, the server updates the online virtual classroom corresponding to the virtual space identifier in the PPT page turning request and updates the first version serial number to 3. And 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 greater than a preset value. Therefore, the teacher terminal determines that there is broadcast information missed by the server history, and transmits heartbeat information including the second version number 1 to the server.
Step S1200, receiving heartbeat feedback information returned by the server based on the heartbeat information, wherein the heartbeat feedback information comprises a first version serial number and at least one corresponding broadcast message.
Specifically, after receiving the heartbeat information, the server analyzes the heartbeat information to obtain a second version serial number corresponding to the terminal device. And the server determines the virtual space logged in by the terminal equipment so as to further determine a first version signal corresponding to the virtual space identifier, and compares the first version signal with a second version serial number to judge whether missed broadcast information exists. And when the first version serial number is greater than the second version serial number, the server judges that the broadcast information which is missed to be sent exists according to the unsuccessful updating of the second version serial number, so that the included first version serial number is not synchronized to the terminal equipment in time. And further determining the quantity of missed broadcast information according to the difference value between the first version serial number and the second version serial number, acquiring the user information of the missed broadcast quantity from the late to the early according to the storage time in the user information stored in the server, and generating corresponding broadcast information based on each user information. And sending the heartbeat feedback information comprising each broadcast information and the first version serial number to terminal equipment.
Step 1300, storing the broadcast information, and updating the second version number to the first version 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 serial number to the first version serial number so as to synchronize the current state of the virtual space. Optionally, the buffer area for storing the broadcast information in the terminal device is an area with a preset length. And when the space of the buffer area is completely occupied, deleting the historically stored broadcast information from the buffer area according to the storage time from long to short when the terminal equipment stores 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, in the information synchronization process, after receiving user feedback information fed back by the server based on the user information 60, the terminal device calculates a difference 61 between a first version number and a local second version number in the user feedback information. And determining an update process 62 for the second version number by comparing the difference with a preset value. When the difference is equal to a preset value, the second version number is directly updated to the first version number 65. And when the difference is greater than the threshold value, judging that the server has broadcast information which is missed to send, and sending the heartbeat information comprising the second version serial number to the server 63. The server returns heartbeat feedback information 64 comprising missed broadcast information and a first version serial number to the terminal equipment based on the heartbeat information, and the terminal equipment stores the broadcast information after receiving the heartbeat feedback information. At the same time, the second version number is updated to the first version number 65.
The information transmission method of the embodiment of the invention carries out communication based on the virtual space, and introduces the first version serial number corresponding to the virtual space in the communication process. The information transmission process is monitored according to the difference between the first version serial number and the local second version serial number of the server when user feedback information is received every time, and the condition of information missing or loss is avoided in a mode of carrying out information synchronization through heartbeat information under the condition of information missing, 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, which includes 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 collection of one or more microprocessors. Thus, the processor 70 implements the processing of data and the control of other devices by executing instructions stored by the memory 71 to perform the method flows of embodiments of the present invention as described above. The bus 72 connects the above components together, as well as 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 a mouse, keyboard, modem, network interface, touch input device, motion sensing input device, printer, and other devices known in the art. Typically, the input/output devices 74 are connected to the system through input/output (I/O) controllers 75.
As will be appreciated by one skilled in the art, 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 flow in the flow diagrams can 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 invention is directed to a non-transitory storage medium storing a computer-readable program for causing a computer to perform some or all of the above-described method embodiments.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be accomplished by specifying the relevant hardware through a program, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An information transmission method, characterized in that the method comprises:
determining a first version number corresponding to the virtual space identifier;
in response to receiving user information including a virtual space identifier, updating a corresponding first version serial number;
returning user feedback information including the first version serial number to first terminal equipment which sends the user information;
and sending broadcast information including the first version serial number to a second terminal device corresponding to the virtual space identifier.
2. The method of claim 1, further comprising:
receiving heartbeat information comprising a virtual space identifier and a second version serial number;
in response to that the second version serial number is smaller than the first version serial number corresponding to the virtual space identifier, determining at least one missed broadcast message according to the second version serial number and the first version serial number;
and returning heartbeat feedback information comprising the first version serial number and each missed broadcast information.
3. The method of claim 1, wherein the user information is access information or operation signaling.
4. An information transmission method, characterized in that the method comprises:
sending user information;
in response to receiving user feedback information returned by the server based on the user information, determining a second version number;
and updating the second version sequence number according to the first version sequence number in the user feedback information.
5. The method of claim 4, further comprising:
and in response to not receiving user feedback information returned by the server based on the user information, retransmitting the user information.
6. The method according to claim 4, wherein the updating the second version number according to the first version number in the user feedback information specifically comprises:
and in response to the difference value between the first version serial number and the second version serial number being a preset value, updating the second version serial number to the first version serial number.
7. The method according to claim 4, wherein the updating the second version number according to the first version number in the user feedback information specifically comprises:
responding to the difference value between the first version serial number and the second version serial number being larger than a preset value, and sending heartbeat information including the second version serial number;
receiving heartbeat feedback information returned by the server based on the heartbeat information, wherein the heartbeat feedback information comprises a first version serial number and at least one corresponding broadcast message;
and storing the broadcast information, and updating the second version sequence number into the first version sequence number.
8. The method of claim 7, wherein the storing the broadcast information comprises:
determining a local broadcast information set, wherein the local broadcast information set comprises a plurality of pieces of historically received local broadcast information;
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 that is different from local broadcast information, storing the broadcast information as local broadcast information to the set of local broadcast information.
9. A computer readable storage medium storing computer program instructions, which when executed by a processor implement the method of any one of claims 1-8.
10. 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-8.
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 true CN112187868A (en) 2021-01-05
CN112187868B 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
CN112187868B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN110765744A (en) Multi-person collaborative document editing method and system
CN108390933B (en) Message distribution method, device, server and storage medium
CN110391974A (en) A kind of message synchronization method, server-side, terminal and system
CN104301140A (en) Service request responding method, device and system
CN112039718A (en) Upgrade state detection method, server, device and storage medium
CN108156024B (en) Method, system and storage medium for detecting availability based on distributed website
CN112838980B (en) Message processing method, system, device, electronic equipment and storage medium
CN113254217A (en) Service message processing method and device and electronic equipment
CN112187868B (en) Information transmission method, readable storage medium, and electronic device
CN112040564B (en) Information transmission method, readable storage medium and electronic device
CN108574622B (en) Instant message processing method and device based on XMPP
CN104702612A (en) User authentication processing method and 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
US20160196242A1 (en) Method and system for communicating between client pages
CN116137094A (en) Bluetooth device management method and device, storage medium and terminal device
CN112202616B (en) Fault processing method, readable storage medium and electronic device
CN113645129A (en) Data processing method and data processing device for instant messaging client
CN106453573A (en) Method and system for processing CGI request in HTTP server
CN112566221A (en) Information synchronization method, device, equipment and readable storage medium
CN107342942B (en) Information transmission method and device for multi-node controller cluster
CN114221922A (en) Message processing method and device, electronic equipment and readable storage medium
CN113905279B (en) Live broadcasting classroom wheat connecting state visualization method and system
CN117732046A (en) Game state synchronization method, device, equipment and storage medium

Legal Events

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