Version updating method and device for mobile terminal
By using a Socket connection between the mobile terminal and the PC and an FTP server, automated updates of the mobile terminal version are achieved, solving the problems of cumbersome operation and high consumption of manpower and resources in existing technologies. This technology is suitable for version control of smart devices.
Patent Information
- Application Number
- CN202011469153.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-14
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2040-12-14
AI Technical Summary
In existing technologies, version update operations for mobile terminals during the factory and maintenance phases are cumbersome, require a lot of manpower and resources, and cannot achieve unified version control, especially on terminals without USB interfaces or with small screens.
By establishing a Socket connection between the mobile terminal and the PC, and using an FTP server for version updates, including pre-package version verification, update trigger commands, version download, and interaction of update commands, wireless communication and data transmission are achieved.
It enables automated updates for mobile terminal versions, reducing manpower and material resources consumption, supports version control for terminals without USB interfaces or with small screens, and is suitable for various smart devices.
Smart Images

Figure CN112506546B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the computer field, and in particular to a version updating method and device for a mobile terminal. Background Art
[0002] With the development of the mobile terminal industry, products are becoming more and more simple, miniaturized, secure and centralized. Representative mobile terminal products include: home smart products, such as smart speakers, smart TVs, and smart kitchen appliances; smart wearable products, such as smart watches and heart rate and blood pressure testers; and smart car products: car cameras, car audio, and car control systems.
[0003] The security of smart products runs through the entire product life cycle and is also a requirement for smart products during current use. Security is the lifeline of smart products. One of the main ways to launch security attacks on smart products is to collect data and steal information through the product's Universal Serial Bus (USB) interface. In addition, users can upgrade their own downloaded system versions through USB, making the version uncontrollable.
[0004] After selling smart products, manufacturers will receive complaints from users who suspect that the smart products are refurbished. This is because users can use some software to query the number of times the USB interface has been used to determine the status of the smart product. Smart products frequently use USB interfaces during development, testing, and production. This is also a problem that smart products currently need to solve.
[0005] During the factory stage, smart products need to be burned from the factory version to the shipping version. Traditionally, the version information is manually downloaded to the device through the USB interface, and the upgrade is performed through the version upgrade in the product settings. During the product repair stage, the product is also manually downgraded from the shipping version to the factory version through the USB interface, and then the problem is analyzed. These operations are cumbersome and consume a lot of manpower and material resources. When the product screen is small, the screen cannot be touched, or there is no screen, these operations are not easy to perform.
[0006] In the existing technology, most domestic terminal manufacturers, mobile terminals and other smart devices currently use USB solutions. There are obvious disadvantages in terms of safety in use during the factory stage and maintenance stage, which are mainly reflected in the consumption of USB cables, a large number of PC configurations on the production line, and the inability to control versions. A lot of manpower and material resources are required for production management and after-sales maintenance of versions. The price and cost are very high, and it is also impossible to achieve unified version control for different terminals, and the operability is not strong. Summary of the invention
[0007] An object of the present application is to provide a version update method and device for a mobile terminal, so as to achieve the purpose of updating the version of the mobile terminal.
[0008] According to one aspect of the present application, a version update method of a mobile terminal is provided, which is applied to the mobile terminal, wherein the method includes:
[0009] Establish a Socket connection with the PC;
[0010] If the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, receiving an update trigger instruction sent by the PC;
[0011] Based on the update trigger instruction, a network connection is established with a file transfer protocol FTP server, and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection;
[0012] After the download is completed, a download completion instruction is sent to the PC, so that the PC sends an update instruction to the mobile terminal;
[0013] Receiving the update instruction sent by the PC;
[0014] In response to the update instruction, the version of the mobile terminal is updated according to the version update content.
[0015] Furthermore, in the above-mentioned mobile terminal, a version update method of the mobile terminal, wherein the establishing a Socket connection with the PC terminal comprises:
[0016] Turning on the WiFi switch of the mobile terminal and creating a Socket server; wherein the mobile terminal is placed in a shielding box having a built-in wireless access point;
[0017] Scanning the wireless signal of the built-in wireless access point, and establishing a wireless connection with the scanned built-in wireless access point;
[0018] If the wireless connection is successfully established, an image code for establishing a Socket connection is generated and displayed, wherein the image code includes the identification information of the mobile terminal and the port information of the Socket server, so that the PC terminal scans the image code and initiates a Socket connection request to the mobile terminal;
[0019] Receiving the Socket connection request sent by the PC;
[0020] Based on the Socket connection request, a Socket connection is established with the PC end.
[0021] Furthermore, the above mobile terminal provides a version update method for a mobile terminal, wherein the method further includes:
[0022] If the wireless connection is not successfully established, the wireless signal of the built-in wireless access point is rescanned at a preset time interval until a wireless connection is successfully established with the scanned built-in wireless access point.
[0023] Furthermore, in the version update method of the mobile terminal, if the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, before receiving the update trigger instruction sent by the PC, the method further includes:
[0024] Receiving a preset package version acquisition instruction sent by the PC;
[0025] In response to the preset package version acquisition instruction, the preset package version of the mobile terminal is sent to the PC, so that the PC determines whether the preset package version of the mobile terminal is consistent with the acquired work order target version.
[0026] Furthermore, in the above-mentioned mobile terminal, a version update method of the mobile terminal, wherein the update trigger instruction includes the work order target version and FTP connection parameter information, wherein, based on the update trigger instruction, a network connection is established with a file transfer protocol FTP server, and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection, including:
[0027] In response to the update trigger instruction, establishing a network connection with a file transfer protocol FTP server according to the FTP connection parameter information;
[0028] The version update content corresponding to the work order target version is downloaded from the FTP server through the network connection.
[0029] Further, in a version update method of the mobile terminal, the update instruction includes a first MD5 value of the version content corresponding to the work order target version, wherein the updating of the version of the mobile terminal according to the version update content in response to the update instruction includes: determining a second MD5 value of the version update content corresponding to the downloaded work order target version in response to the update instruction;
[0030] If the first MD5 value is the same as the second MD5 value, the version of the mobile terminal is updated according to the version update content.
[0031] Furthermore, the above mobile terminal provides a version update method for a mobile terminal, wherein the method further includes:
[0032] Receiving a download progress acquisition instruction sent by the PC;
[0033] In response to the download progress acquisition instruction, download progress information when downloading the version update content corresponding to the work order target version is sent to the PC end, so that the PC end displays the download progress information.
[0034] According to another aspect of the present application, a version update method of a mobile terminal is also provided, which is applied to a PC side, wherein the method includes:
[0035] Establish a Socket connection with the mobile terminal;
[0036] If the acquired work order target version is inconsistent with the preset package version of the mobile terminal, an update trigger instruction is sent to the mobile terminal, so that the mobile terminal establishes a network connection with a file transfer protocol FTP server based on the update trigger instruction, and downloads the version update content corresponding to the work order target version from the FTP server through the network connection;
[0037] Receiving a download completion instruction returned by the mobile terminal;
[0038] In response to the download completion instruction, an update instruction is sent to the mobile terminal, so that the mobile terminal responds to the update instruction and updates the version of the mobile terminal according to the version update content.
[0039] Furthermore, in the above-mentioned PC-side method for updating a version of a mobile terminal, the step of establishing a Socket connection with the mobile terminal comprises:
[0040] In response to scanning the image code displayed by the mobile terminal for establishing a Socket connection, initiating a Socket connection request to the mobile terminal, so that the mobile terminal establishes a Socket connection with the PC based on the Socket connection request; wherein the image code includes identification information of the mobile terminal and port information of the Socket server;
[0041] In response to the Socket connection request, a Socket connection is established between the Socket server corresponding to the port information and the mobile terminal corresponding to the identification information.
[0042] Furthermore, in the above-mentioned PC-side mobile terminal version update method, if the obtained work order target version is inconsistent with the preset package version of the mobile terminal, before sending the update trigger instruction to the mobile terminal, the method further includes:
[0043] Get the target version of the work order;
[0044] Sending a preset package version acquisition instruction to the mobile terminal;
[0045] Receiving a pre-installed package version of the mobile terminal;
[0046] Determine whether the work order target version is consistent with the preset package version of the mobile terminal.
[0047] Further, the above PC-side method for updating a version of a mobile terminal, wherein the update instruction includes a first MD5 value of the version content corresponding to the work order target version, wherein, in response to the download completion instruction, an update instruction is sent to the mobile terminal so that the mobile terminal responds to the update instruction and updates the version of the mobile terminal according to the version update content, including:
[0048] In response to the download completion instruction, an update instruction is sent to the mobile terminal, so that the mobile terminal responds to the update instruction, determines the second MD5 value of the version update content corresponding to the downloaded work order target version, and when the first MD5 value is the same as the second MD5 value, updates the version of the mobile terminal according to the version update content.
[0049] Furthermore, the above-mentioned PC-side method for updating a version of a mobile terminal further comprises:
[0050] Sending a download progress acquisition instruction to the mobile terminal;
[0051] receiving download progress information returned by the mobile terminal when downloading the version update content corresponding to the work order target version;
[0052] The download progress information is displayed.
[0053] According to another aspect of the present application, a version update method of a mobile terminal is also provided, which is applied to an FTP server, wherein the method comprises:
[0054] Establishing a network connection with a mobile terminal, wherein the mobile terminal has established a socket connection with a PC, the network connection is initiated and established by the mobile terminal based on an update trigger instruction, and the update trigger instruction is received by the mobile terminal from the PC when the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC;
[0055] The version update content corresponding to the work order target version is sent to the mobile terminal through the network connection until it is completed, so that the mobile terminal sends a download completion instruction to the PC.
[0056] According to another aspect of the present application, a non-volatile storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions can be executed by a processor, the processor implements the version update method of a mobile terminal as described above.
[0057] According to another aspect of the present application, a version update device for a mobile terminal is further provided, wherein the device includes:
[0058] one or more processors;
[0059] A non-volatile storage medium for storing one or more computer readable instructions,
[0060] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the above-mentioned version update method for a mobile terminal.
[0061] Compared with the prior art, the present application establishes a Socket connection between a mobile terminal and a PC; if the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, an update trigger instruction sent by the PC is received; based on the update trigger instruction, a network connection is established with a file transfer protocol FTP server, and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection; after the download is completed, a download completion instruction is sent to the PC, so that the PC sends an update instruction to the mobile terminal; the update instruction sent by the PC is received; in response to the update instruction, the version of the mobile terminal is updated according to the version update content, thereby realizing the connection between the mobile terminal and the work order target version. The PC end establishes a Socket connection and sends the preset package version information of the mobile terminal to the PC end, so that the PC end verifies the work order target version with the preset package version information. When the verification results are inconsistent, the PC end receives the update trigger instruction from the PC end to establish a network connection with the FTP server, and downloads the version content corresponding to the work order target version. After the download is completed, the mobile terminal sends a download completion instruction to the PC end, so that the PC end sends an update instruction to the mobile terminal, and updates the version of the mobile terminal according to the update instruction, so that the mobile terminal communicates with the PC end through the Socket connection, obtains version information, and transmits data through FTP, so as to achieve the purpose of updating the version in the mobile terminal.
[0062] Furthermore, the present application also establishes a Socket connection with the mobile terminal through the PC end; if the acquired work order target version is inconsistent with the preset package version of the mobile terminal, the PC end sends an update trigger instruction to the mobile terminal, so that the mobile terminal establishes a network connection with the file transfer protocol FTP server based on the update trigger instruction, and downloads the version update content corresponding to the work order target version from the FTP server through the network connection; receives the download completion instruction returned by the mobile terminal; in response to the download completion instruction, sends an update instruction to the mobile terminal, so that the mobile terminal responds to the update instruction and updates the version of the mobile terminal according to the version update content, thereby realizing the PC end. The C end establishes a Socket connection with the mobile terminal so that the mobile terminal sends the preset package version information of the mobile terminal to the PC end, and performs version verification on the obtained work order target version and the preset package version of the mobile terminal. When the verification is inconsistent, an update trigger instruction is sent to the mobile terminal, so that the mobile terminal establishes a network connection with the FTP server according to the update trigger instruction, and downloads the version content corresponding to the work order target version. When the download completion instruction of the mobile terminal is received, an update instruction is sent to the mobile terminal to complete the update of the mobile terminal, so that the PC end communicates with the mobile terminal wirelessly, controls the mobile terminal to transmit data through FTP, and achieves the purpose of controlling the mobile terminal to update on the PC end.
[0063] Furthermore, the present application also establishes a network connection with a mobile terminal through an FTP client, wherein the mobile terminal has established a Socket connection with a PC, and the network connection is initiated and established by the mobile terminal based on an update trigger instruction, and the update trigger instruction is received by the mobile terminal from the PC when the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC; the version update content corresponding to the work order target version is issued to the mobile terminal through the network connection until completion, so that the mobile terminal sends a download completion instruction to the PC, thereby realizing that the FTP server is connected to the mobile terminal through a wireless network, and sends the version update content corresponding to the work order target version to the mobile terminal until completion, so that when the preset package version of the mobile terminal is inconsistent with the work order target version of the PC, the version update content corresponding to the work order target package version is provided to the mobile terminal, so that the mobile terminal can update the version. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0065] Figure 1A system structure diagram showing a version update method for a mobile terminal according to one aspect of the present application;
[0066] Figure 2 A schematic diagram showing a flow chart of a version update method of a mobile terminal according to one aspect of the present application applied to a mobile terminal;
[0067] Figure 3 An application framework diagram showing a version update method for a mobile terminal according to one aspect of the present application;
[0068] Figure 4 A flowchart showing the working principle of a version update method for a mobile terminal according to one aspect of the present application is shown;
[0069] Figure 5 An AT instruction set of a PC side of a version update method of a mobile terminal according to one aspect of the present application is shown;
[0070] Figure 6 A schematic diagram showing a flow chart of a version update method of a mobile terminal according to one aspect of the present application applied to a PC side;
[0071] Figure 7 A schematic flow chart showing a version update method for a mobile terminal according to one aspect of the present application applied to an FTP server.
[0072] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0073] The present application is described in further detail below in conjunction with the accompanying drawings.
[0074] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPU), input / output interfaces, network interfaces and memories.
[0075] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0076] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0077] like Figure 1 As shown, a system structure diagram of a version update method of a mobile terminal in one aspect of the present application, the method includes a mobile terminal, a PC and an FTP server. The method includes:
[0078] A version update method for a mobile terminal is applied to a mobile terminal, such as Figure 2 As shown, the method includes step S11, step S12, step S13, step S14, step S15 and step S16, which specifically include the following steps:
[0079] Step S11, as Figure 3 As shown, the mobile terminal establishes a Socket connection with the PC; it should be noted that the mobile terminal establishes a Socket connection with the PC through a preset App.
[0080] Step S12, as Figure 4 As shown, if the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, an update trigger instruction sent by the PC is received.
[0081] For example, if the preset package version of the mobile terminal is 2.0, and the work order target version obtained by the PC is 3.0, and the two versions are inconsistent, the mobile terminal will receive the update trigger instruction sent by the PC.
[0082] Step S13, as Figure 4 As shown, based on the update trigger instruction, a network connection is established with a file transfer protocol FTP server, and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection.
[0083] It should be noted that the update trigger instruction is sent from the PC to the mobile terminal. When the update trigger instruction is received, the mobile client establishes a network connection with the FTP server through the preset App.
[0084] Step S14, after downloading is completed, a download completion instruction is sent to the PC, so that the PC sends an update instruction to the mobile terminal. It should be noted that the mobile terminal here sends the download progress to the PC to confirm the current download progress, and when the download progress reaches 100%, the download is confirmed to be complete.
[0085] Step S15, receiving the update instruction sent by the PC. For example, when the download progress of the mobile terminal reaches 100%, that is, when the mobile terminal completes the download, the mobile terminal will receive the update instruction from the PC.
[0086] Step S16, as Figure 4 As shown, in response to the update instruction, the version of the mobile terminal is updated according to the version update content. For example, if the current version of the mobile terminal is 1.0 and the version update content is 3.0, when the mobile terminal receives the update instruction, the version of the mobile terminal is updated according to the version update content, so that the version content of the mobile terminal changes from 1.0 to 3.0.
[0087] Through the above content, the present application establishes a Socket connection between a mobile terminal and a PC; if the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, an update trigger instruction sent by the PC is received; based on the update trigger instruction, a network connection is established with a file transfer protocol FTP server, and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection; after the download is completed, a download completion instruction is sent to the PC, so that the PC sends an update instruction to the mobile terminal; the update instruction sent by the PC is received; in response to the update instruction, the version of the mobile terminal is updated according to the version update content, thereby realizing the connection between the mobile terminal and the work order target version. The PC end establishes a Socket connection and sends the preset package version information of the mobile terminal to the PC end, so that the PC end verifies the work order target version with the preset package version information. When the verification results are inconsistent, the PC end receives the update trigger instruction from the PC end to establish a network connection with the FTP server, and downloads the version content corresponding to the work order target version. After the download is completed, the mobile terminal sends a download completion instruction to the PC end, so that the PC end sends an update instruction to the mobile terminal, and updates the version of the mobile terminal according to the update instruction, so that the mobile terminal communicates with the PC end through the Socket connection, obtains version information, and transmits data through FTP, so as to achieve the purpose of updating the version in the mobile terminal.
[0088] Following the above embodiment of the present application, a version update method of the above mobile terminal, wherein the establishing a Socket connection with the PC terminal includes:
[0089] like Figure 3 As shown, turn on the WiFi switch of the mobile terminal and create a Socket server; wherein the mobile terminal is placed in a shielding box, and the shielding box has a built-in wireless access point, such as Figure 1 shown.
[0090] It should be noted that the shielding box has a built-in factory download station for centralized downloading of version content. The shielding box is used to ensure transmission speed and prevent interference with wireless data. A dedicated network is placed in the shielding box for mobile terminals to connect to. When an update is required, the installation package is transmitted through the dedicated network, and the number of mobile terminals in a shielding box is dynamically selected based on the speed supported by the mobile terminal WIFI and the number of channels supported by the router.
[0091] like Figure 3As shown, the wireless signal of the built-in wireless access point is scanned, and a wireless connection is established with the scanned built-in wireless access point; wherein, before scanning the wireless signal of the built-in wireless access point, it is necessary to disconnect the currently connected wireless network and clear the connection information of all wireless connections, and at the same time, determine whether the wireless signal of the built-in wireless access point in the shielding box exists, and if not, continue scanning until the wireless signal of the built-in wireless access point is scanned, and then the mobile terminal establishes a wireless connection with the scanned built-in wireless access point, thereby ensuring that the mobile terminal is connected to the wireless signal of the built-in wireless access point in the shielding box.
[0092] If the wireless connection is successfully established, an image code for establishing a Socket connection is generated and displayed, and the image code includes the identification information of the mobile terminal and the port information of the Socket server, so that the PC can scan the image code and initiate a Socket connection request to the mobile terminal. Here, the image code includes but is not limited to a QR code, and the identification information of the mobile terminal includes the IP address of the mobile terminal and the BSN information of the mobile terminal, which is used to identify the mobile terminal.
[0093] For example, Figure 3 As shown, when the mobile terminal successfully connects to the wireless network in the shielding box, the mobile terminal generates a QR code, and the PC scans the QR code of the mobile terminal through a barcode scanner, and initiates a Socket connection request to the corresponding mobile terminal based on the information of the mobile terminal contained in the QR code.
[0094] Receive the Socket connection request sent by the PC. For example, when the PC initiates a Socket connection request by scanning a QR code, the mobile terminal will accept the Socket connection request.
[0095] Based on the Socket connection request, a Socket connection is established with the PC. For example, after receiving the connection request from the PC, the mobile terminal establishes a Socket connection with the PC according to the connection request.
[0096] Following the above embodiment of the present application, a version update method of the above mobile terminal, wherein the method further includes:
[0097] like Figure 3 As shown, if the wireless connection is not successfully established, the wireless signal of the built-in wireless access point is rescanned at a preset time interval until a wireless connection is successfully established with the scanned built-in wireless access point.
[0098] For example, when the wireless connection is not successfully connected, the wireless signal of the built-in wireless access point will be rescanned every 5 seconds and then connected again until the mobile terminal successfully establishes a connection with the scanned built-in wireless access point.
[0099] Following the above embodiment of the present application, in a version update method of the above mobile terminal, if the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, before receiving the update trigger instruction sent by the PC, the method further includes:
[0100] like Figure 3 As shown, the pre-installed package version acquisition instruction sent by the PC is received. For example, the mobile terminal receives the pre-installed package version acquisition instruction sent by the PC, such as Figure 5 As shown, the preset package version acquisition instruction is sent in the form of an AT instruction, such as AT^UPVERSION?, and then the preset package version information is sent to the PC.
[0101] In response to the preset package version acquisition instruction, the preset package version of the mobile terminal is sent to the PC, so that the PC determines whether the preset package version of the mobile terminal is consistent with the acquired work order target version.
[0102] It should be noted that after the mobile terminal responds to the preset package version acquisition instruction and sends the preset package version information of the mobile terminal to the PC, if the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, the mobile terminal will receive the update trigger instruction sent by the PC; if they are consistent, the mobile terminal will directly receive the update instruction sent by the PC.
[0103] For example, if the pre-installed package version of the mobile terminal is 2.0, when the mobile terminal receives the pre-installed package acquisition instruction, it sends the version information of the pre-installed package version 2.0 to the PC. When the work order target version obtained by the PC is 3.0, at this time, after judging that the two versions are inconsistent, the mobile terminal will receive the update trigger instruction sent by the PC: Figure 5 As shown, AT^UPDOWNLOAD=IP,port,user,pwd,filepath, so that the mobile terminal first deletes all local preset packages, and then downloads the corresponding version update content from the specified FTP server; when the work order target version obtained by the PC is 2.0, at this time, after judging that the two versions are consistent, the mobile terminal will receive the update instruction sent by the PC, thereby updating the version of the mobile terminal.
[0104] Next to the above embodiment of the present application, a version update method of the above mobile terminal, wherein the update trigger instruction includes the work order target version and FTP connection parameter information, wherein, based on the update trigger instruction, a network connection is established with the FTP server, and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection, including:
[0105] In response to the update trigger instruction, a network connection is established with a file transfer protocol FTP server according to the FTP connection parameter information.
[0106] For example, if the preset package version of the mobile terminal is 2.0, and the work order target version obtained by the PC is 3.0, and the two are inconsistent, the mobile terminal receives the update trigger instruction sent by the PC, and the mobile terminal establishes a network connection with the File Transfer Protocol FTP server according to the FTP connection parameter information in the update trigger instruction.
[0107] The version update content corresponding to the work order target version is downloaded from the FTP server through the network connection.
[0108] It should be noted that after establishing the network connection, the mobile terminal will download the version update content corresponding to the work order target version from the FTP server according to the parameter version information, wherein the parameter version information is included in the update trigger instruction; in addition, the mobile terminal can cancel the current download and exit the update interface by receiving instructions from the PC.
[0109] For example, if the pre-installed package version of the mobile terminal is 2.0, and the version content corresponding to the parameter version information is 3.0, after the network connection is established, the mobile terminal will download the version update content corresponding to the version content 3.0 from the FTP server according to the parameter version information, and put the downloaded version update content into the local data / update directory; when the current download is to be canceled, the mobile terminal will receive the download cancellation instruction from the PC: Figure 5 As shown, AT^UPCANCEL cancels the download and exits the update interface.
[0110] Following the above-mentioned embodiment of the present application, a version update method for the above-mentioned mobile terminal is provided, wherein the update instruction includes a first MD5 value of the version content corresponding to the work order target version, wherein the version of the mobile terminal is updated according to the version update content in response to the update instruction, including: determining, in response to the update instruction, a second MD5 value of the version update content corresponding to the downloaded work order target version.
[0111] It should be noted that the MD5 value of the version content corresponding to the work order target version is compared with the MD5 value of the version update content corresponding to the downloaded work order target version. The purpose is to further confirm whether the downloaded update content is consistent with the version content corresponding to the work order target, so as to ensure that the version of the mobile terminal can be successfully updated.
[0112] For example, as Figure 4 shown, when the mobile terminal receives an update instruction from the PC side, as Figure 5 shown, for example: the AT command AT^UPSTART = <MD5 value>. Through the AT command AT^UPSTART = <MD5 value>, the MD5 value of the version content corresponding to the work order target version in the mobile terminal is compared with the MD5 value of the version update content corresponding to the downloaded work order target version.
[0113] If the first MD5 value is the same as the second MD5 value, the version of the mobile terminal is updated according to the version update content.
[0114] It should be noted that if the first MD5 value is the same as the second MD5 value, it indicates that the downloaded version update content is consistent with the work order target version content, and then the mobile terminal starts to update; if the first MD5 value is different from the second MD5 value, it indicates that the downloaded version update content is inconsistent with the work order target version content, and then all files in the directory are cleared; after the mobile terminal is updated or all files in the directory are cleared, the mobile terminal will receive a clear instruction sent by the PC side to clear the memorized WIFI password and turn off the WIFI module.
[0115] For example, as Figure 4 shown, if the MD5 values of the instruction parameters of the two are the same, the update of the mobile terminal starts; if the MD5 values of the instruction parameters of the two are different, all files in the upgrade directory are cleared; after the update is completed or all files in the directory are cleared, the mobile terminal will receive a clear instruction sent by the PC side, as Figure 5 shown, for example: AT^CLEARWIFI, to clear the memorized WIFI password and turn off the WIFI module, so as to realize the clearing of the usage records of the mobile terminal.
[0116] Continuing with the above embodiments of the present application, a method for updating the version of a mobile terminal, wherein the method further includes:
[0117] For example, as Figure 3As shown, receiving the download progress acquisition instruction sent by the PC; for example, when the mobile terminal downloads the version update content corresponding to the work order target version from the FTP server through the network connection, it will receive the download progress acquisition instruction sent by the PC every 3 seconds. Figure 5 The AT command AT^UPSPEED? shown in the figure obtains the current download rate and average rate.
[0118] In response to the download progress acquisition instruction, download progress information when downloading the version update content corresponding to the work order target version is sent to the PC end, so that the PC end displays the download progress information.
[0119] For example, the mobile terminal will receive a download progress acquisition instruction from the PC every 3 seconds, and the mobile terminal will send the current download rate and average rate to the PC, so that the PC will display the acquired download progress information on the interface.
[0120] According to another aspect of the present application, a version update method of a mobile terminal is also provided, which is applied to a PC terminal, such as Figure 6 As shown, the method includes step S21, step S22, step S23 and step S24, which specifically include the following steps:
[0121] Step S21, as Figure 3 As shown, the PC establishes a Socket connection with the mobile terminal; it should be noted that the PC establishes a Socket connection through an App pre-installed in the mobile terminal.
[0122] Step S22, as Figure 4 As shown, if the acquired work order target version is inconsistent with the preset package version of the mobile terminal, the PC sends an update trigger instruction to the mobile terminal, so that the mobile terminal establishes a network connection with the File Transfer Protocol FTP server based on the update trigger instruction, and downloads the version update content corresponding to the work order target version from the FTP server through the network connection.
[0123] It should be noted that the PC can send a command to the mobile terminal to cancel the download and exit the update interface.
[0124] For example, if the work order target version obtained by the PC is 3.0, and the preset package version of the mobile terminal is 2.0, the two versions are inconsistent at this time, and the PC will send an update trigger instruction to the mobile terminal, so that the mobile terminal can establish a network connection with the FTP server based on the update trigger instruction, thereby downloading the version update content corresponding to the work order target version from the FTP server; if you want to cancel the download at this time, the PC will send a cancel download instruction to the mobile terminal: Figure 5 As shown, AT^UPCANCEL cancels the current download and exits the update.
[0125] Step S23, receiving the download completion instruction returned by the mobile terminal. It should be noted that the PC will display the download progress of the mobile terminal on the interface, and when the download progress reaches 100%, it indicates that the download is complete.
[0126] Step S24, as Figure 4 As shown, in response to the download completion instruction, an update instruction is sent to the mobile terminal, so that the mobile terminal responds to the update instruction and updates the version of the mobile terminal according to the version update content. For example, when the download progress received by the mobile terminal reaches 100%, it means that the download of the mobile terminal is completed, and the update instruction is sent to the mobile terminal, so that the mobile terminal can perform a version update based on the update instruction.
[0127] According to the above content, the present application establishes a Socket connection with a mobile terminal through a PC; if the acquired work order target version is inconsistent with the preset package version of the mobile terminal, the PC sends an update trigger instruction to the mobile terminal, so that the mobile terminal establishes a network connection with a file transfer protocol FTP server based on the update trigger instruction, and downloads the version update content corresponding to the work order target version from the FTP server through the network connection; receives a download completion instruction returned by the mobile terminal; in response to the download completion instruction, sends an update instruction to the mobile terminal, so that the mobile terminal responds to the update instruction and updates the version of the mobile terminal according to the version update content, thereby realizing the The PC side establishes a Socket connection with the mobile terminal, so that the mobile terminal sends the preset package version information of the mobile terminal to the PC side, and performs version verification on the obtained work order target version and the preset package version of the mobile terminal. When the verification is inconsistent, an update trigger instruction is sent to the mobile terminal, so that the mobile terminal establishes a network connection with the FTP server according to the update trigger instruction, and downloads the version content corresponding to the work order target version. When the download completion instruction of the mobile terminal is received, an update instruction is sent to the mobile terminal, so that the mobile terminal completes the update, thereby enabling the PC side to communicate with the mobile terminal wirelessly, control the mobile terminal to transmit data through FTP, and achieve the purpose of controlling the mobile terminal to update on the PC side.
[0128] Following the above embodiment of the present application, the above PC-side method for updating a mobile terminal version, wherein the step of establishing a Socket connection with the mobile terminal comprises:
[0129] In response to scanning the image code displayed by the mobile terminal for establishing a Socket connection, a Socket connection request is initiated to the mobile terminal, so that the mobile terminal establishes a Socket connection with the PC based on the Socket connection request; wherein the image code includes identification information of the mobile terminal and port information of the Socket server. Here, the image code includes but is not limited to a QR code, and the identification information of the mobile terminal includes the IP address of the mobile terminal and the BSN information of the mobile terminal, which is used to identify the mobile terminal.
[0130] For example, Figure 3 As shown, the PC scans the QR code of the mobile terminal through a barcode scanner, and initiates a Socket connection request to the corresponding mobile terminal according to the information of the mobile terminal contained in the QR code.
[0131] In response to the Socket connection request, a Socket connection is established between the Socket server corresponding to the port information and the mobile terminal corresponding to the identification information. For example, a connection request is sent to the mobile terminal, and the PC establishes a Socket connection with the mobile terminal corresponding to the IP address of the mobile terminal and the BSN information of the mobile terminal according to the Socket server corresponding to the port.
[0132] Following the above embodiment of the present application, in the above PC-side method for updating a mobile terminal version, if the obtained work order target version is inconsistent with the preset package version of the mobile terminal, before sending an update trigger instruction to the mobile terminal, the method further includes:
[0133] like Figure 4 As shown, the target version of the work order is obtained. It should be noted that the PC terminal obtains the target version of the work order from the manufacturing enterprise's production process execution management system MES through the Blockchain Service Network (BSN).
[0134] like Figure 4 As shown, the pre-installed package version acquisition instruction is sent to the mobile terminal. For example, the PC sends the following to the mobile terminal: Figure 5 The AT command AT^UPVERSION? shown in the figure is used to obtain the preset package version information.
[0135] Receive the pre-installed package version of the mobile terminal. For example, the pre-installed package version of the mobile terminal is 2.0.
[0136] like Figure 4 As shown, it is determined whether the work order target version is consistent with the preset package version of the mobile terminal.
[0137] It should be noted that if the work order target version obtained by the PC is inconsistent with the preset package version of the mobile terminal, the PC will send an update trigger instruction to the mobile terminal. If they are consistent, the PC will directly send the update instruction to the mobile terminal.
[0138] For example, if the work order target version obtained by the PC is 3.0, and the pre-installed package version of the mobile terminal is 2.0, then after determining that the two versions are inconsistent, the PC will send an update trigger to the mobile terminal. Figure 5The instruction shown as AT^UPDOWNLOAD=IP,port,user,pwd,filepath causes the mobile terminal to first delete all the preset packages locally and then download the corresponding version update content from the specified FTP server; when the version of the preset package of the mobile terminal is 3.0, at this time, after judgment, the two versions are the same, then the PC will send an update instruction to the mobile terminal to update the version of the mobile terminal.
[0139] Continuing with the above embodiments of the present application, a method for updating the version of a mobile terminal of the above PC, wherein the update instruction includes the first MD5 value of the version content corresponding to the work order target version, and in response to the download completion instruction, an update instruction is sent to the mobile terminal, so that in response to the update instruction, the mobile terminal updates the version of the mobile terminal according to the version update content, including:
[0140] As Figure 4 shown, in response to the download completion instruction, an update instruction is sent to the mobile terminal, so that in response to the update instruction, the mobile terminal determines the second MD5 value of the version update content corresponding to the work order target version downloaded, and when the first MD5 value is the same as the second MD5 value, the version of the mobile terminal is updated according to the version update content.
[0141] It should be noted that comparing the MD5 value of the version content corresponding to the work order target version with the MD5 value of the version update content corresponding to the work order target version downloaded is aimed at further confirming whether the downloaded update content is consistent with the version content corresponding to the work order target, so as to ensure that the version of the mobile terminal can be successfully updated; after the mobile terminal is updated or all files in the initial directory, the PC sends a clear instruction to the mobile terminal to clear the remembered WIFI password and turn off the WIFI module.
[0142] For example, when the PC receives the download completion instruction from the mobile terminal, an update instruction is sent to the mobile terminal, wherein the update instruction contains an AT instruction shown as Figure 5 AT^UPSTART=<MD5 value>. By using the AT instruction AT^UPSTART=<MD5 value>, the MD5 value of the version content corresponding to the work order target version is compared with the MD5 value of the version update content corresponding to the work order target version downloaded in the mobile terminal. When the MD5 values of the instruction parameters of the two are the same, the mobile terminal starts to update; after the update is completed or all files in the clear directory, the PC will send a clear instruction to the mobile terminal, such as: As Figure 5As shown, AT^CLEARWIFI is used to clear the WIFI password memorized by the mobile terminal and turn off the WIFI module, thereby clearing the usage record of the mobile terminal.
[0143] Following the above embodiment of the present application, a version update method of a mobile terminal on the above PC side, wherein the method further includes:
[0144] like Figure 4 As shown, a download progress acquisition instruction is sent to the mobile terminal; for example, when the mobile terminal downloads the update content corresponding to the work order target version, the PC terminal sends the download progress acquisition instruction to the mobile terminal every 3 seconds. Figure 5 The AT command AT^UPSPEED? shown in the figure obtains the current download rate and average rate.
[0145] Receive the download progress information returned by the mobile terminal when downloading the version update content corresponding to the work order target version. Figure 5 After the AT command AT^UPSPEED? is executed, the current download rate and the average rate sent by the mobile terminal will be received.
[0146] like Figure 4 As shown, the download progress information is displayed. For example, after receiving the current download rate and average rate sent by the mobile terminal, they are displayed on the interface of the PC.
[0147] According to another aspect of the present application, a version update method of a mobile terminal is also provided, which is applied to an FTP server, such as Figure 7 As shown, the method includes step S31 and step S32, which specifically include the following steps:
[0148] Step S31, establish a network connection with the mobile terminal, wherein the mobile terminal has established a Socket connection with the PC, and the network connection is initiated and established by the mobile terminal based on an update trigger instruction, and the update trigger instruction is received by the mobile terminal from the PC when the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC.
[0149] It should be noted that the FTP server stores different version update contents of the mobile terminal. When the work order target version obtained by the PC is inconsistent with the preset package version of the mobile terminal, the PC will send the update trigger instruction to the mobile terminal, so that the mobile terminal establishes a network connection with the FTP server, thereby downloading the update content corresponding to the work order target version from the FTP server.
[0150] For example, if the target version of the work order obtained by the PC is 3.0, and the pre-installed package version of the mobile terminal is 2.0, the PC will send the following to the mobile terminal: Figure 5 The update trigger instruction AT^UPDOWNLOAD=IP, port, user, pwd, filepath shown in the figure, the mobile terminal establishes a network connection with the FTP server based on the update trigger instruction, and downloads the version update content corresponding to the work order target version 3.0 from the FTP server.
[0151] Step S32: sending the version update content corresponding to the work order target version to the mobile terminal through the network connection until it is completed, so that the mobile terminal sends a download completion instruction to the PC.
[0152] It should be noted that when the download needs to be canceled, the FTP server will stop sending the update content corresponding to the work order target version to the mobile terminal.
[0153] For example, after the FTP server establishes a network connection with the mobile terminal, the FTP server will send the corresponding version update content of the work order target version 3.0 to the mobile terminal according to the request of the mobile terminal, until the mobile terminal completes the download, so that the mobile terminal sends a download completion instruction to the PC; when the mobile terminal receives the download cancellation instruction from the PC: Figure 5 As shown, AT^UPCANCEL, the FTP server will stop issuing the corresponding version update content of the work order target version 3.0, and the mobile terminal will exit the upgrade interface.
[0154] According to the above content, the present application establishes a network connection with a mobile terminal through an FTP client, wherein the mobile terminal has established a Socket connection with a PC, and the network connection is initiated and established by the mobile terminal based on an update trigger instruction, and the update trigger instruction is received by the mobile terminal from the PC when the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC; the version update content corresponding to the work order target version is issued to the mobile terminal through the network connection until completion, so that the mobile terminal sends a download completion instruction to the PC, and realizes that the FTP server is connected to the mobile terminal through a wireless network, and sends the version update content corresponding to the work order target version to the mobile terminal until completion, so that when the preset package version of the mobile terminal is inconsistent with the work order target version of the PC, the version update content corresponding to the work order target package version is provided to the mobile terminal, so that the mobile terminal can update the version.
[0155] In an actual application scenario of the present application, taking the mobile terminal performing version upgrade as an example, Figure 1 As shown, first, a local area network is built using a router, an FTP server is placed in the local area network, and the mobile terminal is used as an FTP client. To ensure the transmission speed and prevent interference from wireless data, the mobile terminal is placed in the shielding box, and a dedicated network is placed in the shielding box for the mobile terminal to connect (such as a dedicated built-in wireless access point to provide a dedicated network). At the same time, Figure 3 As shown, the mobile terminal starts the App, automatically turns on WIFI, creates a Socket server, disconnects the currently connected WIFI, clears all wireless connection information, and scans the built-in wireless access point in the shielding box. If the built-in wireless access point is not scanned, the wireless signal continues to be scanned until the built-in wireless access point is scanned, so that the mobile terminal connects to the built-in wireless access point in the shielding box to obtain a wireless network. If the connection is not successful, the WIFI will be scanned once every 5 seconds (here, 5 seconds is a preferred embodiment, and the interval time can also be other durations) and then connected until the connection is successful.
[0156] When the user needs to change the built-in wireless network, the configuration file can be pushed to the system / etc folder. When the APP of the mobile terminal is opened, the built-in wireless access point of the configuration file will be used first. After the mobile terminal successfully connects to WIFI, a QR code will be displayed. The QR code includes the IP address of the mobile terminal, the BSN information of the mobile terminal and the port information of the Socket server. Then, the PC scans the QR code of the mobile terminal through a barcode scanner or other scanning methods. After the scanning is successful, the PC establishes a Socket connection with the mobile terminal through the Socket port. Then, as shown in the figure, Figure 4 As shown, after the PC establishes a Socket connection with the mobile terminal, the PC obtains the work order target version information from the MES through the BSN, and sends the following information to the mobile terminal: Figure 5 The AT command in the sequence number 1 shown in the figure: AT^UPVERSION?, obtains the pre-installed package version information of the mobile terminal. After receiving the AT command: AT^UPVERSION? sent by the PC, the mobile terminal sends the pre-installed package version information to the PC. After receiving the pre-installed package version information of the mobile terminal, the PC verifies the obtained work order version information with the pre-installed package version information. If the version information is inconsistent, the PC sends an update trigger instruction to the mobile terminal. The update trigger instruction is as follows: Figure 5The AT command in Serial Number 2 shown: AT^UPDOWNLOAD=IP,port,user,pwd,filepath. After the mobile terminal receives the AT command from the PC side: AT^UPDOWNLOAD=IP,port,user,pwd,filepath, the mobile terminal will first delete all local upgrade packages, and trigger a connection to the FTP server based on the update trigger command. The mobile terminal downloads the upgrade package from the specified FTP server, and the FTP server will send the upgrade content corresponding to the work order target version to the mobile terminal according to the request of the mobile terminal. During this period, the PC side can send to the mobile terminal, such as Figure 5 The AT command in Serial Number 5 shown: AT^UPCANCEL to cancel the current download. When the mobile terminal receives the AT command: AT^UPCANCEL, it will cancel the download and exit the upgrade interface.
[0157] When the mobile terminal downloads the upgrade content corresponding to the target version from the FTP server, the PC side will send to the mobile terminal, such as Figure 5 The AT command in Serial Number 3 shown: AT^UPSPEED? every 3 seconds (here, 3 seconds is the preferred embodiment, and the interval time can also take other durations) to obtain the download progress, current download rate, and average rate of the upgrade package of the mobile terminal. After the mobile terminal receives the AT command AT^UPSPEED? from the PC side, it will return the current download progress, download rate, and average rate to the PC side and display them on the PC side until the download is completed. When the PC side confirms that the mobile terminal has completed the download, it will send an update command to the mobile terminal. The update command contains, such as Figure 5 The AT command AT^UPSTART=<MD5 value> in Serial Number 4 shown. When the mobile terminal receives the AT command AT^UPSTART=<MD5 value> from the PC side, the mobile terminal will verify the MD5 value of the version content corresponding to the work order target version with the MD5 value of the version upgrade content corresponding to the work order target downloaded by the mobile terminal. If the two MD5 values are the same, the mobile terminal will upgrade by triggering the Recovery mode of the system. If they are different, it will prompt that the download version fails and clear all files in the upgrade directory; in addition, if the PC side verifies the work order version information obtained with the preset package version information, if the version information is the same, the PC side will directly send an update command to the mobile terminal. The update command contains, such as Figure 5The AT command in Serial Number 4 shown: AT^UPSTART = <MD5 value>. When the mobile terminal receives the AT command from the PC side: AT^UPSTART = <MD5 value>, the mobile terminal checks the MD5 value of the version content corresponding to the work order target version and the MD5 value of the version content corresponding to the preset package version of the mobile terminal. If the two MD5 values are the same, the mobile terminal upgrades by triggering the Recovery mode of the system. If they are different, all files in the upgrade directory are cleared. At the same time, after the mobile terminal successfully upgrades or clears all files in the upgrade directory, the PC side will send the AT command in Serial Number 6 shown as Figure 5 AT^CLEARWIFI to the mobile terminal. After receiving the AT command: AT^CLEARWIFI, the mobile terminal clears the memorized WIFI password and turns off the WIFI module, returning the mobile terminal to the unused state. Through the above operations, the purpose of controlling the system software version during the factory stage and repair stage when the intelligent terminal has no USB interface is achieved. It not only solves the data transmission problem when the mobile terminal has no USB, but also solves the consumption problem of using the USB data cable. At the same time, normalization operations can be performed on different intelligent devices, applicable to all intelligent mobile terminal products on the market, with a wide range of applications.
[0158] According to another aspect of the present application, a non-volatile storage medium is also provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the processor implements a version update method of a mobile terminal as described above.
[0159] According to another aspect of the present application, a version update device for a mobile terminal is also provided, wherein the device includes:
[0160] One or more processors;
[0161] A non-volatile storage medium for storing one or more computer-readable instructions,
[0162] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement a version update method of a mobile terminal as described above.
[0163] Here, for the detailed content of each embodiment in the version update device of a mobile terminal, reference can be specifically made to the corresponding part of the embodiment of the version update method of a mobile terminal described above, and details will not be repeated here.
[0164] In summary, the present application establishes a Socket connection between a mobile terminal and a PC; if the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, an update trigger instruction sent by the PC is received; based on the update trigger instruction, a network connection is established with a file transfer protocol FTP server, and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection; after the download is completed, a download completion instruction is sent to the PC, so that the PC sends an update instruction to the mobile terminal; the update instruction sent by the PC is received; in response to the update instruction, the version of the mobile terminal is updated according to the version update content, so as to realize the connection between the mobile terminal and the PC. The C end establishes a Socket connection and sends the preset package version information of the mobile terminal to the PC end, so that the PC end verifies the work order target version with the preset package version information. When the verification results are inconsistent, the update trigger instruction from the PC end is received to establish a network connection with the FTP server, and the version content corresponding to the work order target version is downloaded. After the download is completed, the mobile terminal sends a download completion instruction to the PC end, so that the PC end sends an update instruction to the mobile terminal, and updates the version of the mobile terminal according to the update instruction, so that the mobile terminal communicates with the PC end through the Socket connection, obtains version information, and transmits data through FTP, so as to achieve the purpose of updating the version in the mobile terminal.
[0165] Furthermore, the present application also establishes a Socket connection with the mobile terminal through the PC end; if the acquired work order target version is inconsistent with the preset package version of the mobile terminal, the PC end sends an update trigger instruction to the mobile terminal, so that the mobile terminal establishes a network connection with the file transfer protocol FTP server based on the update trigger instruction, and downloads the version update content corresponding to the work order target version from the FTP server through the network connection; receives the download completion instruction returned by the mobile terminal; in response to the download completion instruction, sends an update instruction to the mobile terminal, so that the mobile terminal responds to the update instruction and updates the version of the mobile terminal according to the version update content, thereby realizing the PC end. The C end establishes a Socket connection with the mobile terminal so that the mobile terminal sends the preset package version information of the mobile terminal to the PC end, and performs version verification on the obtained work order target version and the preset package version of the mobile terminal. When the verification is inconsistent, an update trigger instruction is sent to the mobile terminal, so that the mobile terminal establishes a network connection with the FTP server according to the update trigger instruction, and downloads the version content corresponding to the work order target version. When the download completion instruction of the mobile terminal is received, an update instruction is sent to the mobile terminal to complete the update of the mobile terminal, so that the PC end communicates with the mobile terminal wirelessly, controls the mobile terminal to transmit data through FTP, and achieves the purpose of controlling the mobile terminal to update on the PC end.
[0166] Furthermore, the present application also establishes a network connection with a mobile terminal through an FTP client, wherein the mobile terminal has established a Socket connection with a PC, and the network connection is initiated and established by the mobile terminal based on an update trigger instruction, and the update trigger instruction is received by the mobile terminal from the PC when the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC; the version update content corresponding to the work order target version is issued to the mobile terminal through the network connection until completion, so that the mobile terminal sends a download completion instruction to the PC, thereby realizing that the FTP server is connected to the mobile terminal through a wireless network, and sends the version update content corresponding to the work order target version to the mobile terminal until completion, so that when the preset package version of the mobile terminal is inconsistent with the work order target version of the PC, the version update content corresponding to the work order target package version is provided to the mobile terminal, so that the mobile terminal can update the version.
[0167] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0168] In addition, a part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. The program instruction for calling the method of the present application may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that runs according to the program instruction. Here, according to an embodiment of the present application, a device is included, the device including a memory for storing computer program instructions and a processor for executing program instructions, wherein, when the computer program instruction is executed by the processor, the device is triggered to run the method and / or technical solution based on the aforementioned multiple embodiments according to the present application.
[0169] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A version update method for a mobile terminal, applied to a mobile terminal, wherein: The method comprises: Establish a Socket connection with the PC; If the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, receiving an update trigger instruction sent by the PC; Based on the update trigger instruction, a network connection is established with a file transfer protocol FTP server, and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection; After the download is completed, a download completion instruction is sent to the PC, so that the PC sends an update instruction to the mobile terminal; Receiving the update instruction sent by the PC; In response to the update instruction, updating the version of the mobile terminal according to the version update content; Among them, the update trigger instruction includes the work order target version and FTP connection parameter information, wherein based on the update trigger instruction, a network connection is established with a file transfer protocol FTP server, and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection, including: in response to the update trigger instruction, a network connection is established with the file transfer protocol FTP server according to the FTP connection parameter information; and the version update content corresponding to the work order target version is downloaded from the FTP server through the network connection.
2. The method according to claim 1, wherein: The step of establishing a Socket connection with the PC terminal includes: Turning on the WiFi switch of the mobile terminal and creating a Socket server; wherein the mobile terminal is placed in a shielding box having a built-in wireless access point; Scanning the wireless signal of the built-in wireless access point, and establishing a wireless connection with the scanned built-in wireless access point; If the wireless connection is successfully established, an image code for establishing a Socket connection is generated and displayed, wherein the image code includes the identification information of the mobile terminal and the port information of the Socket server, so that the PC terminal scans the image code and initiates a Socket connection request to the mobile terminal; Receiving the Socket connection request sent by the PC; Based on the Socket connection request, a Socket connection is established with the PC end.
3. The method according to claim 2, wherein: The method further comprises: If the wireless connection is not successfully established, the wireless signal of the built-in wireless access point is rescanned at a preset time interval until a wireless connection is successfully established with the scanned built-in wireless access point.
4. According to the method of claim 1, if the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC, before receiving the update trigger instruction sent by the PC, the method further includes: Receiving a preset package version acquisition instruction sent by the PC; In response to the pre-installed package version acquisition instruction, the pre-installed package version of the mobile terminal is sent to the PC, so that the PC determines whether the pre-installed package version of the mobile terminal is consistent with the acquired work order target version.
5. According to the method of claim 1, the update instruction includes the first MD5 value of the version content corresponding to the work order target version, wherein: The step of updating the version of the mobile terminal according to the version update content in response to the update instruction includes: In response to the update instruction, determining a second MD5 value of the version update content corresponding to the downloaded work order target version; If the first MD5 value is the same as the second MD5 value, the version of the mobile terminal is updated according to the version update content.
6. The method according to claim 1, wherein: The method further comprises: Receiving a download progress acquisition instruction sent by the PC; In response to the download progress acquisition instruction, download progress information when downloading the version update content corresponding to the work order target version is sent to the PC end, so that the PC end displays the download progress information.
7. A version update method for a mobile terminal, applied to a PC, wherein: The method comprises: Establish a Socket connection with the mobile terminal; If the acquired work order target version is inconsistent with the preset package version of the mobile terminal, an update trigger instruction is sent to the mobile terminal, so that the mobile terminal establishes a network connection with a file transfer protocol FTP server based on the update trigger instruction, and downloads the version update content corresponding to the work order target version from the FTP server through the network connection; Receiving a download completion instruction returned by the mobile terminal; In response to the download completion instruction, sending an update instruction to the mobile terminal, so that the mobile terminal responds to the update instruction and updates the version of the mobile terminal according to the version update content; Among them, the update trigger instruction includes the work order target version and FTP connection parameter information, wherein establishing a network connection with a file transfer protocol FTP server based on the update trigger instruction, and downloading the version update content corresponding to the work order target version from the FTP server through the network connection includes: in response to the update trigger instruction, establishing a network connection with the file transfer protocol FTP server according to the FTP connection parameter information; downloading the version update content corresponding to the work order target version from the FTP server through the network connection.
8. The method according to claim 7, wherein establishing a Socket connection with a mobile terminal comprises: In response to scanning the image code displayed by the mobile terminal for establishing a Socket connection, initiating a Socket connection request to the mobile terminal, so that the mobile terminal establishes a Socket connection with the PC based on the Socket connection request; wherein the image code includes identification information of the mobile terminal and port information of the Socket server; In response to the Socket connection request, a Socket connection is established between the Socket server corresponding to the port information and the mobile terminal corresponding to the identification information.
9. The method according to claim 7, if the obtained work order target version is inconsistent with the preset package version of the mobile terminal, before sending the update trigger instruction to the mobile terminal, the method further comprises: Get the target version of the work order; Sending a preset package version acquisition instruction to the mobile terminal; Receiving a pre-installed package version of the mobile terminal; Determine whether the work order target version is consistent with the preset package version of the mobile terminal.
10. The method according to claim 7, wherein: The update instruction includes a first MD5 value of the version content corresponding to the work order target version, wherein, in response to the download completion instruction, sending the update instruction to the mobile terminal so that the mobile terminal responds to the update instruction and updates the version of the mobile terminal according to the version update content, including: In response to the download completion instruction, an update instruction is sent to the mobile terminal, so that the mobile terminal responds to the update instruction, determines the second MD5 value of the version update content corresponding to the downloaded work order target version, and when the first MD5 value is the same as the second MD5 value, updates the version of the mobile terminal according to the version update content.
11. The method according to claim 7, wherein: The method further comprises: Sending a download progress acquisition instruction to the mobile terminal; receiving download progress information returned by the mobile terminal when downloading the version update content corresponding to the work order target version; The download progress information is displayed.
12. A version update method for a mobile terminal, applied to an FTP server, wherein: The method comprises: Establishing a network connection with a mobile terminal, wherein the mobile terminal has established a socket connection with a PC, the network connection is initiated and established by the mobile terminal based on an update trigger instruction, and the update trigger instruction is received by the mobile terminal from the PC when the preset package version of the mobile terminal is inconsistent with the work order target version obtained by the PC; Sending the version update content corresponding to the work order target version to the mobile terminal through the network connection until it is completed, so that the mobile terminal sends a download completion instruction to the PC after the download is completed, wherein the PC sends an update instruction to the mobile terminal, so that the mobile terminal responds to the update instruction and updates the version of the mobile terminal according to the version update content; Wherein, the update trigger instruction includes the work order target version and FTP connection parameter information; wherein, the network connection is initiated and established by the mobile terminal based on the update trigger instruction, including: the network connection is established by the mobile terminal in response to the update trigger instruction and according to the FTP connection parameter information with the file transfer protocol FTP server.
13. A non-volatile storage medium having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executable by a processor, the processor is caused to implement the method according to any one of claims 1 to 12.
14. A version update device for a mobile terminal, wherein: The device comprises: one or more processors; A non-volatile storage medium for storing one or more computer readable instructions, When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Equipment sharing method and system scanning two-dimensional code based on two-dimensional code scanning
CN107370643A
Updating method and device of intelligent equipment, electronic equipment and storage medium
CN110727454A