Summary of the invention
The embodiment of the present invention provides a kind of terminal device and its system file update method, system and computer storage are situated between
Matter is able to carry out the automatic networking upgrading of terminal device, reduces the upgrading difficulty of terminal device and the expense cost of upgrading.
First aspect of the embodiment of the present invention provides a kind of system file update method of terminal device, including:
Execute the conversational traffic service of terminal device;
Down trigger service is executed when the service generates interruption, the down trigger service includes judging that terminal is set
The standby upgrade command for whether receiving server-side transmission;
Upgrading clothes are executed when down trigger service judges that terminal device receives the upgrade command of server-side transmission
Otherwise business restores the conversational traffic service of terminal device;
Wherein, the upgrade service includes that the target position of terminal device will be updated to from the received system file of server-side
It sets.
Optionally, the method also includes:
The telecommunication service for starting terminal device is established and the telecommunication of server-side;
Receive the data that server-side is sent by telecommunication service;
Whether the data of analysis service end transmission simultaneously judge comprising preset format in data, are to interrupt terminal device
Conversational traffic service.
Optionally, the terminal device includes micro-control unit, and the down trigger service specifically includes:
Whether analysis service end services the data sent by telecommunication and judges in data comprising upgrade command;
The method also includes:
Upgrade command is passed through when analysis service end includes upgrade command by the data that telecommunication service is sent
Otherwise micro-control unit executes other services of terminal device;
Optionally, the upgrade service specifically includes:
Micro-control unit parses the upgrade command and judges whether the upgrade command includes preset field, is to connect
Receive the system file that server-side is sent;
The system file is updated to target component;
Otherwise preset data is returned to server-side.
Optionally, the method also includes:
In terminal device, micro-control unit and server-side preset rules, the preset rules include presetting the upgrading
The rule of order presets the rule of the preset format, presets the rule of the preset field and presets the preset data
Rule;
According to preset rules initialization terminal equipment and micro-control unit;And
The information of registering terminal equipment is to server-side.
The described system file is updated to after target component further include:
Restore the conversational traffic service of terminal device.
Optionally, the preset field is the hardware identification code of terminal device, each hardware identification code and terminal device one
One is corresponding, and information to the server-side of the registering terminal equipment includes:
The hardware identification code of registering terminal equipment is to server-side.
Optionally, the described system file is updated to after target component further includes:
Delete the historical data that server-side is sent in terminal device.
Second aspect of the embodiment of the present invention provides a kind of terminal device, and the terminal device includes processor and deposits
Reservoir;
The memory is for storing executable program;
The processor is for executing the executable program to realize the system file of terminal device described above more
New method.
The third aspect of the embodiment of the present invention provides a kind of system for updating system file, including terminal described above
Equipment and server-side.
Fourth aspect of the embodiment of the present invention provides a kind of computer storage medium, deposits in the computer storage medium
Executable program is contained, realizes that the system file of terminal device described above updates when the executable program is performed
Method.
Implement the embodiment of the present invention, has the advantages that:
Provided in an embodiment of the present invention kind of terminal device and its system file update method, system and computer storage are situated between
Matter, by executing down trigger service when the conversational traffic service disruption of terminal device, down trigger service judges terminal device
The upgrade command for whether receiving server-side transmission, when down trigger service judges that terminal device receives server-side transmission
When upgrade command, by completing upgrading clothes by the target position of terminal device is updated to from the received system file of server-side
Business, thus allow for terminal device automatic networking upgrade, reduce terminal device upgrading difficulty and upgrading expense at
This.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not used to limit this hair
It is bright.In subsequent description, had using the suffix for indicating such as " module ", " component " or " unit " of element
Conducive to explanation of the invention, itself there is no specific meaning.Therefore, " module ", " component " or " unit " can mixedly make
With.
Terminal device can be implemented in a variety of manners.For example, terminal device described in the present invention is with networking function
Can and can store and execute any electronic equipment of computer program, for example, automotive diagnostic system, water meter, ammeter, gas meter, flow meter,
Car-mounted device, in addition to this it is possible to include such as mobile phone, tablet computer, laptop, palm PC, navigation device,
The fixed terminals such as the terminal devices such as wearable device, Intelligent bracelet, pedometer, and number TV, desktop computer.
Referring to Fig. 1, a kind of hardware structural diagram of its terminal device 100 of each embodiment to realize the present invention,
The terminal device 100 may include:Communication module 101, interface unit 102, memory 103, processor 110 and power supply
104 equal components.It will be understood by those skilled in the art that terminal device structure shown in Fig. 1 is not constituted to terminal device
It limits, terminal device may include perhaps combining certain components or different components than illustrating more or fewer components
Arrangement.
It is specifically introduced below with reference to all parts of the Fig. 1 to terminal device:
Communication module 101 can be used for receiving and sending messages or communication process in, signal sends and receivees.In general, communication module
101 include but is not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..This
Outside, communication module 101 can also be communicated with network and other equipment by wireless communication.Above-mentioned wireless communication, which can be used, appoints
One communication standard or agreement.
Interface unit 102 be used as at least one external device (ED) connect with terminal device 100 can by interface.For example,
External device (ED) may include wired network port, external power supply (or battery charger) port, wired or wireless data port,
Memory card port, the port for connecting the device with identification module.Interface unit 102 can be used for receiving from outside
The input (for example, data information, electric power etc.) of device and the input received is transferred in terminal device 100 one
A or multiple element can be used for transmitting data between terminal device 100 and external device (ED).
Memory 103 can be used for storing software program and various data.Memory 103 can mainly include storage program
Area and storage data area, wherein storing program area can application program needed for storage program area, at least one function etc..
Processor 110 is the control centre of terminal device, utilizes each of various interfaces and the entire terminal device of connection
A part by running or execute the software program and/or module that are stored in memory 103, and calls and is stored in storage
Data in device 103 execute the various functions and processing data of terminal device, to carry out integral monitoring to terminal device.Place
Managing device 110 includes that a micro-control unit 111 (Microcontroller Unit, MCU) and one or more processing are single
Member.
Terminal device 100 can also include the power supply 104 (such as battery) powered to all parts, it is preferred that power supply
114 can be logically contiguous by power-supply management system and processor 110, thus charged by power-supply management system realization management,
The functions such as electric discharge and power managed.
Embodiment to facilitate the understanding of the present invention, the communications network system that terminal device of the invention is based below
It is described.
Referring to Fig. 2, Fig. 2 is the system tray that a kind of terminal device 100 provided in an embodiment of the present invention updates system file
Composition, the system architecture include terminal device 100, server-side and a communication network, which includes at least one
Dedicated or common cable network, the hybrid network of wireless network or cable network and wireless network, to make terminal device
100 communicate with server-side 200, wherein when terminal device 100 accesses the communication system by wireless network, terminal device
100 access the communication network by communication module 101, when terminal device 100 accesses the communication system by cable network, eventually
End equipment 100 accesses the communication network by the wired network interface of interface unit 102.
Wherein, server-side 200 is to be stored with 100 recent systems file of terminal device and can establish with terminal device 100
It communicates and issues the documents and order to it and the computer equipment of receiving terminal apparatus data, including but not limited to, individually
Server, multiple server clusters partially store in the part memory space and multiple server clusters of individual server
The set in space.
Based on above-mentioned terminal device hardware structure and system architecture, each embodiment of the method for the present invention is proposed.
Fig. 3 show a kind of method flow of location information acquisition method first embodiment provided in an embodiment of the present invention
Figure.The location information acquisition method is applied to terminal device, and the terminal device can set for terminal shown in fig. 1 or fig. 2
It is standby.In the present embodiment, this approach includes the following steps S301-S303.
In step S301, the conversational traffic poll services of terminal device are executed.
Poll is how the processor decision of terminal device provides the mode of circumferential component service, and the process of poll is, by
Processor timing issues inquiry, sequentially inquires whether each circumferential component needs its service, has to give and service, service knot
Next periphery is inquired again after beam, then constantly in cycles.
In step s 302, down trigger service, the down trigger clothes are executed when the poll services generate interruption
Business includes judging whether terminal device receives the upgrade command of server-side transmission.
Down trigger service is arranged a series of when being control template generation interruption of the terminal device exclusively for terminal device
Method collection is completed by executing some the specific program finished in advance, specific for executing when interrupting and generating
Method and step imports some subprogram.
In the present embodiment, when processor, which interrupts, to be generated, terminal device is begun looking for orders with the presence or absence of preset upgrading
Enable, which is that server-side is sent to the specific format data or instruction of terminal device, the specific format by server-side and
Terminal device is arranged in advance, and is identified by terminal device according to agreement, which also includes the identity letter of server-side
Breath and temporal information.Down trigger service can judge that terminal device whether there is effective upgrade command according to agreement, such as
Effective upgrade command can be set to the upgrade command that server-side is sent immediately, be also possible to server-side in particular time range
The upgrade command of transmission.To avoid repeatedly upgrading, it is newest to guarantee that terminal device can obtain the terminal device that server-side stores
System file.
In step S303, when down trigger service judges that terminal device receives the upgrading life of server-side transmission
Upgrade service is executed when enabling, and otherwise restores the conversational traffic poll services of terminal device;
Wherein, upgrade service is also some the specific program finished in advance, the judgement including serial of methods step and
It executes, upgrade service is triggered by the specified conditions of down trigger service, when down trigger service judges that terminal device connects
When receiving the upgrade command of server-side transmission, which is satisfied, so that upgrade service is performed, upgrade service is executed
Method include that the target position of terminal device will be updated to from the received system file of server-side.
In the present embodiment, further comprising the steps of S401-S403.
In step S401, the telecommunication service for starting terminal device is established and the telecommunication of server-side.
Step S401 can be executed before step S301, and when executing before step S301, which be can wrap
It is contained among the conversational traffic poll services of terminal device, is established and led to according to specific frequency and server-side by terminal device timing
News.
In step S402, the data that server-side is sent by telecommunication service are received.
After establishing the communication of terminal device and server-side, server-side actively issues data, data packet to terminal device
The order, instruction or certain trigger for including preset format are also possible to other business datums of server-side and terminal device.
In step S403, whether the data that analysis service end is sent simultaneously judge in data comprising preset format, be then in
The conversational traffic poll services of disconnected terminal device.
When whether the data that server-side is sent include in preset format, such as data containing directly interruption terminal device
The trigger condition of conversational traffic poll services or the file of specific format, data, field or program code are by terminal
Equipment interrupts the trigger condition of the conversational traffic poll services of terminal device according to Program Generating compiled in advance, works as interruption
The trigger condition of the conversational traffic poll services of terminal device generates, and the conversational traffic poll services of terminal device are interrupted,
Step S302 is performed.
It in other embodiments of the present invention, can not also include step S403, step S302 is held by preset program
Row, such as terminal device timing generate a down trigger terminal device and check whether server-side has newest system file, have
Then server-side issues upgrade command, the number that upgrade command is sent included in the server-side of step S402 by telecommunication service
In, wherein system file also may be embodied in data of the server-side of step S402 by telecommunication service transmission,
To enable will be held from the target position that the received system file of server-side is updated to terminal device in step S303
Row.
Optionally, the terminal device includes micro-control unit, and step S302 down trigger service specifically includes, parsing
Whether server-side services the data sent by telecommunication and judges in data comprising upgrade command.
Upgrade command is passed through when analysis service end includes upgrade command by the data that telecommunication service is sent
Micro-control unit.
Terminal device is then executed when analysis service end does not include upgrade command by the data that telecommunication service is sent
Other service.
In the present embodiment, upgrade command is included in data of the server-side by telecommunication service transmission, but system
File is not included in data of the server-side by telecommunication service transmission, when terminal device analysis service end passes through remotely
The data that Communications service is sent simultaneously judge not execute upgrade service directly comprising upgrade command in data, but by upgrade command
When upgrade command passed through into micro-control unit further judged, to determine whether upgrade command corresponds to correspond to the end
The upgrade command of end equipment is then held when analysis service end does not include upgrade command by the data that telecommunication service is sent
Other services of row terminal device, which can be arranged in advance by terminal device and server-side, to guarantee terminal device liter
The safety of grade.
Optionally, micro-control unit parses the upgrade command and judges whether the upgrade command includes preset field,
It is the system file for receiving server-side transmission, otherwise returns preset data to server-side.
Wherein, step S303 is specifically, be updated to target component for the system file.
Optionally, this method further includes, described default in terminal device, micro-control unit and server-side preset rules
Rule includes presetting the rule of the upgrade command, presets the rule of the preset format, presets the rule of the preset field
And the rule of the preset data is preset, according to preset rules initialization terminal equipment and micro-control unit.And registration
For the information of terminal device to server-side, the described system file is updated to after target component further includes restoring terminal
The conversational traffic poll services of equipment.
Optionally, the preset field is the hardware identification code of terminal device, each hardware identification code and terminal device one
One is corresponding, and information to the server-side of the registering terminal equipment includes the hardware identification code of registering terminal equipment to server-side.Often
A hardware identification code is all uniquely, by judging whether hardware identification code correctly thereby may be ensured that server-side will not be to mistake
Terminal device sending system upgrade file accidentally.
Optionally, the described system file is updated to after target component further includes deleting in terminal device to service
Hold the historical data sent.Deleting the historical data that server-side is sent in terminal device is in order to avoid primary before terminal device
Upgrade command and system file generate and conflict with current upgrading, and prevent from accumulating multi-terminal equipment because of historical data
Capacity of memory device is more than limitation.
In the present embodiment, containing the terminal device of wireless communication module, aerial public network or dedicated network interface can be passed through
The server of Access Service Provider, each product have unique machine hardware identification number, server-side background server it is unified into
Row management, in server admin management, increasing terminal firmware edition upgrading business will be under upgrade command by air interface
The wireless communication module in terminal is issued, order is passed through the micro-control unit of terminal device by wireless communication module, by end
The micro-control unit of end equipment completes the system upgrade to target component.
Wireless communication module, the micro-control unit and target component of terminal device, a part as terminal device product
Composition, the business of terminal device product coordinated by micro-control unit United Dispatching, for interiors of products part firmware version it is remote
Journey upgrading is arranged a set of composition protocol standard agreement cooperation, is configured respectively in server-side, communication module, micro-control unit
And initialization, service software execute respective software service according to field standard agreement, complete remote system upgrade business.
It is above-mentioned it is found that the system file update method of terminal device provided in an embodiment of the present invention is by terminal device
Down trigger service is executed when conversational traffic poll services are interrupted, down trigger service judges whether terminal device receives clothes
The upgrade command that business end is sent leads to when down trigger service judges that terminal device receives the upgrade command of server-side transmission
The target position by terminal device is updated to from the received system file of server-side is crossed to complete upgrade service, so as into
The automatic networking of row terminal device upgrades, and reduces the upgrading difficulty of terminal device and the expense cost of upgrading.
Fig. 5 show a kind of structural schematic diagram of terminal device provided in an embodiment of the present invention.As shown in figure 5, terminal is set
It is standby include processor 110 (quantity of the processor 110 in terminal can be one or more, and Fig. 5 takes a processor as an example) with
And memory 103.In an embodiment of the present invention, processor 110, memory 103 can be connected by bus or other means,
Wherein, in Fig. 5 for being connected by bus.
Wherein, executable program is stored in memory 103, processor 110 executes the executable program to realize such as
Lower step:
Execute the conversational traffic poll services of terminal device 100;
Down trigger service is executed when the poll services generate interruption, the down trigger is serviced including judgement eventually
Whether end equipment 100 receives the upgrade command of the transmission of server-side 200;
The execution when down trigger service judges that terminal device 100 receives the upgrade command of the transmission of server-side 200
Otherwise upgrade service restores the conversational traffic poll services of terminal device 100;
Wherein, the upgrade service includes that will be updated to terminal device 100 from the received system file of server-side 200
Target position.
Optionally, the method also includes:
The telecommunication service for starting terminal device 100 is established and the telecommunication of server-side 200;
Receive the data that server-side 200 is sent by telecommunication service;
Whether the data of the transmission of analysis service end 200 simultaneously judge comprising preset format in data, are to interrupt terminal device
Conversational traffic poll services.
Optionally, the terminal device 100 includes micro-control unit 111, and the down trigger service specifically includes:
Whether analysis service end 200 services the data sent by telecommunication and judges in data comprising upgrade command;
The method also includes:
It is when analysis service end 200 includes upgrade command by the data that telecommunication service is sent that upgrade command is saturating
It is transmitted to micro-control unit 111, otherwise executes other services of terminal device 100;
Optionally, the upgrade service specifically includes:
Micro-control unit 111 parses the upgrade command and judges whether the upgrade command includes preset field, is then
Receive the system file that server-side 200 is sent;
The system file is updated to target component;
Otherwise preset data is returned to server-side 200.
Optionally, the method also includes:
In 200 preset rules of terminal device 100,111 yuan of microcontroller list and server-side, the preset rules include pre-
If the rule of the upgrade command presets the rule of the preset format, the regular and default institute of the preset field is preset
State the rule of preset data;
According to preset rules initialization terminal equipment 100 and micro-control unit 111;And
The information of registering terminal equipment 100 is to server-side 200.
The described system file is updated to after target component further include:
Restore the conversational traffic poll services of terminal device 100.
Optionally, the preset field is the hardware identification code of terminal device, each hardware identification code and terminal device one
One is corresponding, and information to the server-side 200 of the registering terminal equipment 100 includes:
The hardware identification code of registering terminal equipment 100 is to server-side 200.
Optionally, the described system file is updated to after target component further includes:
Delete the historical data that server-side 200 is sent in terminal device 100.
It is above-mentioned it is found that terminal device provided in an embodiment of the present invention, by the conversational traffic poll services of terminal device
Down trigger service is executed when disconnected, down trigger service judges whether terminal device receives the upgrade command of server-side transmission,
When down trigger service judge that terminal device receives the upgrade command that server-side is sent, by will be received from server-side
System file is updated to the target position of terminal device to complete upgrade service, thus allows for the automatic of terminal device
Net upgrading, reduces the upgrading difficulty of terminal device and the expense cost of upgrading.
As shown in Fig. 2, the embodiment of the invention also provides a kind of system for updating system file, including the present invention is implemented
200 of terminal device 100 and service in example, to realize the system file update side of terminal device as Figure 3-Figure 4
Method.
The embodiment of the invention also provides a kind of computer storage medium, the computer storage medium, which is stored with, to be held
Line program, the executable program realize following steps when being performed:
Execute the conversational traffic poll services of terminal device 100.
Down trigger service is executed when the poll services generate interruption, the down trigger is serviced including judgement eventually
Whether end equipment 100 receives the upgrade command of the transmission of server-side 200,
The execution when down trigger service judges that terminal device 100 receives the upgrade command of the transmission of server-side 200
Otherwise upgrade service restores the conversational traffic poll services of terminal device 100,
Wherein, the upgrade service includes that will be updated to terminal device 100 from the received system file of server-side 200
Target position.
Optionally, the executable program can also be used to execute the system to realize terminal device as Figure 3-Figure 4
File updating method, this will not be repeated here.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant be intended to it is non-
It is exclusive to include, so that the process, method, article or the device that include a series of elements not only include those elements,
It but also including other elements that are not explicitly listed, or further include for this process, method, article or device institute
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or device including the element.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but many situations
It is lower the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to the prior art
The part to contribute can be embodied in the form of software products, which is stored in a storage and is situated between
In matter (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, clothes
Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned tools
Body embodiment, the above mentioned embodiment is only schematical, rather than restrictive, the ordinary skill of this field
Personnel under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, can also make
Many forms, all of these belong to the protection of the present invention.