[ 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 this problem, an embodiment of this specification provides an instruction multicast system, where an instruction to be executed is stored in a database, and a subscriber terminal actively obtains the instruction to be executed from the database according to a first instruction sequence number received this time and a stored second instruction sequence number, so as to improve reliability of the multicast system.
Fig. 2 is a schematic structural diagram of an instruction multicast system according to an embodiment of the present disclosure. As shown in fig. 2, the system includes: the system comprises a multicast source, a database, a multicast server and a subscription terminal.
The multicast source is used for storing a first instruction to be multicast into the database.
The database is used for generating a first instruction sequence number corresponding to a first instruction to be multicast and sending the first instruction sequence number to the multicast server.
The multicast server is used for sending the first instruction sequence number to at least one subscription terminal.
The subscription terminal is used for receiving the first instruction serial number sent by the multicast server and comparing the received first instruction serial number with the stored second instruction serial number. And the second instruction sequence number is the maximum sequence number in the instructions executed by the subscriber terminal. And if the first instruction serial number is greater than the second instruction serial number, determining an instruction serial number corresponding to the instruction to be executed. 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 each time a multicast is performed, the multicast source stores the instruction to be multicast in the database.
It can be understood that, since the multicast source is continuously multicasting, the instruction to be multicast is continuously stored in the database. The database carries out self-increasing numbering on the stored instruction to be multicast each time, generates a corresponding instruction serial number, then sends the instruction serial number to the multicast server, and the multicast server sends the instruction serial number to at least one subscription terminal. For example, for a first stored instruction to be multicast, a corresponding instruction sequence number is generated to be 1; for the instruction to be multicast stored for the second time, generating a corresponding instruction serial number of 2; and generating a corresponding instruction serial number of 3 for the instruction to be multicast stored for the third time. And analogizing that the larger the numerical value of the instruction sequence number is, the later the time for storing the corresponding instruction into the database by the multicast source is.
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 instruction sequence number sent by the multicast server has a problem during the transmission process, so that the instruction sequence number received by the subscriber terminal is out of order or lost, the subscriber terminal cannot directly obtain the instruction to be executed corresponding to each instruction sequence number from the database in sequence according to the time sequence of receiving the instruction sequence number, and needs to judge the received instruction sequence number and adopt different processing modes according to different situations.
For convenience of description, in the embodiments of the present specification, the instruction number received by the subscriber terminal this time is referred to as a first instruction number, and the maximum number in the executed instructions is referred to as a second instruction number. It should be noted that, since the subscribing terminal performs the same determination after receiving the instruction sequence number each time, it can be ensured that all executed instructions are executed in the order from small to large, that is, all instruction sequences smaller than the maximum sequence number in the executed instructions are executed on the subscribing terminal.
After receiving the first instruction sequence number sent by the multicast server, the subscriber terminal compares the first instruction sequence number received this time with the stored second instruction sequence number, and the comparison result has the following possible situations.
The first possible situation is that the first instruction sequence number is greater than the second instruction sequence number, and the difference between the first instruction sequence number and the second instruction sequence number is one, which indicates that the instruction sequence number received by the subscriber terminal this time is adjacent to the maximum sequence number in the executed instruction, and the multicast system is not out of order or missing.
For the possible situation, the instruction to be executed is the first instruction, the corresponding instruction sequence number is the first instruction sequence number, and the subscriber terminal only needs to obtain the first instruction from the database.
The second possible situation is that the first instruction sequence number is greater than the second instruction sequence number, and the difference between the first instruction sequence number and the second instruction sequence number is greater than one, which indicates that the instruction sequence number received by the subscriber terminal this time and the maximum sequence number in the executed instruction have an interval between numerical values, and the multicast system has disorder or omission.
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. That is to say, in order to avoid missing the received instruction, after receiving the first instruction sequence number, the subscriber terminal compares the stored second instruction sequence number with the first instruction sequence number, so as to determine whether the data received by the subscriber terminal has missing.
It can be understood that, because the database is implemented in a self-numbering mode when the instruction sequence numbers corresponding to the instructions are generated, the difference value of the instruction sequence numbers corresponding to two adjacent instructions is one. After receiving the first instruction sequence number, the subscription terminal compares the first instruction sequence number with the second instruction sequence number to determine the missing receiving times and the instruction sequence number corresponding to the missing instruction. The instruction sequence numbers corresponding to the instructions to be executed are a plurality of instruction sequence numbers which are larger than the second instruction sequence number and smaller than or equal to the first instruction sequence number, that is, the instruction sequence numbers corresponding to the missed instructions and the first instruction sequence number received this time. And then acquiring a plurality of instructions to be executed including the first instruction from the database according to the instruction sequence numbers corresponding to the instructions to be executed, and executing the instructions to be executed according to the instruction sequence numbers corresponding to the instructions to be executed in the descending order.
For example, the second command number stored in the subscriber terminal is 20, and the first command number received from the multicast server this time is 25. Therefore, the subscriber terminal can determine that the instruction number corresponding to the instruction in the current multicast is 25, and the instruction corresponding to the instruction numbers 21, 22, 23, and 24 is missing, that is, the subscriber terminal does not receive the instruction numbers 21, 22, 23, and 24 in the previous multicast. Therefore, the subscriber terminal needs to receive the data corresponding to the instruction serial number 25 from the database, and also needs to query and receive the instructions corresponding to the instruction serial numbers 21, 22, 23, and 24, where the instructions to be executed include the instructions corresponding to the instruction serial numbers 21, 22, 23, 24, and 25. That is, although the instruction to be multicast this time is the instruction corresponding to the instruction number 25, the subscriber terminal needs to query and receive the instructions corresponding to the instruction numbers 21, 22, 23, 24, and 25 from the server after receiving the instruction number 25. Therefore, the instructions corresponding to the missing instruction sequence numbers 21, 22, 23 and 24 can be acquired by the subscriber terminal.
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 situations, after the subscriber terminal acquires the instruction to be executed and finishes executing the instruction to be executed, the instruction executed by the subscriber terminal has increased, and the maximum sequence number in the executed instruction also needs to be updated, so that the second instruction sequence number stored in the subscriber terminal needs to be updated to the first instruction sequence number.
The third possible situation is that the first 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.
For such a situation, the subscriber terminal may directly discard the first 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 for data provided in the embodiment of the present specification includes: the system comprises a multicast source, a database, a multicast server and a subscription terminal. The multicast source stores a first instruction to be multicast into the database, the database generates a first instruction sequence number corresponding to the first instruction to be multicast, the first instruction sequence number is sent to the multicast server, and the multicast server sends the first instruction sequence number to at least one subscription terminal. After receiving the first instruction serial number sent by the multicast server, the subscription terminal compares the first instruction serial number received this time with the stored second instruction serial number. And if the first instruction serial number is greater than the second instruction serial number, determining an instruction serial number corresponding to the instruction to be executed. And 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 first 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. Therefore, the instructions to be executed are stored in the database, and the subscription terminal actively acquires the instructions to be executed from the database according to the first instruction sequence number received this time and the stored second instruction sequence number, so that the reliability of the multicast system is improved.
In order to implement the foregoing embodiment, an embodiment of the present specification further provides an instruction multicast method, where the method is executed at a subscriber terminal, and fig. 3 is a flowchart of the instruction multicast method provided in the embodiment of the present specification. As shown in fig. 3, the method includes:
step S101, receiving a first command number sent by a multicast server.
The first instruction sequence number corresponds to a first instruction stored in the database.
Based on the foregoing description of the multicast system with instructions, it can be known that, in the multicast method provided in this embodiment of the present description, the instruction to be multicast is first stored in the database by the multicast source, the database generates the first instruction sequence number corresponding to the first instruction to be multicast, and then the first instruction sequence number is sent to the multicast server.
And the multicast server sends the first instruction sequence number to at least one subscription terminal in the multicast system, so that the subscription terminal can acquire the instruction to be executed from the database according to the first instruction sequence number. The instruction to be executed at least comprises a first instruction to be multicast this time, and may also comprise a missed multicast instruction before.
Step S102, comparing the first instruction serial number received this time with the stored second instruction serial 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 seen that the subscriber terminal records the maximum sequence number in the executed commands as the second command sequence number, stores the second command sequence number, and records the command sequence number received this time as the first command sequence number. According to the first instruction sequence number, the instruction to be multicast at this time can be obtained from the database, and the first instruction sequence number is compared with the second instruction sequence number, so that whether the missed multicast instruction exists before can be known, and the missed multicast instruction before can be obtained from the database.
Step S103, if the first instruction sequence number is greater than the second instruction sequence number, determining an instruction sequence number corresponding to the 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 first 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 sizes of the first instruction sequence number and the second instruction sequence number.
Based on the foregoing description, it is known that the instruction sequence number corresponding to the instruction of the previous multicast is smaller than the instruction sequence number corresponding to the instruction of the subsequent multicast, and if the first instruction sequence number is smaller than or equal to the second instruction sequence number, it is described that the first instruction corresponding to the first instruction sequence number sent by the current multicast server is an instruction already executed by the subscriber terminal. That is, the subscriber terminal has already obtained the first instruction and all the instructions multicast before the first instruction, and does not need to obtain the corresponding instructions again from the database, and the first instruction sequence number is discarded.
When the first instruction serial number is greater than the second instruction serial number, it is described that the first 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 first instruction sequence number, and may also include the instruction sequence numbers corresponding to the previously omitted multicast instructions.
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 values of the first instruction sequence number and the second instruction sequence number are adjacent, it is indicated that there are no missing multicast instructions, and the instruction to be executed is the first instruction of this multicast. If the first instruction sequence number and the second instruction sequence number have an interval in the value, it is described that the multicast server has disorder or omission in the previous multicast process, and the instruction to be executed is the previous omitted multicast instruction and the first instruction of the current multicast.
Based on the foregoing description, it can be seen that in this embodiment of the present description, the subscriber terminal records the instruction sequence number received this time as the first instruction sequence number, and records the stored instruction sequence number received last time as the second instruction sequence number. Therefore, after the subscriber terminal obtains the instruction to be executed from the database, the whole multicast flow is completed, and the first instruction sequence number received this time can be used as a new second instruction sequence number. In the next multicast process, after receiving the new first instruction sequence number sent by the multicast server, comparing the new first instruction sequence number with the new first instruction sequence number.
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 instructions, it can be known that, although the subscriber terminal can only obtain the first instruction sequence number in the current multicast, the subscriber terminal can determine the instruction sequence number corresponding to the missed multicast instruction before according to the comparison result between the first instruction sequence number and the second instruction sequence number, and further obtain the missed multicast instruction before and the first instruction to be multicast 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.
In summary, in the multicast method of the instruction provided in the embodiment of the present disclosure, the method is executed at the subscriber terminal, and receives the first instruction sequence number sent by the multicast server. The first instruction sequence number corresponds to a first instruction stored in the database. And comparing the received first instruction sequence number with the stored second instruction sequence number. The second instruction sequence number is the maximum sequence number in the executed instructions. And if the first instruction serial number is greater than the second instruction serial number, determining an instruction serial number corresponding to the 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 first 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. Therefore, the instructions to be executed are stored in the database, and the subscription terminal actively acquires the instructions to be executed from the database according to the first instruction sequence number received this time and the stored second instruction sequence number, so that the reliability of the multicast system is improved.
Further, the multicast method of the instruction provided in the embodiment of the present specification may be used for upgrading an application program, that is, the multicast source is an application developer, the database is a storage system of the application upgrade instruction, after the application developer completes the application upgrade instruction, the application upgrade instruction is stored in the instruction storage system, and an application upgrade message is sent to each terminal that has installed the application program through the multicast server, where the terminal is a subscriber terminal in the multicast system. And the message of the application upgrade is the latest version number of the application.
And after receiving the latest version number of the application, the terminal compares the latest version number with the application version number on the current terminal. It should be noted that, in this embodiment of the present specification, the application version number corresponds to the application upgrade instruction, that is, one application upgrade instruction is used between two adjacent application version numbers to implement application upgrade, and each intermediate application upgrade instruction needs 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, an embodiment of the present specification provides another multicast method for data, which is executed by a subscriber terminal, and fig. 4 is a flowchart of the another multicast method for data provided by the embodiment of the present specification. As shown in fig. 4, the method is executed in a subscriber terminal, and the method includes:
step S201, receiving a first application version number sent by the multicast server.
The first application version number corresponds to a first application upgrading instruction stored in the storage system.
It can be understood that, when the multicast method of instructions provided in this embodiment is used for upgrading an application program, the first instruction sequence number is a first application version number, the second instruction sequence number is a second application version number, and the instruction to be executed is an application upgrade instruction to be executed.
It will be appreciated that the application upgrade instructions function to upgrade an application of a previous application version number to an application of a next application version number, and thus each application version number may correspond to an application upgrade instruction. In order to unify the correspondence relationship, the application upgrade instruction may correspond to an application version number of the application program obtained after the application upgrade instruction is executed.
Step S202, comparing the received first application version number 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.
Step S203, if the first application version number is greater than the second application version number, determining 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 first 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 the similar inventive concept, in order to enable the subscriber terminal to actively obtain the instruction to be executed from the server in time, instead of passively receiving the first instruction sequence number sent by the multicast server. An embodiment of the present specification further provides a multicast method according to another instruction, where the method is executed at a subscriber terminal, and fig. 5 is a flowchart of the multicast method according to another instruction provided in 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 at intervals, and checks the instruction sequence number corresponding to the instruction stored in the database most recently.
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 first instruction sequence number sent by the multicast server, the subscriber terminal may also actively query the database at regular time, and obtain the instruction to be executed in time.
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, the present specification further provides a subscription terminal. Fig. 6 is a schematic structural diagram of a subscribing terminal provided in an embodiment of this specification, and as shown in fig. 6, the subscribing terminal includes: the receiving module 410, the comparing module 420, the determining module 430 and the obtaining module 440.
A receiving module 410, configured to receive a first instruction sequence number sent by the multicast server.
The first instruction sequence number corresponds to a first instruction stored in the database.
The comparing module 420 is configured to compare the received first instruction sequence number 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 an instruction sequence number corresponding to the instruction to be executed when the first instruction sequence number is greater than the second instruction sequence number.
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 first 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.
Further, in order to update the second instruction sequence number stored in the subscriber terminal, a possible implementation manner is that the subscriber terminal further includes: the updating module 450 is configured to update the second instruction sequence number to the first instruction sequence number.
Further, in order to enable the subscriber terminal to sequentially execute a plurality of instructions to be executed, a possible implementation manner is that the subscriber terminal further includes: the execution module 460 is configured to sequentially execute the instructions to be executed according to the instruction sequence numbers corresponding to the instructions to be executed.
Further, in order to avoid the subscriber terminal repeatedly executing the executed instruction, a possible implementation manner is that the subscriber terminal further includes: the discarding module 470 is configured to discard the first instruction sequence number when the first instruction sequence number is less than or equal to the second instruction 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, the subscriber terminal provided in this description receives the first instruction sequence number sent by the multicast server when executing the multicast method of the instruction. The first instruction sequence number corresponds to a first instruction stored in the database. And comparing the received first instruction sequence number with the stored second instruction sequence number. The second instruction sequence number is the maximum sequence number in the executed instructions. And if the first instruction serial number is greater than the second instruction serial number, determining an instruction serial number corresponding to the 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 first 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. Therefore, the instructions to be executed are stored in the database, and the subscription terminal actively acquires the instructions to be executed from the database according to the first instruction sequence number received this time and the stored second instruction sequence number, so that the reliability of the multicast system is improved.
In order to implement the foregoing embodiment, an embodiment of the present specification further provides another subscription terminal, and fig. 7 is a schematic structural diagram of another subscription terminal provided in the embodiment of the present specification. As shown in fig. 7, the subscribing terminal includes: the receiving module 510, the comparing module 520, the determining module 530, the obtaining module 540, and the executing module 550.
A receiving module 510, configured to receive the first application version number sent by the multicast server.
The first application version number corresponds to a first application upgrading instruction stored in the storage system.
The comparing module 520 is configured to compare the received first application version number 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 first 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 first 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 embodiment, an embodiment of the present specification further provides another subscription terminal, and fig. 8 is a schematic structural diagram of the another subscription terminal provided in the embodiment of the present specification. As shown in fig. 8, the subscribing 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 a computer device, including a memory and a processor; the memory having stored thereon a computer program executable by the processor; a multicast method of instructions as described in the preceding method embodiments is performed when the processor runs the computer program.
To implement the above embodiments, embodiments also propose a non-transitory computer-readable storage medium 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.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the embodiments herein, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the embodiments of the present specification, unless otherwise specifically stated or limited, the terms "mounted," "connected," and "fixed" are to be construed broadly, e.g., as meaning fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. Specific meanings of the above terms in the embodiments of the present specification can be understood by those of ordinary skill in the art according to specific situations.
In embodiments of the present specification, unless explicitly stated or limited otherwise, a first feature may be "on" or "under" a second feature in direct contact with the first and second features, or in indirect contact with the first and second features through intervening media. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
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.