Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiment of the present application, there is provided a software updating method, optionally, as an optional implementation manner, as shown in fig. 1, the software updating method includes:
s102, a virtual machine receives a first update instruction, wherein the first update instruction is used for indicating to update first software of the virtual machine into first target software, the first software is used for collecting images of the virtual machine and sending the images to terminal equipment, and the terminal equipment is used for receiving the images and decoding the images by using second software;
s104, updating the first software into first target software;
s106, after updating the first software into the first target software, sending a second updating instruction to the terminal equipment, wherein the second updating instruction is used for indicating the terminal equipment to update the second software into the second target software;
s108, sending the second storage address of the installation package of the second target software to the terminal equipment, so that the terminal equipment updates the second software into the second target software based on the installation package of the second target software.
Alternatively, the software update method described above may be applied in a teleoffice scenario. In a remote office scene, the virtual machine is connected through the terminal equipment, so that the first software of the virtual machine can be automatically updated, and after the first software is updated, the second software of the terminal equipment is updated, thereby improving the software updating efficiency.
Optionally, the first software and the first target software are different versions of the same software, and the second software and the second target software are different versions of the same software. The first software refers to the software at the S end, namely the software at the transmitting end, and the second software refers to the software at the R end, namely the software at the receiving end.
As an alternative example, updating the first software to the first target software includes:
prompting a first message when the state of the virtual machine is an operation state, wherein the first message is used for prompting the first software to be updated, setting the virtual machine to be in a shutdown state when a shutdown instruction is received, and updating the first software to be first target software; or,
and updating the first software to the first target software when the state of the virtual machine is the shutdown state.
Optionally, the updating action is performed when the virtual machine is in a shutdown state. If the virtual machine is in the running state, the virtual machine is powered off or the virtual machine is more to be powered off, and then software is updated.
As an alternative example, updating the first software to the first target software includes:
and using the installation of the first target software to cover the installation file of the first software, and installing the first target software.
Alternatively, the updating of the present embodiment may use an overlay manner. And if the first target software moves to the position where the first software is located, covering the first software. The first software is deleted after the overlay and no more storage space is occupied.
As an alternative example, updating the first software to the first target software includes:
acquiring a first storage address of first target software;
and downloading an installation package of the first target software from the first storage address to update the first software to the first target software.
Alternatively, in this embodiment, the first software is updated to the first target software, and the first storage address of the first target software may be acquired, and then the first target software is downloaded from the first storage address.
As an alternative example, sending the second storage address of the second target software to the terminal device includes:
displaying a second message on the terminal device, wherein the second message is used for prompting the second software to be updated, and the method comprises the following steps: version number and release time of the second target software;
and sending the second storage address of the second target software to the terminal equipment under the condition that the confirmation updating instruction is received.
Optionally, after the first software update is completed, a second message is displayed on the terminal device, prompting the second software of the terminal device to be updated. And if the confirmation instruction is received, the second storage address of the second target software is sent to the terminal equipment, and the terminal equipment downloads the second target software from the second storage address.
As an alternative example, displaying the second message on the terminal device includes:
and displaying the version number and release time of the second target software on the terminal equipment. The version of the second target software can be checked through the version number and the release time, so that whether the second target software is upgraded or not is determined.
As an optional example, before the virtual machine receives the first update instruction, the method further includes:
under the condition that the first target software and the second target software are updated, a software update record table of the virtual machine and the terminal equipment is obtained, wherein the software update record table is recorded with an identifier of each virtual machine, an update state of each virtual machine and an update state of each terminal equipment;
if the update state of any one virtual machine is not updated, a first update instruction is sent to the non-updated virtual machine;
after the update of the un-updated virtual machine is completed, modifying the update state of the updated virtual machine in the software update record table;
and after the updating of any one of the terminal devices is completed, modifying the updating state of the updated terminal device in the software updating record table.
In this embodiment, the update state is recorded by the update record table, so that accuracy of the update states of the software of the virtual machine and the terminal device can be ensured.
The following is described in connection with one example.
The system architecture of the present embodiment is shown in fig. 2. In fig. 2, a software update management platform is set in the cluster server, and is used for storing the latest software update files (S-side software update file and/or R-side software update file), and also used for monitoring the state of the virtual machine, so as to update the virtual machine at an appropriate time. The first software in the virtual machine is S-terminal software, and the second software in the terminal equipment is R-terminal software.
Setting a specific storage area in the software update management platform for an administrator to write in a new software version number and a software update file; in this embodiment, two storage areas may be set, one for storing the version number and the update file of the latest version of the S-side software, and the other for storing the version number and the update file of the latest version of the R-side software.
In specific implementation, an administrator can log in the software update management platform, modify the version number of the latest version of the software and upload the corresponding software update file.
After the manager uploads the software version successfully, the software update management platform can detect that the current software version is updated, and then the software update is performed according to the following flow:
step 101, when the software update management platform detects that the software version of the S end and the software version of the R end are updated, a software update record table is generated;
the software update record table is used for recording the identification information of each virtual machine in the current cluster server, the update state of S-terminal software in the virtual machine and the update state of R-terminal software in the terminal equipment corresponding to the current virtual machine. When the software update record table is initially generated, the update states of all S-side software and R-side software are uniformly set as 'not updated', if the software update is completed, the update is modified into 'updated version number, and the updated version number is recorded, if the update is in the process of updating, the update is recorded into' updating, and meanwhile, the version number which is being updated is recorded.
In the process of performing software update processing, on one hand, the software of the S-terminal needs to be updated, and on the other hand, the software of the R-terminal needs to be updated. The specific implementation is as follows:
step 102, the software update management platform queries the S-terminal software update state of each virtual machine in the software update record table according to a preset period, if the S-terminal software update state is not updated, the step 103 is shifted to, and if the S-terminal software update state is updated, no processing is performed on the current virtual machine.
Step 103, when determining that the S-terminal software updating state in the current virtual machine is "not updated", firstly detecting whether the working state of the current virtual machine is an "operating state" or a "shutdown state"; if the running state is the running state, the software is not updated; and if the virtual machine is in the power-off state, updating the S-terminal software in the current virtual machine.
Specifically, if the virtual machine is in the "running state", it indicates that the user is currently using the virtual machine, and in this case, if the update is directly performed, the user cannot use the virtual machine normally, and the user data may be lost. Therefore, the S-side software in the virtual machine needs to be updated in the shutdown state.
Preferably, if in the running state, a prompting frame is added in the desktop image through the virtual machine in the process of sending the desktop image to the user, so that the user is prompted that new S-terminal software can be updated currently, and the user is inquired whether the user updates the desktop image immediately or automatically after the user is powered off; if the user selects to update immediately, updating the S-terminal software in the current virtual machine; if the user selects to automatically update after the power-off, the software is updated after the user is powered off.
Specifically, the mode of updating the software at the S end in the virtual machine in the shutdown state is as follows:
the software update management platform sends a storage address of an update file to the virtual machine;
the virtual machine downloads the update file from the storage address, and installs the update file, and the specific installation mode may be overlay installation.
Step 104, after the software update of the S-side in the virtual machine is completed, a notification message of the completion of the update is sent to the software update management platform, and the software update management platform that receives the notification message updates the software update status of the current virtual machine to "updated" in the software update record table.
In an optional implementation manner of this embodiment, the foregoing solution further includes:
step 105, after the S-terminal software update in the virtual machine is completed, the software update management platform also notifies the virtual machine to enter an R-terminal software (refer to R-terminal software in a terminal device corresponding to the current virtual machine) update processing procedure.
Specifically, after entering the processing flow, when the virtual machine initiates a connection request, the virtual machine prompts the user that the current R-terminal software needs to be updated through a login page returned to the terminal equipment, if the terminal equipment cannot be normally used without updating, an inlet for updating is set, and the update request of the current terminal equipment is received through the inlet; when the virtual machine receives an update request sent by the shared terminal equipment, returning a storage address of an R-terminal software update file to the terminal equipment; after receiving the address returned by the virtual machine, the terminal equipment is connected to the address, and an update file of R-terminal software to be updated is obtained from the connection address. And after the update file is downloaded, automatically installing the update file locally in the terminal equipment, and restarting the update file after the installation is completed.
Specifically, the login page returned by the virtual machine to the terminal device can also display the version number and the release time of the current latest software, and provide an entry capable of updating, so that the user can execute the updating operation. For example, an update button may be provided, and when the user clicks on the update button, the terminal device automatically sends a software update request to the virtual machine.
And 106, after the R-terminal software in the terminal equipment is updated, returning an updated notification message to the virtual machine, after receiving the notification message, returning the R-terminal software updating completion message in the terminal equipment to the software updating management platform by the virtual machine, and updating the software updating state of the current terminal equipment to be updated in a local software updating record table by the software updating management platform.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
According to another aspect of the embodiment of the application, a software updating method is also provided. As shown in fig. 3, the method includes:
s302, acquiring first target software and second target software, wherein the first target software is used for acquiring images of a virtual machine and sending the images to terminal equipment, and the terminal equipment is used for receiving the images and decoding the images by using the second target software;
s304, detecting a first version of first software on the virtual machine, and controlling the virtual machine to update the first software to the first target software under the condition that the first version is lower than the version of the first target software;
and S306, detecting a second version of second software on the terminal equipment connected with the virtual machine, and controlling the terminal equipment to update the second software into second target software under the condition that the second version is lower than the version of the second target software.
Please refer to the above examples for other examples of the present embodiment, and the description thereof is omitted herein.
According to another aspect of the embodiment of the application, a software updating method is also provided. As shown in fig. 4, the method includes:
s402, a cluster server acquires first target software and second target software, wherein the first target software is used for acquiring images of a virtual machine and sending the images to terminal equipment, and the terminal equipment is used for receiving the images and decoding the images by using the second target software;
s404, the cluster server detects a first version of first software on the virtual machine, and sends a first update instruction to the virtual machine under the condition that the first version is lower than the version of first target software;
s406, the virtual machine responds to the first updating instruction and updates the first software into first target software;
s408, under the condition that the terminal equipment is connected with the virtual machine, the virtual machine sends a second update instruction to the terminal equipment under the condition that the second version of the second software of the terminal equipment is lower than the version of the second target software;
s410, the virtual machine responds to the second updating instruction to update the second software to the second target software.
Please refer to the above examples for other examples of the present embodiment, and the description thereof is omitted herein.
According to another aspect of the embodiment of the present application, there is also provided a software updating apparatus for implementing the above-mentioned software updating method. As shown in fig. 5, the apparatus includes:
the receiving unit 502 is configured to receive a first update instruction by using the virtual machine, where the first update instruction is configured to instruct to update first software of the virtual machine to first target software, where the first software is configured to collect an image of the virtual machine and send the image to the terminal device, and the terminal device is configured to receive the image and decode the image using second software;
an updating unit 504, configured to update the first software to the first target software;
a first sending unit 506, configured to send a second update instruction to the terminal device after updating the first software to the first target software, where the second update instruction is used to instruct the terminal device to update the second software to the second target software;
and a second sending unit 508, configured to send the second storage address of the installation package of the second target software to the terminal device, so that the terminal device updates the second software to the second target software based on the installation package of the second target software.
Please refer to the above examples for other examples of the present embodiment, and the description thereof is omitted herein.
According to another aspect of the embodiment of the present application, there is also provided a software updating apparatus for implementing the above-mentioned software updating method. As shown in fig. 6, the apparatus includes:
a first obtaining unit 602, configured to obtain first target software and second target software, where the first target software is configured to collect an image of a virtual machine and send the image to a terminal device, and the terminal device is configured to receive the image and decode the image using the second target software;
a first detecting unit 604, configured to detect a first version of first software on the virtual machine, and control the virtual machine to update the first software to the first target software if the first version is lower than the version of the first target software;
and a second detecting unit 606, configured to detect a second version of the second software on the terminal device connected to the virtual machine, and control the terminal device to update the second software to the second target software if the second version is lower than the version of the second target software.
Please refer to the above examples for other examples of the present embodiment, and the description thereof is omitted herein.
According to a further aspect of embodiments of the present application there is also provided an electronic device for implementing the live method described above, the electronic device comprising a memory having stored therein a computer program and a processor arranged to perform the steps of any of the method embodiments described above by the computer program.
According to a further aspect of embodiments of the present application, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method of the various embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and are merely a logical functional division, and there may be other manners of dividing the apparatus in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.