CN110740045A - Instruction multicast method and system - Google Patents

Instruction multicast method and system Download PDF

Info

Publication number
CN110740045A
CN110740045A CN201911031976.4A CN201911031976A CN110740045A CN 110740045 A CN110740045 A CN 110740045A CN 201911031976 A CN201911031976 A CN 201911031976A CN 110740045 A CN110740045 A CN 110740045A
Authority
CN
China
Prior art keywords
sequence number
instruction
instruction sequence
executed
multicast
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
CN201911031976.4A
Other languages
Chinese (zh)
Other versions
CN110740045B (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.)
Shanghai Ant Chuangjiang Information Technology Co ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN201911031976.4A priority Critical patent/CN110740045B/en
Publication of CN110740045A publication Critical patent/CN110740045A/en
Application granted granted Critical
Publication of CN110740045B publication Critical patent/CN110740045B/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
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The embodiment of the specification discloses a multicast method of instructions and a system thereof, wherein the system comprises a multicast source, a database, a multicast server and a subscription terminal, the multicast source stores a instruction to be multicast into the database, the database generates a instruction serial number corresponding to a instruction to be multicast, and sends an instruction serial number to the multicast server, the multicast server sends a instruction serial number to at least subscription terminals, the subscription terminal compares the instruction serial number received this time with the stored second instruction serial number after receiving the instruction serial number sent by the multicast server, and acquires the instruction to be executed from the database according to the comparison result.

Description

Instruction multicast method and system
[ technical field ] A method for producing a semiconductor device
The present specification relates to the technical field of data transmission, and in particular, to a multicast method of instructions and a system thereof.
[ background of the invention ]
Fig. 1 is a schematic structural diagram of a conventional instruction multicast system, as shown in fig. 1, multicast is single-point-to-multipoint data transmission methods, that is, data senders transmit the same data to multiple receivers, generally, the data senders are called multicast sources, and the data receivers are called subscribers, when the multicast system is used for sending instructions, after the multicast sources generate instructions, the multicast sources send the instructions to the multicast server, and the multicast server sends the instructions to be multicast to multiple subscribers, so that instruction senders send the same instructions to multiple instruction receivers, and the multiple instruction receivers synchronously execute the instructions.
In the related art, when the multicast source sends a plurality of instructions in sequence, the sent instructions may be out of order and lost during the transmission process. The subscribing terminal can not verify whether the received multiple instructions are sequential and complete, and the multicast system is unreliable.
[ summary of the invention ]
The embodiments of the present specification aim to solve of the technical problems in the related art at least at a fixed degree of .
Therefore, th object of the embodiment of this specification is to provide a multicast method of instructions, which is executed at a subscriber terminal to enable the subscriber terminal to actively acquire an instruction to be executed from a database according to the th instruction sequence number received this time and a stored second instruction sequence number, so as to improve reliability of a multicast system.
A second objective of the embodiments of the present specification is to propose kinds of subscription terminals.
A third object of the embodiments of the present specification is to provide a multicast system of instructions.
A fourth object of embodiments of the present specification is to propose non-transitory computer readable storage media.
To achieve the above object, an aspect of the embodiment of the present specification provides a multicast method of instructions, including receiving a instruction sequence number sent by a multicast server, where the instruction sequence number corresponds to a instruction stored in a database, comparing the instruction sequence number received this time with a stored second instruction sequence number, where the second instruction sequence number is a maximum sequence number in executed instructions, determining an instruction sequence number corresponding to the instruction to be executed if the instruction sequence number is greater than the second instruction sequence number, where the instruction sequence number corresponding to the instruction to be executed is greater than the second instruction sequence number and less than or equal to the instruction sequence number, and obtaining the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed.
Compared with the prior art, in the embodiment of the present specification, the instruction to be executed is stored in the database, and the subscription terminal actively acquires the instruction to be executed from the database according to the th instruction serial number received this time and the stored second instruction serial number, so that the reliability of the multicast system is improved.
In addition, the multicast method of data according to the embodiment of the present specification further has the following additional technical features:
optionally, after the obtaining the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed, the method further includes updating the second instruction sequence number to the th instruction sequence number.
Optionally, after the obtaining, according to the instruction sequence number corresponding to the instruction to be executed, the instruction to be executed from the database, the method further includes: and sequentially executing the instructions to be executed according to the instruction sequence numbers corresponding to the instructions to be executed.
Optionally, after comparing the th command sequence number received this time with the saved second command sequence number, the method further includes discarding the th command sequence number if the th command sequence number is less than or equal to the second command sequence number.
The second aspect of the embodiment of the present specification provides types of subscription terminals, including a receiving module, configured to receive a instruction sequence number sent by a multicast server, where the instruction sequence number corresponds to a instruction stored in a database, a comparing module, configured to compare the instruction sequence number received this time with a stored second instruction sequence number, where the second instruction sequence number is a maximum sequence number in executed instructions, a determining module, configured to determine an instruction sequence number corresponding to the instruction to be executed when the instruction sequence number is greater than the second instruction sequence number, where the instruction sequence number corresponding to the instruction to be executed is greater than the second instruction sequence number and less than or equal to the instruction sequence number, and an obtaining module, configured to obtain the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed.
In addition, the subscription terminal in the embodiment of the present specification further has the following additional technical features:
optionally, the apparatus further includes an updating module, configured to update the second instruction sequence number to the th instruction sequence number.
Optionally, the method further comprises: and the execution module is used for sequentially executing the instructions to be executed according to the instruction sequence numbers corresponding to the instructions to be executed.
Optionally, the system further comprises a discarding module, configured to discard the instruction sequence number when the instruction sequence number is less than or equal to the second instruction sequence number.
The third aspect of the embodiment of the present specification provides a multicast system of instructions, including a multicast source, a database, a multicast server, and a subscriber terminal, where the multicast source is configured to store a instruction to be multicast into the database, the database is configured to generate a instruction sequence number corresponding to a 0 th instruction to be multicast and send the instruction sequence number to the multicast server, the multicast server is configured to send the instruction sequence number to at least subscriber terminals, and the subscriber terminal is configured to receive the instruction sequence number sent by the multicast server, compare the second instruction sequence number received this time with a stored second instruction sequence number, where the second instruction sequence number is a maximum sequence number in instructions already executed by the subscriber terminal, determine an instruction sequence number corresponding to the instruction to be executed if the instruction sequence number is greater than the second instruction sequence number, where the instruction corresponding to the instruction to be executed is greater than the second instruction sequence number and the instruction sequence number is less than or equal to the instruction to be executed in the database, and obtain an instruction sequence number corresponding to be executed from the according to the instruction to be executed, where the instruction is greater than the instruction sequence number.
A fourth aspect of the embodiments of the present specification proposes non-transitory computer-readable storage media, on which is stored a computer program, which when executed by a processor implements a multicast method of instructions as described in the foregoing method embodiments.
Additional aspects and advantages of embodiments of the present description will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of embodiments of the present description.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic structural diagram of a conventional multicast system for data;
fig. 2 is a schematic structural diagram of a multicast system of instructions provided in an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a multicast method of instructions according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of another multicast method of instructions according to an embodiment of the present disclosure;
fig. 5 is a flowchart illustrating a multicast method of instructions according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of types of subscribing terminals provided in the embodiment of the present specification;
FIG. 7 is a schematic structural diagram of another types of subscribing terminals provided in the embodiments of the present specification, and
fig. 8 is a schematic structural diagram of another types of subscribing terminals proposed in the embodiment of the present specification.
[ detailed description ] embodiments
Reference will now be made in detail to embodiments of the present specification, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present specification embodiments and should not be construed as limiting the present specification embodiments.
The multicast method of data and the system thereof according to the embodiments of the present specification are described below with reference to the accompanying drawings.
Based on the above description of the prior art, it can be known that, in the related art, when a multicast source sends multiple instructions in sequence, the multiple instructions sent may be out of order and lost during transmission. The subscribing terminal can not verify whether the received multiple instructions are sequential and complete, and the multicast system is unreliable.
To solve the problem, an embodiment of the present specification provides a multicast system with instructions, where instructions to be executed are stored in a database, and a subscriber terminal actively acquires the instructions to be executed from the database according to the instruction serial number received this time and a stored second instruction serial number, so as to improve reliability of the multicast system.
Fig. 2 is a schematic structural diagram of a multicast system of instructions according to an embodiment of the present disclosure, and as shown in fig. 2, the system includes a multicast source, a database, a multicast server, and a subscriber terminal.
The multicast source is used for storing th instructions to be multicast into the database.
The database is used for generating the instruction sequence number corresponding to the th instruction to be multicast and sending the th instruction sequence number to the multicast server.
The multicast server is used for sending the th order sequence number to at least subscribing terminals.
The subscription terminal is used for receiving the th instruction sequence number sent by the multicast server, comparing the th instruction sequence number received this time with the stored second instruction sequence number, wherein the second instruction sequence number is the maximum sequence number in the executed instructions of the subscription terminal, if the th instruction sequence number is greater than the second instruction sequence number, determining the instruction sequence number corresponding to the instruction to be executed, wherein the instruction sequence number corresponding to the instruction to be executed is greater than the second instruction sequence number and less than or equal to the th instruction sequence number, and acquiring the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed.
It should be noted that, in the operation process of the multicast system, the multicast source may perform multiple multicasts, and every time multicasts are performed, the multicast source stores the instruction to be multicasted in the database.
The method comprises the steps that a multicast source continuously performs multicast, namely, instructions to be multicast are continuously stored in a database, the database performs self-numbering on the instructions to be multicast stored every times to generate corresponding instruction serial numbers, then the instruction serial numbers are sent to a multicast server, and the multicast server sends the instruction serial numbers to at least subscription terminals.
It should be understood that, for the multicast system, the multicast source sequentially stores the plurality of instructions in the database, and the subscribing terminal should also sequentially obtain the instructions in the same order and execute the instructions sequentially, so as to prevent the instructions executed by the subscribing terminal from being out of order or missing. It can be understood that the size of the instruction sequence number reflects the order in which the multicast source generates the instructions, and the subscribing terminal can determine the order in which the instructions are acquired and executed through the instruction sequence number.
And executing the command every time the subscriber terminal acquires a new command from the database, wherein the command serial number corresponding to the executed command is increased along with the continuous execution of the command. It will be appreciated that the larger the instruction sequence number, the further back the instruction execution sequence.
If each instruction sequence number sent by the multicast server can be sequentially transmitted to the subscriber terminal from small to large, the subscriber terminal only needs to sequentially obtain the instruction to be executed corresponding to each instruction sequence number from the database according to the time sequence of receiving the instruction sequence numbers.
However, , once the command sequence number sent by the multicast server has a problem in the transmission process, the command sequence number received by the subscriber terminal is out of order or lost, the subscriber terminal cannot directly obtain the to-be-executed command corresponding to each command sequence number from the database in sequence according to the time sequence of receiving the command sequence number, and needs to determine the received command sequence number and adopt different processing modes according to different situations.
For convenience of description, in the embodiments of the present specification, the instruction sequence number received by the subscriber terminal this time is denoted as th instruction sequence number, and the maximum sequence number in the executed instructions is denoted as the second instruction sequence number.
After receiving the th instruction sequence number sent by the multicast server, the subscribing terminal compares the th instruction sequence number received this time with the stored second instruction sequence number, and the comparison result has the following possible situations.
, it may be that the command sequence number is greater than the second command sequence number, and the difference between the command sequence number and the second command sequence number is , which indicates that the command sequence number received by the subscriber terminal this time is adjacent to the maximum sequence number in the executed commands, and the multicast system is not out of order or missing.
For such a possible situation, the command to be executed is the th command, the corresponding command serial number is the th command serial number, and the subscriber terminal only needs to obtain the th command from the database.
The second possible situation is that the th command sequence number is greater than the second command sequence number, and the difference between the th command sequence number and the second command sequence number is greater than , which indicates that the command sequence number received by the subscriber terminal this time and the maximum sequence number in the executed commands are separated by a certain value, and the multicast system is out of order or missing.
Based on the foregoing description, it can be known that, each time the subscriber terminal receives the instruction sequence number sent by the multicast server, the subscriber terminal obtains the instruction to be executed from the database through the instruction sequence number and stores the maximum sequence number in the executed instruction.
It can be understood that, when the database generates the command sequence numbers corresponding to the commands, the database is implemented by a self-numbering mode, so that the difference value between the command sequence numbers corresponding to two adjacent commands is , after the subscription terminal receives the th command sequence number, the subscription terminal compares the th command sequence number with the second command sequence number to determine the missing receiving times and the command sequence number corresponding to the missing command, the command sequence number corresponding to the command to be executed is a plurality of command sequence numbers which are greater than the second command sequence number and less than or equal to the th command sequence number, that is, the command sequence number corresponding to the missing command and the th command sequence number received this time, and then according to the command sequence number corresponding to the command to be executed, a plurality of commands to be executed including the th command are obtained from the database, and according to the command sequence numbers corresponding to the plurality of commands to be executed, the commands to be executed are executed in a sequence from small to large.
For example, the second instruction number stored by the subscriber terminal is 20, and the th instruction number received from the multicast server this time is 25, so that the subscriber terminal may determine that the instruction number corresponding to the instruction in the multicast this time is 25, and the instructions corresponding to the instruction numbers 21, 22, 23, and 24 are missing, that is, the subscriber terminal does not receive the instruction numbers 21, 22, 23, and 24 in the previous multicast.
It should be noted that, an interval occurs between the instruction sequence numbers received by the subscribing terminal, which may be caused by the multicast system omitting a certain instruction sequence number in the previous multicast process, or may be caused by the multicast system occurring out of order. For example, the multicast instruction sequence numbers 1, 2, and 3 of the multicast system are out of order, which results in that the instruction sequence numbers received by the subscribing terminal are 1, 3, and 2, and then when the subscribing terminal receives the instruction sequence number 3, it is considered that the instruction sequence number 2 is omitted, and the instructions corresponding to the instruction sequence numbers 2 and 3 are directly obtained from the server.
In the two possible cases, after the subscribing terminal acquires the instruction to be executed and finishes executing the instruction to be executed, the instruction executed by the subscribing terminal has already been increased, and the maximum sequence number in the executed instruction also needs to be updated, so that the sequence number of the second instruction stored on the subscribing terminal needs to be updated to the sequence number of the th instruction.
The third possible situation is that the th instruction sequence number is less than or equal to the second instruction sequence number, which indicates that the instruction corresponding to the instruction sequence number received by the subscriber terminal this time is an executed instruction, and the multicast system is out of order.
In this case, the subscriber terminal may directly discard the -th command sequence number received this time.
Or, taking the example that the multicast command numbers 1, 2, and 3 of the multicast system are out of order, when the subscriber terminal obtains the commands corresponding to the command numbers 2 and 3 from the server and executes them, the second command number is updated to 3. The subscribing terminal receives the instruction sequence number 2 again, and then directly discards the instruction sequence number.
To sum up, the multicast system of data provided in this specification includes a multicast source, a database, a multicast server, and a subscription terminal, where the multicast source stores a th instruction to be multicast into the database, the database generates a 0 th instruction sequence number corresponding to a th instruction to be multicast, and sends a th instruction sequence number to the multicast server, and the multicast server sends a th instruction sequence number to at least subscription terminals, after receiving a th instruction sequence number sent by the multicast server, the subscription terminal compares a th instruction sequence number received this time with a stored second instruction sequence number, if the th instruction sequence number is greater than the second instruction sequence number, determines an instruction sequence number corresponding to an instruction to be executed, where the instruction sequence number corresponding to the instruction to be executed is greater than the second instruction sequence number and less than or equal to a instruction sequence number, and obtains the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed, thereby achieving that the instruction to be executed is stored in the database, the instruction to be executed is received by the subscription terminal, and the reliability of the multicast server is improved according to the instruction sequence number stored in the command to be executed, which is received by the subscription terminal .
In order to implement the foregoing embodiment, an embodiment of the present specification further provides a multicast method of instructions, where the method is executed at a subscriber terminal, and fig. 3 is a flowchart of the multicast method of instructions provided in the embodiment of the present specification, as shown in fig. 3, the method includes:
in step S101, the th command number transmitted by the multicast server is received.
Wherein the th instruction sequence number corresponds to the th instruction stored in the database.
Based on the foregoing description of the multicast system with commands, it can be known that, in the multicast method provided in this embodiment of the present disclosure, a command to be multicast is first stored in a database by a multicast source, the database generates a command serial number corresponding to the th command to be multicast, and then sends the command serial number to a multicast server.
The multicast server sends the th instruction sequence number to at least subscribing terminals in the multicast system, so that the subscribing terminals can obtain the instruction to be executed from the database according to the th instruction sequence number, wherein the instruction to be executed at least comprises the th instruction to be multicast this time, and may also comprise the missed multicast instructions before.
In step S102, the th instruction sequence number received this time is compared with the stored second instruction sequence number.
The second instruction sequence number is the maximum sequence number in the executed instructions.
Based on the foregoing description of the multicast system of commands, it can be known that the subscriber terminal records the maximum sequence number in the executed commands as the second command sequence number, stores the maximum sequence number, and records the command sequence number received this time as the th command sequence number, according to the th command sequence number, the command to be multicast this time can be obtained from the database, and by comparing the th command sequence number with the second command sequence number, it can be known whether there are missed multicast commands before, and can obtain the missed multicast commands before from the database.
In step S103, if the th instruction sequence number is greater than the second instruction sequence number, the instruction sequence number corresponding to the instruction to be executed is determined.
The instruction sequence number corresponding to the instruction to be executed is greater than the second instruction sequence number and is less than or equal to the th instruction sequence number.
It should be noted that, in order to avoid disorder or omission of the multicast system, the subscribing terminal needs to compare the th instruction sequence number with the second instruction sequence number.
Based on the foregoing description, it is known that the command number corresponding to the command of the previous multicast is smaller than the command number corresponding to the command of the subsequent multicast, and if the th command number is smaller than or equal to the second command number, it is described that the th command corresponding to the th command number sent by the current multicast server is a command already executed by the subscriber terminal, that is, the subscriber terminal has already obtained the th command and all the commands multicast before the th command, and it is only necessary to discard the th command number without obtaining the corresponding command again from the database.
When the th instruction serial number is greater than the second instruction serial number, it is described that the th instruction serial number sent by the multicast server this time is a new instruction serial number, and the subscriber terminal does not acquire a corresponding instruction, and needs to acquire an instruction to be executed from the database.
At this time, the instruction sequence number corresponding to the instruction to be executed includes the th instruction sequence number, and may also include the instruction sequence number corresponding to the multicast instruction missed before.
And step S104, acquiring the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed.
It can be understood that when the instruction sequence number is a self-increment sequence number, if the numerical value of the instruction sequence number is adjacent to the numerical value of the second instruction sequence number, it indicates that there is no missing multicast instruction, the instruction to be executed is the th instruction of the current multicast, and if there is an interval between the instruction sequence number and the second instruction sequence number in the numerical value, it indicates that the multicast server has disorder or omission in the previous multicast process, and the instruction to be executed is the previously missing multicast instruction and the th instruction of the current multicast.
Based on the foregoing description, it can be seen that in this embodiment of the present description, the subscribing terminal records the instruction sequence number received this time as the th instruction sequence number, and records the instruction sequence number received last times as the second instruction sequence number, therefore, after the subscribing terminal acquires the instruction to be executed from the database, the whole process of this multicast is completed, i.e., the th instruction sequence number received this time can be used as the new second instruction sequence number, and in the next multicast process, after receiving the new th instruction sequence number sent by the multicast server, the new th instruction sequence number is compared.
In addition, when the number of the instructions to be executed is multiple, since an increasing manner is adopted when the database generates the instruction sequence numbers in the embodiment of the present specification, and the sequence of the instruction sequence numbers reflects the order of instruction generation and execution, after the multiple instructions to be executed are obtained from the database, the method further includes executing the instructions to be executed in sequence according to the instruction sequence numbers corresponding to the instructions to be executed.
Based on the foregoing description of the multicast system with commands, it can be known that although the subscriber terminal can only obtain the th command sequence number in the current multicast, the subscriber terminal can determine the command sequence number corresponding to the missed multicast command before according to the comparison result between the th command sequence number and the second command sequence number, and further obtain the missed multicast command before and the th command to be multicast at this time from the database.
It should be noted that the foregoing explanation on the embodiment of the instruction multicast system is also applicable to the instruction multicast method in this embodiment, and details are not described here.
To sum up, the method for multicasting the instruction provided in the embodiment of the present specification executes at a subscription terminal, receives a th instruction sequence number sent by a multicast server, where the th instruction sequence number corresponds to a th instruction stored in a database, compares a th instruction sequence number received this time with a stored second instruction sequence number, where the second instruction sequence number is a maximum sequence number in executed instructions, and determines an instruction sequence number corresponding to an instruction to be executed if the th instruction sequence number is greater than the second instruction sequence number.
, the multicast method of the instruction provided by this specification can be used for application program upgrade, that is, the multicast source is an application developer, the database is a storage system of application upgrade instructions, after the application developer completes the application upgrade instruction, the application upgrade instruction is stored in the instruction storage system, and the application upgrade message is sent to each terminals that have installed the application program through the multicast server, where the terminal is a subscription terminal in the multicast system, and the application upgrade message is the latest version number of the application.
It should be noted that, in this embodiment of the present description, the application version number corresponds to the application upgrade instruction, that is, application upgrade instructions are used between two adjacent application version numbers to implement application upgrade, and every intermediate application upgrade instructions need to be sequentially executed between two application version numbers with an interval to implement application upgrade.
In order to use the instructed multicast method for application program upgrade, another data multicast method is provided in the present specification, and the method is executed by a subscriber terminal, and fig. 4 is a flowchart illustrating the another data multicast method provided in the present specification, as shown in fig. 4, the method is executed at the subscriber terminal, and the method includes:
in step S201, the th application version number transmitted by the multicast server is received.
Wherein the th application version number corresponds to the th application upgrade instructions stored in the storage system.
It can be understood that, when the multicast method of the instruction provided in the embodiment of the present disclosure is used for upgrading an application program, the th instruction sequence number is the th application version number, the second instruction sequence number is the second application version number, and the instruction to be executed is an application upgrade instruction to be executed.
It can be understood that the application upgrade instruction is used to upgrade the application programs with the upper application version numbers to the application programs with the lower application version numbers, so that each application version numbers may correspond to application upgrade instructions.
Step S202, comparing the th application version number received this time with the stored second application version number.
And the second application version number is the maximum application version number in the executed application upgrading instruction.
In step S203, if the th application version number is greater than the second application version number, the application version number corresponding to the application upgrade instruction to be executed is determined.
And the application version number corresponding to the application upgrading instruction to be executed is greater than the second application version number and is less than or equal to the th application version number.
And step S204, acquiring the application upgrading instruction to be executed from the storage system according to the application version number corresponding to the application upgrading instruction to be executed.
Step S205, sequentially execute the application upgrade instructions to be executed according to the application version numbers corresponding to the application upgrade instructions to be executed.
It can be understood that in the embodiment of the present specification, the application upgrade needs to be implemented between two corresponding adjacent application version numbers by the application upgrade instruction. Therefore, when the application program is upgraded, application upgrade instructions corresponding to adjacent version numbers need to be sequentially executed.
For example, the application version number sent by the multicast source is V1.2.5.3, that is, the latest application version number is V1.2.5.3, and the application version number stored on the subscribing terminal is V1.2.4.9. V1.2.4.9 and V1.2.5.3 are separated by three version numbers of V1.2.5.0, V1.2.5.1 and V1.2.5.2, that is, V1.2.4.9 → V1.2.5.0, V1.2.5.0 → V1.2.5.1 and V1.2.5.2 → V1.2.5.3, which need to be implemented sequentially. Therefore, after receiving the application version number V1.2.5.3, the subscriber terminal generates application version numbers V1.2.5.0, V1.2.5.1, and V1.2.5.3 corresponding to the application upgrade instruction to be executed according to the application version number V1.2.4.9, and acquires the application upgrade instruction to be executed from the storage system. And executing the application upgrading instructions corresponding to the application version numbers V1.2.5.0, V1.2.5.1 and V1.2.5.3 in the descending order, so that the application program on the subscriber terminal can be upgraded from the version V1.2.4.9 to the version V1.2.5.3.
Therefore, the multicast method of the instruction is used for application program upgrading.
In addition, based on similar inventive concepts, in order to enable a subscriber terminal to actively obtain an instruction to be executed from a server in time, instead of passively receiving an th instruction sequence number sent by a multicast server, an embodiment of the present specification further provides a multicast method of another instructions, which is executed at the subscriber terminal, and fig. 5 is a flowchart of the multicast method of another instructions provided by the embodiment of the present specification, as shown in fig. 5, the method includes:
step S301, periodically querying the database to obtain a third command serial number.
And the third instruction sequence number is the instruction sequence number with the largest value in the instructions stored into the database by the multicast source.
That is, the subscriber terminal queries the database every time intervals, and checks the instruction sequence number corresponding to the instruction newly stored in the database.
Step S302, comparing the third instruction sequence number with the second instruction sequence number.
Step S303, according to the comparison result, obtaining the instruction to be executed from the database.
And the subscription terminal can determine whether the subscription terminal has received the latest instruction to be executed according to the third instruction sequence number obtained by inquiry and the stored second instruction sequence number.
And if the third instruction serial number is greater than the second instruction serial number, generating an instruction serial number corresponding to the instruction to be executed, and acquiring the instruction to be executed from the database.
If the third instruction sequence number is equal to the second instruction sequence number, the third instruction sequence number is discarded.
It should be particularly noted that steps S301 to S303 provided in the present embodiment do not conflict with the method steps in the foregoing embodiments, and may be used in combination.
That is to say, while passively receiving the th instruction sequence number sent by the multicast server, the subscriber terminal may also actively query the database at regular time, and timely obtain the instruction to be executed.
Therefore, the timely updating of the instruction to be executed is realized, and even if the multicast server fails, the multicast system can still normally operate.
In order to implement the foregoing embodiment, an kinds of subscribing terminals are also proposed in the embodiment of the present specification, fig. 6 is a schematic structural diagram of kinds of subscribing terminals provided in the embodiment of the present specification, and as shown in fig. 6, the subscribing terminal includes a receiving module 410, a comparing module 420, a determining module 430, and an obtaining module 440.
A receiving module 410, configured to receive the th instruction sequence number sent by the multicast server.
Wherein the th instruction sequence number corresponds to the th instruction stored in the database.
The comparing module 420 is configured to compare the th instruction sequence number received this time with the stored second instruction sequence number.
The second instruction sequence number is the maximum sequence number in the executed instructions.
The determining module 430 is configured to determine, when the th instruction sequence number is greater than the second instruction sequence number, an instruction sequence number corresponding to an instruction to be executed.
The instruction sequence number corresponding to the instruction to be executed is greater than the second instruction sequence number and is less than or equal to the th instruction sequence number.
The obtaining module 440 is configured to obtain the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed.
, in order to update the second command sequence number stored in the subscribing terminal, possible implementation manner is that the subscribing terminal further includes an updating module 450, configured to update the second command sequence number to the command sequence number.
, in order to enable the subscribing terminal to execute the plurality of instructions to be executed sequentially, possible implementations include that the subscribing terminal further includes an execution module 460, configured to execute the instructions to be executed sequentially according to the instruction sequence numbers corresponding to the instructions to be executed.
, in order to avoid the repeated execution of executed commands by the subscribing terminal, possible implementations include a discarding module 470 for discarding the command sequence number when the command sequence number is less than or equal to the second command sequence number.
It should be noted that the foregoing explanation on the embodiment of the multicast method according to the instruction is also applicable to the subscriber terminal according to the embodiment, and details are not described here again.
To sum up, when the subscription terminal executes the multicast method of the instruction, the subscription terminal receives a th instruction sequence number sent by the multicast server, where the th instruction sequence number corresponds to a th instruction stored in the database, compares a th instruction sequence number received this time with a stored second instruction sequence number, where the second instruction sequence number is the largest sequence number in the executed instruction, and if the th instruction sequence number is greater than the second instruction sequence number, determines an instruction sequence number corresponding to the instruction to be executed, where the instruction sequence number corresponding to the instruction to be executed is greater than the second instruction sequence number and is less than or equal to the th instruction sequence number.
In order to implement the foregoing embodiment, another types of subscription terminals are further proposed in the embodiment of the present specification, and fig. 7 is a schematic structural diagram of another types of subscription terminals proposed in the embodiment of the present specification, as shown in fig. 7, the subscription terminal includes a receiving module 510, a comparing module 520, a determining module 530, an obtaining module 540, and an executing module 550.
A receiving module 510, configured to receive the th application version number sent by the multicast server.
Wherein the th application version number corresponds to the th application upgrade instructions stored in the storage system.
A comparing module 520, configured to compare the th application version number received this time with the stored second application version number.
And the second application version number is the maximum application version number in the executed application upgrading instruction.
The determining module 530 is configured to determine, when the th application version number is greater than the second application version number, an application version number corresponding to the application upgrade instruction to be executed.
And the application version number corresponding to the application upgrading instruction to be executed is greater than the second application version number and is less than or equal to the th application version number.
The obtaining module 540 is configured to obtain the application upgrade instruction to be executed from the storage system according to the application version number corresponding to the application upgrade instruction to be executed.
The execution module 550 is configured to sequentially execute the application upgrade instructions to be executed according to the application version numbers corresponding to the application upgrade instructions to be executed.
It should be noted that the foregoing explanation on the embodiment of the multicast method according to the instruction is also applicable to the subscriber terminal according to the embodiment, and details are not described here again.
Therefore, the multicast method of the instruction is used for application program upgrading.
In order to implement the foregoing embodiments, another kinds of subscription terminals are further proposed in the embodiments of this specification, and fig. 8 is a schematic structural diagram of another kinds of subscription terminals proposed in the embodiments of this specification, as shown in fig. 8, the subscription terminal includes a query module 610, a comparison module 620, and an acquisition module 630.
And the query module 610 is configured to query the database regularly to obtain the third instruction sequence number.
And the third instruction sequence number is the instruction sequence number with the largest value in the instructions stored into the database by the multicast source.
And a comparing module 620, configured to compare the third instruction sequence number with the second instruction sequence number.
An obtaining module 630, configured to obtain, according to the comparison result, the instruction to be executed from the database.
It should be noted that the foregoing explanation on the embodiment of the multicast method according to the instruction is also applicable to the subscriber terminal according to the embodiment, and details are not described here again.
Therefore, the timely updating of the instructions to be executed is realized, and even if the multicast server fails, the multicast system can still normally operate.
In order to implement the foregoing embodiments, the present specification further provides computer apparatuses, including a memory and a processor, where the memory stores a computer program executable by the processor, and when the processor executes the computer program, the multicast method executing the instructions according to the foregoing method embodiments.
To implement the above embodiments, the embodiments also propose non-transitory computer-readable storage media having stored thereon a computer program which, when executed by a processor, implements a multicast method of instructions as described in the aforementioned method embodiments.
Thus, a feature defined as "", "second" may or may not include at least of that feature.
In the embodiments of the present specification, unless otherwise specifically stated or limited, the terms "mounted," "connected," "fixed," and the like shall be used to mean, for example, either fixedly connected, detachably connected, or integrally formed, mechanically connected, electrically connected, directly connected, indirectly connected through an intermediate, interconnected between two elements, or in any other relationship between two elements, unless otherwise specifically stated or limited.
In embodiments herein, unless expressly stated or limited otherwise, the term "over" or "under" a feature refers to either the fact that the feature directly contacts the second feature or the fact that the feature indirectly contacts the second feature through intervening media, further, the fact that the feature is "over", "above" and "above" the second feature means that the feature is directly above or obliquely above the second feature, or merely means that the feature is at a higher level than the second feature, the fact that the feature is "under", "below" and "beneath" the second feature means that the feature is directly below or obliquely below the second feature, or merely means that the feature is at a lower level than the second feature.
In the description herein, reference to the terms " embodiments," " embodiments," "examples," "specific examples," or " examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least embodiments or examples of the embodiments herein.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1, , the method being performed at a subscriber terminal, the method comprising:
receiving th instruction sequence numbers sent by a multicast server, wherein the th instruction sequence numbers correspond to th instructions stored in a database;
comparing the th instruction sequence number received this time with a stored second instruction sequence number, wherein the second instruction sequence number is the maximum sequence number in executed instructions;
if the th instruction sequence number is larger than the second instruction sequence number, determining an instruction sequence number corresponding to the instruction to be executed, wherein the instruction sequence number corresponding to the instruction to be executed is larger than the second instruction sequence number and is smaller than or equal to the th instruction sequence number, and
and acquiring the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed.
2. The method according to claim 1, wherein after the obtaining the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed, the method further comprises:
and updating the second instruction sequence number to the th instruction sequence number.
3. The method as claimed in claim 1, wherein after the obtaining the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed, the method further comprises:
and sequentially executing the instructions to be executed according to the instruction sequence numbers corresponding to the instructions to be executed.
4. The method of any of claims 1-3, wherein after the comparing the instruction sequence number received this time with the saved second instruction sequence number, further comprising:
discarding the instruction sequence number if the instruction sequence number is less than or equal to the second instruction sequence number.
5, kinds of subscribing terminals, comprising:
the receiving module is used for receiving th instruction sequence numbers sent by the multicast server, wherein the th instruction sequence numbers correspond to th instructions stored in a database;
the comparison module is used for comparing the th instruction serial number received this time with a stored second instruction serial number, wherein the second instruction serial number is the maximum serial number in executed instructions;
a determining module, configured to determine, when the th instruction sequence number is greater than the second instruction sequence number, an instruction sequence number corresponding to the instruction to be executed, where the instruction sequence number corresponding to the instruction to be executed is greater than the second instruction sequence number and is less than or equal to the th instruction sequence number, and
and the acquisition module is used for acquiring the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed.
6. The subscribing terminal of claim 5, further comprising:
and the updating module is used for updating the second instruction sequence number to the th instruction sequence number.
7. The subscribing terminal of claim 5, further comprising:
and the execution module is used for sequentially executing the instructions to be executed according to the instruction sequence numbers corresponding to the instructions to be executed.
8. The subscribing terminal of any of claims 5-7, further comprising:
a discard module for discarding the instruction sequence number when the instruction sequence number is less than or equal to the second instruction sequence number.
9, , comprising a multicast source, a database, a multicast server, and a subscriber terminal, wherein,
the multicast source is used for storing th instructions to be multicast into the database;
the database is used for generating a instruction sequence number corresponding to the th instruction to be multicast and sending the th instruction sequence number to the multicast server;
the multicast server is used for sending the th order sequence number to at least subscribing terminals, and
the subscription terminal is used for receiving the th instruction sequence number sent by the multicast server, comparing the th instruction sequence number received this time with a stored second instruction sequence number, wherein the second instruction sequence number is the largest sequence number in the instructions executed by the subscription terminal, if the th instruction sequence number is larger than the second instruction sequence number, determining an instruction sequence number corresponding to the instruction to be executed, wherein the instruction sequence number corresponding to the instruction to be executed is larger than the second instruction sequence number and smaller than or equal to the instruction sequence number, and acquiring the instruction to be executed from the database according to the instruction sequence number corresponding to the instruction to be executed.
A non-transitory computer readable storage medium, 10, , having stored thereon a computer program which, when executed by a processor, implements a multicast method of instructions as claimed in any of claims 1-4, .
CN201911031976.4A 2019-10-28 2019-10-28 Instruction multicast method and system Active CN110740045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911031976.4A CN110740045B (en) 2019-10-28 2019-10-28 Instruction multicast method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911031976.4A CN110740045B (en) 2019-10-28 2019-10-28 Instruction multicast method and system

Publications (2)

Publication Number Publication Date
CN110740045A true CN110740045A (en) 2020-01-31
CN110740045B CN110740045B (en) 2021-04-16

Family

ID=69271757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911031976.4A Active CN110740045B (en) 2019-10-28 2019-10-28 Instruction multicast method and system

Country Status (1)

Country Link
CN (1) CN110740045B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483497A (en) * 2008-12-15 2009-07-15 华亚微电子(上海)有限公司 Data transmission system, receiving terminal and data packet recovery method thereof
CN102123036B (en) * 2011-01-06 2013-10-09 河南科技大学 Method for synchronously processing data in distributed application processing system
US20140297774A1 (en) * 2013-03-29 2014-10-02 Bala Sridhar Munupalle System for managing configuration updates in cluster of computational devices
WO2016011607A1 (en) * 2014-07-23 2016-01-28 华为技术有限公司 Terminal upgrade method and related device
CN107733665A (en) * 2017-08-31 2018-02-23 成都市斯达鑫辉视讯科技有限公司 A kind of method of intelligent broadcast
CN108206989A (en) * 2016-12-16 2018-06-26 北京易方通达科技有限公司 A kind of multicast control instruction confirms feedback method
CN109558092A (en) * 2018-12-17 2019-04-02 杭州普创电子有限公司 A kind of chip interior flash storage method and device
CN109586932A (en) * 2018-10-18 2019-04-05 招商证券股份有限公司 Method of multicasting and terminal device
CN109714326A (en) * 2018-12-21 2019-05-03 北京明朝万达科技股份有限公司 A kind of application layer data sequence group packet method, apparatus, equipment and storage medium
CN110022534A (en) * 2019-03-28 2019-07-16 山东省计算中心(国家超级计算济南中心) A kind of data transmission method and device based on multicast
CN110351122A (en) * 2019-06-17 2019-10-18 腾讯科技(深圳)有限公司 Disaster recovery method, device, system and electronic equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483497A (en) * 2008-12-15 2009-07-15 华亚微电子(上海)有限公司 Data transmission system, receiving terminal and data packet recovery method thereof
CN102123036B (en) * 2011-01-06 2013-10-09 河南科技大学 Method for synchronously processing data in distributed application processing system
US20140297774A1 (en) * 2013-03-29 2014-10-02 Bala Sridhar Munupalle System for managing configuration updates in cluster of computational devices
WO2016011607A1 (en) * 2014-07-23 2016-01-28 华为技术有限公司 Terminal upgrade method and related device
CN105993147A (en) * 2014-07-23 2016-10-05 华为技术有限公司 Terminal upgrade method and related device
CN108206989A (en) * 2016-12-16 2018-06-26 北京易方通达科技有限公司 A kind of multicast control instruction confirms feedback method
CN107733665A (en) * 2017-08-31 2018-02-23 成都市斯达鑫辉视讯科技有限公司 A kind of method of intelligent broadcast
CN109586932A (en) * 2018-10-18 2019-04-05 招商证券股份有限公司 Method of multicasting and terminal device
CN109558092A (en) * 2018-12-17 2019-04-02 杭州普创电子有限公司 A kind of chip interior flash storage method and device
CN109714326A (en) * 2018-12-21 2019-05-03 北京明朝万达科技股份有限公司 A kind of application layer data sequence group packet method, apparatus, equipment and storage medium
CN110022534A (en) * 2019-03-28 2019-07-16 山东省计算中心(国家超级计算济南中心) A kind of data transmission method and device based on multicast
CN110351122A (en) * 2019-06-17 2019-10-18 腾讯科技(深圳)有限公司 Disaster recovery method, device, system and electronic equipment

Also Published As

Publication number Publication date
CN110740045B (en) 2021-04-16

Similar Documents

Publication Publication Date Title
CN111327402B (en) Method, device and system for retransmitting data
US10103940B2 (en) Local network and method of updating a device in a local network
CN111273963B (en) Application program configuration information generation method and device, computer equipment and medium
CN110958150B (en) Management method and device for dynamic service configuration
KR102225815B1 (en) Managing data feeds
EP3876500B1 (en) Subscription message processing method and apparatus, and computer device and storage medium
CN110740045B (en) Instruction multicast method and system
CN111224756B (en) Method and device for determining data transmission abnormity, storage medium and electronic equipment
EP2416526A1 (en) Task switching method, server node and cluster system
CN110798349B (en) Configuration distribution and receiving method, equipment and computer readable storage medium
CN112152825B (en) Multi-stage module upgrading method and device for household appliance and electronic equipment
CN113419437B (en) Intelligent home data synchronization method and device based on MVVM (multifunction vehicle management model) framework and MQTT (message queuing time) protocol
CN115729961A (en) Data query method, device, equipment and computer readable storage medium
CN112954133B (en) Method, device, electronic device and storage medium for synchronizing node time
CN113064658B (en) Copying method, copying device, copying equipment and computer readable storage medium for configuration data
CN109309848B (en) Bullet screen distribution method, device, equipment and storage medium based on retry mechanism
CN109548020B (en) Compensation method and device after authentication failure, server and storage medium
CN113515056A (en) Function execution method and intelligent household appliance
US20070268057A1 (en) Methods and apparatus for applying changes to a group of objects
JP2011135281A (en) Software updating method of radio terminal, and wireless network
CN110704208A (en) Message processing method for multiple systems, server and storage medium
CN111240698A (en) Model deployment method and device, storage medium and electronic equipment
CN111309467A (en) Task distribution method and device, electronic equipment and storage medium
CN112910665B (en) Intelligent security information sending method, server, intelligent control equipment and computer readable storage medium
US20110271271A1 (en) Systems and methods for interrupting upgrades of content distribution systems

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240226

Address after: Room 1408, No. 447 Nanquan North Road, Pudong New Area Free Trade Pilot Zone, Shanghai, 200120

Patentee after: Shanghai Ant Chuangjiang Information Technology Co.,Ltd.

Guo jiahuodiqu after: Zhong Guo

Address before: 801-11, Section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province 310007

Patentee before: Alipay (Hangzhou) Information Technology Co.,Ltd.

Guo jiahuodiqu before: Zhong Guo