CN108874344A - A kind of method for refreshing data, terminal device and computer-readable medium - Google Patents

A kind of method for refreshing data, terminal device and computer-readable medium Download PDF

Info

Publication number
CN108874344A
CN108874344A CN201810627595.1A CN201810627595A CN108874344A CN 108874344 A CN108874344 A CN 108874344A CN 201810627595 A CN201810627595 A CN 201810627595A CN 108874344 A CN108874344 A CN 108874344A
Authority
CN
China
Prior art keywords
interface
data
key
mentioned
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810627595.1A
Other languages
Chinese (zh)
Other versions
CN108874344B (en
Inventor
刘均
刘新
兰飞
李向煜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tyre Automobile Maintenance Technology Co Ltd
Original Assignee
Shenzhen Tyre Automobile Maintenance Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tyre Automobile Maintenance Technology Co Ltd filed Critical Shenzhen Tyre Automobile Maintenance Technology Co Ltd
Priority to CN201810627595.1A priority Critical patent/CN108874344B/en
Publication of CN108874344A publication Critical patent/CN108874344A/en
Application granted granted Critical
Publication of CN108874344B publication Critical patent/CN108874344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration

Abstract

The embodiment of the invention discloses a kind of method for refreshing data, terminal device and computer-readable medium, wherein method includes:When receiving the first data of slave computer transmission, by first data storage into first interface.Then the first data in the first interface and the data in second interface, wherein the data in the second interface are the data that display interface is currently shown.Finally data identical with the data in the second interface in the first interface are handled, using display interface described in treated in first interface Refresh Data.It will be filtered out in the data flow of slave computer upload with current display interface repeated data, then only changed data are refreshed and is stored, it can reduce the spending of memory space, and when slave computer and host computer are communicated, issuable host computer memory in data stream frequent transmission is avoided to overflow, to be to guarantee that display interface is smooth.

Description

A kind of method for refreshing data, terminal device and computer-readable medium
Technical field
The present invention relates to car data Flow Technique field more particularly to a kind of method for refreshing data, terminal device and calculating Machine readable medium.
Background technique
Car data stream refers to the data parameters that electronic control unit (ECU) is exchanged with sensor and actuator, institute in ECU The data flow of memory really reflects the operating voltage and state of each sensor and actuator, provides for automobile failure diagnosis Foundation.Then car data stream is uploaded to host computer by bluetooth connection host computer by reading car data stream by slave computer. Host computer establishes a connection reception data flow by bluetooth, parses data according to communications protocol and is converted into readable car condition Real time data.
After host computer and slave computer establish connection, in communication process, since (including, for example, speed, revolving speed is cold for data flow But the data such as liquid temperature) real-time update is needed, slave computer generally requires to issue a plurality of data frame in 1 second to host computer.If Data flow does not stop to receive data storage, it is easy to host computer memory be caused to overflow.
Summary of the invention
The embodiment of the present invention provides a kind of method for refreshing data, when slave computer and host computer can be made to communicate, avoids counting Issuable host computer memory overflows in frequently sending according to stream, to be to guarantee that display interface is smooth.
In a first aspect, the embodiment of the invention provides a kind of method for refreshing data, this method includes:
When receiving the first data of slave computer transmission, by first data storage into first interface;
Compare the data in the first data and second interface in the first interface, wherein in the second interface Data are the data that display interface is currently shown;
Data identical with the data in the second interface in the first interface are handled;
Using display interface described in treated in first interface Refresh Data.
Optionally, it is described by first data storage into first interface before, the method also includes:
Judge whether first data are received first frame data;
If so, showing first data storage into the second interface, and by first data in institute State display interface.
Optionally, it is described by first data storage into first interface after, connect described first Include before the first data in mouthful and the data in second interface:
Judge whether the first interface is equal to the second interface;
If it is not, then executing the data in the first data and second interface in the first interface.
Further, the first data stored in the first interface include key and value, the first interface In the first data and second interface in data, including:
The key in the second interface successively is traversed with the key in the first interface, with the first interface and institute State the corresponding value of each key in second interface;
If there are the corresponding value of identical key is equal in the first interface and the second interface, it is determined that the key-value pair For data identical with the data in the second interface in the first interface;
It is described to data identical with the data in the second interface in the first interface carry out processing include:
Delete in the first interface with identical key-value pair in the key-value pair of the second interface.
Optionally, the key in the second interface successively is traversed with the key in the first interface described, to compare After stating the corresponding key assignments of each key in first interface and the second interface, the method also includes
It, will be described if the corresponding value of the first interface and but key identical there are key in the second interface is unequal The corresponding value of the key replaces with the corresponding value of the key in first interface in second interface;
Alternatively, if there are the keys being not present in second interface in the first interface, by the key in the first interface Value is to being added in the second interface.
Second aspect, the embodiment of the invention provides a kind of terminal device, which includes:
Storage unit, for when receiving the first data of slave computer transmission, first data to be stored to first In interface;
Comparing unit, for the data in the first data and second interface in the first interface, wherein described Data in second interface are the data that display interface is currently shown;
Processing unit, to data identical with the data in the second interface in the first interface Reason;
Refresh unit, for using display interface described in treated in first interface Refresh Data.
Optionally, the terminal device further includes:
First judging unit, for judging whether first data are received first frame data;
The storage unit is also used in the case where first judging unit is judged as YES, by first data It stores in the second interface;
Display unit, for showing first data in the display interface.
Optionally, the terminal device further includes:
Second judgment unit, for judging whether the first interface is equal to the second interface;
The comparing unit, in the case where the second judgment unit is judged as NO, the first interface In the first data and second interface in data.
Further, the comparing unit includes:
Traversal Unit, for successively traversing the key in the second interface with the key in the first interface, to compare State the corresponding value of each key in first interface and the second interface;
Determination unit, if in the first interface and the second interface there are identical key it is corresponding value it is equal, Then determine that the key-value pair is data identical with the data in the second interface in the first interface;
The processing unit, for delete in the first interface with identical key assignments in the key-value pair of the second interface It is right.
Optionally, the terminal device further includes:
Replacement unit, if for the first interface with but key identical there are key in the second interface it is corresponding value not It is equal, then the corresponding value of the key in the second interface is replaced with into the corresponding value of the key in first interface;
Adding unit, if being connect for there are the keys being not present in second interface in the first interface by described first The key-value pair is added in the second interface in mouthful.
The third aspect, the embodiment of the invention provides another terminal device, including processor, input equipment, output are set Standby and memory, the processor, input equipment, output equipment and memory are connected with each other, wherein the memory is for depositing Storage supports terminal device to execute the computer program of the above method, and the computer program includes program instruction, the processor It is configured for calling described program instruction, the method for executing above-mentioned first aspect.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer storage medium It is stored with computer program, the computer program includes program instruction, and described program instruction makes institute when being executed by a processor State the method that processor executes above-mentioned first aspect.
In embodiments of the present invention, when receiving the first data of slave computer transmission, the first data storage is arrived In first interface.Then the first data in the first interface and the data in second interface, wherein described second connects Data in mouthful are the data that display interface is currently shown.Finally in the first interface with the data in the second interface Identical data are handled, using display interface described in treated in first interface Refresh Data.By this hair Bright embodiment when slave computer and host computer can be made to communicate, avoids in data stream frequent transmission in issuable host computer Spilling is deposited, to be to guarantee that display interface is smooth.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of schematic flow diagram of method for refreshing data provided in an embodiment of the present invention;
Fig. 2 is the schematic flow diagram of another method for refreshing data provided in an embodiment of the present invention;
Fig. 3 is the schematic flow diagram of another method for refreshing data provided in an embodiment of the present invention
Fig. 4 is a kind of schematic block diagram of terminal device provided in an embodiment of the present invention;
Fig. 5 be another embodiment of the present invention provides a kind of terminal schematic block diagram.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, terminal device described in the embodiment of the present invention is including but not limited to such as with the sensitive table of touch Mobile phone, laptop computer or the tablet computer in face (for example, touch-screen display and/or touch tablet) etc it is other Portable device.It is to be further understood that in certain embodiments, the equipment is not portable communication device, but is had The desktop computer of touch sensitive surface (for example, touch-screen display and/or touch tablet).
In following discussion, the terminal device including display and touch sensitive surface is described.However, should manage Solution, terminal device may include that one or more of the other physical User of such as physical keyboard, mouse and/or control-rod connects Jaws equipment.
Terminal device supports various application programs, such as one of the following or multiple:Drawing application program, demonstration application Program, word-processing application, website creation application program, disk imprinting application program, spreadsheet applications, game are answered With program, telephony application, videoconference application, email application, instant messaging applications, forging Refining supports application program, photo management application program, digital camera application program, digital camera application program, web-browsing to answer With program, digital music player application and/or video frequency player application program.
At least one of such as touch sensitive surface can be used in the various application programs that can be executed on the terminal device Public physical user-interface device.It can be adjusted among applications and/or in corresponding application programs and/or change touch is quick Feel the corresponding information shown in the one or more functions and terminal device on surface.In this way, the public physics frame of terminal device Structure (for example, touch sensitive surface) can be supported various using journey with user interface intuitive and transparent for a user Sequence.
It is a kind of schematic flow diagram of method for refreshing data provided in an embodiment of the present invention referring to Fig. 1, Fig. 1, as shown in the figure This method may include:
101:When receiving the first data of slave computer transmission, by the storage of above-mentioned first data into first interface.
Car data stream refers to the data parameters that electronic control unit (ECU) is exchanged with sensor and actuator, including cold But diagnostic equipment can be used to read for the information such as liquid temperature, engine speed, engine load, per engine cycle injection duration It takes, provides foundation for automobile failure diagnosis.When automobile breaks down, the event of automobile can be detected by reading car data stream Barrier point;When without failure, failure can be prevented by reading the working condition of car data stream detection automobile.Slave computer By reading car data stream, car data stream is then uploaded to by host computer by bluetooth connection host computer.Host computer passes through Bluetooth establishes a connection reception data flow, parses data according to communications protocol and is converted into readable car condition real time data. After host computer and slave computer establish connection, in communication process, since data flow needs real-time update, slave computer is generally required A plurality of data frame is issued in 1 second to host computer.
In embodiments of the present invention, when host computer receives the first data of slave computer transmission, by above-mentioned first data It stores in first interface.
Wherein, above-mentioned first data are the frame data that slave computer is uploaded to host computer, may include in first data The information such as coolant temperature, engine speed, engine load, per engine cycle injection duration.
Wherein, in above-mentioned first interface when storing data, including multiple keys and corresponding value in interface, such as It may include key1, value1, key2, value2, key/3, value3 ... in map interface
Specifically, after above-mentioned host computer receives above-mentioned first data, by above-mentioned first data storage to above-mentioned the In one interface.It is understood that when storing above-mentioned first data, individual data in above-mentioned first data is corresponding to be built (key) it is fixed, such as includes coolant temperature, engine speed, engine load, then coolant liquid in above-mentioned first data The fixed corresponding key1 of temperature, the fixed corresponding key2 of engine revolution, the fixed corresponding key3 of engine load.
102:The data in the first data and second interface in more above-mentioned first interface.
Wherein, the data in above-mentioned second interface are the data that display interface is currently shown
In embodiments of the present invention, when above-mentioned host computer receives the first data, and by the storage of above-mentioned first data to upper After stating in first interface, the data in the data and above-mentioned second interface in above-mentioned first interface are compared, to mention Part different with the data that current display interface is shown in above-mentioned first data is taken out, or is extracted in above-mentioned first data With the same section in the data in above-mentioned second interface;It finds out in the data of subsequent upload and current display interface shows The partial data that data have changed to use the data to have changed to go to refresh display interface, and does not have to show The data refresh all at interface.
103:Data identical with the data in above-mentioned second interface in above-mentioned first interface are handled.
In embodiments of the present invention, the number in the first data and second interface in above-mentioned first interface According to obtaining in above-mentioned first data and after the same section data of the data in above-mentioned second interface, by above-mentioned first interface In data in the same section data delete, i.e., so that the data in above-mentioned first interface leave behind and compare with display interface The data changed.
104:Using treated in the above-mentioned first interface above-mentioned display interface of Refresh Data.
In embodiments of the present invention, above-mentioned to number identical with the data in above-mentioned second interface in above-mentioned first interface After being handled, using treated in the above-mentioned first interface above-mentioned display interface of Refresh Data.
Specifically, when will be deleted in above-mentioned first interface with the data of the data same section in above-mentioned second interface, on It states after the data in first interface leave behind the data compared and changed with display interface, using in above-mentioned first interface Data go to refresh the data of display interface.It, will be in display interface and above-mentioned first interface wherein when refreshing above-mentioned display interface In the corresponding data of data replace with the data in first interface, display interface others data remain unchanged.
As can be seen that in embodiments of the present invention, after the first data for receiving slave computer transmission, by above-mentioned first data It stores in first interface.Then the first data in more above-mentioned first interface and the data in second interface, wherein above-mentioned Data in second interface are the data that display interface is currently shown.Finally in above-mentioned first interface and in above-mentioned second interface The identical data of data handled, using treated in the above-mentioned first interface above-mentioned display interface of Refresh Data.It is logical The embodiment of the present invention is crossed, will be filtered out in the data flow of slave computer upload with current display interface repeated data, then only to hair The data for changing are refreshed and are stored, and can reduce the spending of memory space, and when slave computer and host computer are communicated, Issuable host computer memory in data stream frequent transmission is avoided to overflow, to be to guarantee that display interface is smooth.
Referring to fig. 2, Fig. 2 is a kind of schematic flow diagram of method for refreshing data provided in an embodiment of the present invention, as shown in the figure This method may include:
201:Receive the first data that slave computer is sent.
Wherein, above-mentioned first data are the frame data that slave computer is uploaded to host computer, may include in first data The information such as coolant temperature, engine speed, engine load, per engine cycle injection duration.
202:Judge above-mentioned first data whether be slave computer upload the first frame data.
Specifically, whether judging above-mentioned first data after host computer receives the first data that above-mentioned slave computer is sent Above-mentioned first data are stored to upper if the first frame data when above-mentioned first data for the first frame data that slave computer uploads It states in second interface, and above-mentioned first data is shown in above-mentioned display interface;If above-mentioned first data are not the first frame data, Then follow the steps 203.
It is above-mentioned " to store above-mentioned first data into above-mentioned second interface, and by above-mentioned the wherein it is possible to understand One data are shown in above-mentioned display interface " the execution sequencing embodiment of the present invention of two steps is not construed as limiting.It can first hold It is about to the storage of the first data into above-mentioned second interface, then executes and show above-mentioned first data in display interface;It can also be with It first carries out and shows above-mentioned first data in above-mentioned display interface, then execute and connect the storage of above-mentioned first data to above-mentioned second In mouthful;It can be executed parallel with the two.
203:By the storage of above-mentioned first data into first interface.
204:Judge whether above-mentioned first interface is equal to above-mentioned second interface.
Specifically, judging that above-mentioned first connects after host computer stores above-mentioned first data into above-mentioned first interface Whether mouth, which is equal to above-mentioned second interface, is removed the data in first interface, so if above-mentioned first interface and second interface are equal After wait next frame data and store;If above-mentioned first interface and above-mentioned second interface are unequal, step 205 is continued to execute.
Wherein, judge above-mentioned first interface and the equal condition of above-mentioned second interface for above-mentioned first interface and above-mentioned second All keys in interface are all equal, and the corresponding value of all keys is also equal.
205:The key in above-mentioned second interface successively is traversed with the key in above-mentioned first interface, with more above-mentioned first interface Value corresponding with key each in above-mentioned second interface.
Specifically, successively removing to traverse the key in above-mentioned second interface with the total key of above-mentioned first interface come more above-mentioned first The corresponding value of each key in interface and above-mentioned second interface.It such as include engine speed and coolant temperature in first interface The built-in value pair of two data then checks second interface with the key that the corresponding key of engine speed is gone in traversal second interface respectively In whether have engine speed and the corresponding key of coolant temperature, if so, then comparing the value and cooling of two engine speed Whether the value of liquid temperature changes.
206:If there are the corresponding value of identical key is equal in above-mentioned first interface and above-mentioned second interface, it is determined that the key Value is to for data identical with the data in above-mentioned second interface in above-mentioned first interface.
207:Delete in above-mentioned first interface with identical key-value pair in the key-value pair of above-mentioned second interface.
For example, all there are the data of engine speed in above-mentioned first interface and above-mentioned second interface, and engine speed Value it is also equal, the corresponding key-value pair of engine speed be above-mentioned first interface in it is identical with the data in above-mentioned second interface The corresponding key-value pair of engine speed in above-mentioned first interface is deleted, is not brushed when display interface to refresh later by data The data of new engine revolving speed.
In practical applications, it is possible to which previous frame data are compared with next frame data, in next frame data on more one The case where stating the data being not present in a frame data, such as current display interface only have the number of engine speed and coolant temperature According to, current more per engine cycle injection durations from the received data of slave computer, when refresh display interface it Display interface also will increase the data of per engine cycle injection duration afterwards.Therefore, in order to enable in above-mentioned second interface Data and the data of display interface be consistent, need for above-mentioned per engine cycle injection duration to be also added to above-mentioned In second interface.
As an alternative embodiment, successively traversing the second interface with the key in above-mentioned first interface above-mentioned In key, after the corresponding key assignments of key each in the first interface and the second interface, if above-mentioned first interface Value corresponding with but key identical there are key in above-mentioned second interface is unequal, then by the corresponding value of the key in above-mentioned second interface Replace with the corresponding value of the key in first interface;If, will be upper there are the key being not present in second interface in above-mentioned first interface The key-value pair in first interface is stated to be added in above-mentioned second interface.
For example, above-mentioned first interface is map1, and above-mentioned second interface is map2.Wherein the data in map1 are ((key1, value5), (key2, value6), (key3, value3), (key5, value7)), the data in map2 are ((key1, value1), (key2, value2), (key3, value3), (key4, value4)).Such as the corresponding hair of above-mentioned key1 The revolution of motivation, value1 are its specific corresponding numerical value.It goes to traverse with key1, key2, key3, key5 in above-mentioned map1 Key1, key2, key3, key5 in map2 judge to build in map1 and map2 with the presence or absence of equal.If when traversal in map2 There is no the keys equal with the key traversed in map1, then the corresponding value of the key in map1 are added in map2.If There are equal keys, then continue to judge whether its corresponding value is equal;If equal, the corresponding value of the key in map1 is deleted It removes;If unequal, the corresponding value of the key in map2 is replaced with into the corresponding value of the key in map1.It is found after traversal, There are three equal key key1, key2, key3 in map1 and map2, the key equal with key5 is not present in map2.Therefore, pass through After traversal and corresponding processing, the data in map1 be ((key1, value5), (key2, value6), (key5, Value7)), the data in map2 be ((key1, value5), (key2, value6), (key3, value3), (key4, Value4), (key5, value7)).
208:Using treated in the above-mentioned first interface above-mentioned display interface of Refresh Data.
In order to enable the data of data and display interface in above-mentioned second interface are consistent, as another optional Embodiment, can it is above-mentioned using treated in the above-mentioned first interface above-mentioned display interface of Refresh Data after, in use Stating in first interface treated, data go to update the data in above-mentioned second interface.
As can be seen that in embodiments of the present invention, after the first data for receiving slave computer transmission, by above-mentioned first data It stores in first interface.Then the first data in more above-mentioned first interface and the data in second interface, wherein above-mentioned Data in second interface are the data that display interface is currently shown.Finally in above-mentioned first interface and in above-mentioned second interface The identical data of data handled, using treated in the above-mentioned first interface above-mentioned display interface of Refresh Data.It is logical The embodiment of the present invention is crossed, will be filtered out in the data flow of slave computer upload with current display interface repeated data, then only to hair The data for changing are refreshed and are stored, and can reduce the spending of memory space, and when slave computer and host computer are communicated, Issuable host computer memory in data stream frequent transmission is avoided to overflow, to be to guarantee that display interface is smooth.
It is the schematic flow diagram of another method for refreshing data provided in an embodiment of the present invention referring to Fig. 3, Fig. 3, as schemed institute Show that this method may include:
In embodiments of the present invention, above-mentioned first interface is map1, and above-mentioned second interface is map2.
301:Receive the first data of slave computer transmission.
Wherein, above-mentioned first data are the frame data that slave computer is uploaded to host computer, may include in first data The information such as coolant temperature, engine speed, engine load, per engine cycle injection duration.
302:Judge whether above-mentioned first data are the first frame data.
Specifically, the value X of determining device is determined after receiving above-mentioned first data, as the value X=0 of above-mentioned determining device When, it is determined that above-mentioned first data are the first frame data;As the value X=1 of above-mentioned determining device, it is determined that above-mentioned first data are not It is the first frame data.
If the first frame data when above-mentioned first data, then follow the steps 304;If above-mentioned first data are not the first frame numbers According to thening follow the steps 303.
303:By the storage of above-mentioned first data into above-mentioned map1.
304:The storage of above-mentioned first data is shown into above-mentioned map2, and by above-mentioned first data in above-mentioned display circle Face.
305:Judge whether above-mentioned map1 and map2 is equal.
Specifically, judging above-mentioned map1 and map2 after host computer stores above-mentioned first data into above-mentioned map1 It is whether equal, if above-mentioned map1 and map2 are equal, 306 are thened follow the steps, next frame data is then waited and stores;If above-mentioned One interface and above-mentioned second interface are unequal, then continue to execute step 307.
306:Remove the data in map1.
307:The key in traversal map2 successively is removed with the key in map1, judges whether there is key1nAnd key2mIt is equal.
Wherein, key1nFor the key in map1, n is the number of key in map1, key1mFor the key in map2, m is key in map2 Number.
Key if it exists1nAnd key2mIt is equal, 308 are thened follow the steps, if it does not exist key1nAnd key2mIt is equal to then follow the steps 309。
308:Judge value1nAnd value2mIt is whether equal.
Wherein, value1nFor key1nCorresponding value, value2mFor key2mCorresponding value.
If value1nAnd value2mIt is unequal, 310 are thened follow the steps, if value1nAnd value2mIt is equal, it thens follow the steps 311。
309:By the key in map11nAnd value1nIt is added in map2.
310:By the value in map22mReplace with the value in map11n
311:By the key in map11nAnd value1nIt deletes.
312:Use the Refresh Data display interface in map1.
After refreshing display interface, the data in map1 are removed.
As can be seen that in embodiments of the present invention, after the first data for receiving slave computer transmission, by above-mentioned first data It stores in first interface.Then the first data in more above-mentioned first interface and the data in second interface, wherein above-mentioned Data in second interface are the data that display interface is currently shown.Finally in above-mentioned first interface and in above-mentioned second interface The identical data of data handled, using treated in the above-mentioned first interface above-mentioned display interface of Refresh Data.It is logical The embodiment of the present invention is crossed, will be filtered out in the data flow of slave computer upload with current display interface repeated data, then only to hair The data for changing are refreshed and are stored, and can reduce the spending of memory space, and when slave computer and host computer are communicated, Issuable host computer memory in data stream frequent transmission is avoided to overflow, to be to guarantee that display interface is smooth.
The embodiment of the present invention also provides a kind of terminal device, which is used to execute any one of aforementioned above-mentioned method Unit.Specifically, referring to fig. 4, Fig. 4 is a kind of schematic block diagram of terminal device provided in an embodiment of the present invention.The present embodiment Terminal device include:Storage unit 410, comparing unit 420, processing unit 430, refresh unit 440.
Storage unit 410, for when receiving the first data of slave computer transmission, above-mentioned first data to be stored to the In one interface;
Comparing unit 420, for the data in the first data and second interface in more above-mentioned first interface, wherein Data in above-mentioned second interface are the data that display interface is currently shown;
Processing unit 430, for being carried out to data identical with the data in above-mentioned second interface in above-mentioned first interface Processing;
Refresh unit 440, for using treated in the above-mentioned first interface above-mentioned display interface of Refresh Data.
Optionally, above-mentioned terminal device further includes:
First judging unit 450, for judging whether above-mentioned first data are received first frame data;
Said memory cells 410 are also used in the case where above-mentioned first judging unit is judged as YES, by above-mentioned first number According to storage into above-mentioned second interface;
Display unit 460, for showing above-mentioned first data in above-mentioned display interface.
Optionally, above-mentioned terminal device further includes:
Second judgment unit 470, for judging whether above-mentioned first interface is equal to above-mentioned second interface;
Above-mentioned comparing unit, in the case where above-mentioned second judgment unit is judged as NO, more above-mentioned first interface In the first data and second interface in data.
Further, above-mentioned comparing unit includes:
Traversal Unit 421, for successively traversing the key in above-mentioned second interface with the key in above-mentioned first interface, to compare The corresponding value of each key in above-mentioned first interface and above-mentioned second interface;
Determination unit 422, if for there are the corresponding value phases of identical key in above-mentioned first interface and above-mentioned second interface Deng, it is determined that the key-value pair is data identical with the data in above-mentioned second interface in above-mentioned first interface;
Above-mentioned processing unit 430, it is identical with the key-value pair of above-mentioned second interface in above-mentioned first interface for deleting Key-value pair.
Optionally, above-mentioned processing unit further includes:
Replacement unit 431, if corresponding with but key identical there are key in above-mentioned second interface for above-mentioned first interface It is worth unequal, then the corresponding value of the key in above-mentioned second interface is replaced with into the corresponding value of the key in first interface;
Adding unit 432, if for there are the keys being not present in second interface in above-mentioned first interface, by above-mentioned first The key-value pair is added in above-mentioned second interface in interface.
As can be seen that in embodiments of the present invention, after the first data for receiving slave computer transmission, by above-mentioned first data It stores in first interface.Then the first data in more above-mentioned first interface and the data in second interface, wherein above-mentioned Data in second interface are the data that display interface is currently shown.Finally in above-mentioned first interface and in above-mentioned second interface The identical data of data handled, using treated in the above-mentioned first interface above-mentioned display interface of Refresh Data.It is logical The embodiment of the present invention is crossed, will be filtered out in the data flow of slave computer upload with current display interface repeated data, then only to hair The data for changing are refreshed and are stored, and can reduce the spending of memory space, and when slave computer and host computer are communicated, Issuable host computer memory in data stream frequent transmission is avoided to overflow, to be to guarantee that display interface is smooth.
Referring to Fig. 5, be another embodiment of the present invention provides a kind of terminal schematic block diagram.In the present embodiment as shown in the figure Terminal may include:One or more processors 501;One or more input equipments 502, one or more output equipments 503 and memory 504.Above-mentioned processor 501, input equipment 502, output equipment 503 and memory 504 are connected by bus 505 It connects.Memory 502 includes program instruction for storing computer program, above-mentioned computer program, and processor 501 is deposited for executing The program instruction that reservoir 502 stores.Wherein, processor 501 is configured for calling above procedure instruction execution:When receiving down When the first data that position machine is sent, by the storage of above-mentioned first data into first interface;First in more above-mentioned first interface Data in data and second interface, wherein the data in above-mentioned second interface are the data that display interface is currently shown;To upper Data identical with the data in above-mentioned second interface in first interface are stated to be handled;Using the processing in above-mentioned first interface The above-mentioned display interface of Refresh Data afterwards.
It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at Reason device is also possible to any conventional processor etc..
Input equipment 502 may include that Trackpad, fingerprint adopt sensor (for acquiring the finger print information and fingerprint of user Directional information), microphone etc., output equipment 503 may include display (LCD etc.), loudspeaker etc..
The memory 504 may include read-only memory and random access memory, and to processor 401 provide instruction and Data.The a part of of storage 504 can also include nonvolatile RAM.For example, memory 504 can also store The information of device type.
In the specific implementation, processor 501 described in the embodiment of the present invention, input equipment 502, output equipment 503 can Execute realization described in the first embodiment and second embodiment of a kind of method for refreshing data provided in an embodiment of the present invention The implementation of terminal described in the embodiment of the present invention also can be performed in mode, and details are not described herein.
A kind of computer readable storage medium, above-mentioned computer-readable storage medium are provided in another embodiment of the invention Matter is stored with computer program, and above-mentioned computer program includes program instruction, realization when above procedure instruction is executed by processor: When receiving the first data of slave computer transmission, by the storage of above-mentioned first data into first interface;More above-mentioned first connects The data in the first data and second interface in mouthful, wherein the data in above-mentioned second interface are that display interface is currently shown Data;Data identical with the data in above-mentioned second interface in above-mentioned first interface are handled;Using above-mentioned first Treated in the interface above-mentioned display interface of Refresh Data.
Above-mentioned computer readable storage medium can be the internal storage unit of the above-mentioned terminal of aforementioned any embodiment, example Such as the hard disk or memory of terminal.Above-mentioned computer readable storage medium is also possible to the External memory equipment of above-mentioned terminal, such as The plug-in type hard disk being equipped in above-mentioned terminal, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, above-mentioned computer readable storage medium can also be wrapped both The internal storage unit for including above-mentioned terminal also includes External memory equipment.Above-mentioned computer readable storage medium is above-mentioned for storing Other programs and data needed for computer program and above-mentioned terminal.Above-mentioned computer readable storage medium can be also used for temporarily When store the data that has exported or will export.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, the end of foregoing description The specific work process of equipment and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed terminal device and method, Ke Yitong Other modes are crossed to realize.For example, the apparatus embodiments described above are merely exemplary, for example, said units are drawn Point, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can To combine or be desirably integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING of device or unit or Communication connection is also possible to electricity, mechanical or other form connections.
Above-mentioned unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, is also possible to two or more units and is integrated in one unit.It is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment above method of the present invention Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (10)

1. a kind of method for refreshing data, which is characterized in that including:
When receiving the first data of slave computer transmission, by first data storage into first interface;
Compare the data in the first data and second interface in the first interface, wherein the data in the second interface The data currently shown for display interface;
Data identical with the data in the second interface in the first interface are handled;
Using display interface described in treated in first interface Refresh Data.
2. the method according to claim 1, wherein first data are stored into first interface described Before, the method also includes:
Judge whether first data are received first frame data;
If so, by first data storage into the second interface, and first data are shown and are shown described Show interface.
3. the method according to claim 1, wherein first data are stored into first interface described Later, include before the first data in the first interface and the data in second interface:
Judge whether the first interface is equal to the second interface;
If it is not, then executing the data in the first data and second interface in the first interface.
4. method according to claim 1-3, which is characterized in that the first data stored in the first interface Including key and value, the first data in the first interface and the data in second interface, including:
The key in the second interface successively is traversed with the key in the first interface, with the first interface and described The corresponding value of each key in two interfaces;
If there are the corresponding value of identical key is equal in the first interface and the second interface, it is determined that the key-value pair is institute State data identical with the data in the second interface in first interface;
It is described to data identical with the data in the second interface in the first interface carry out processing include:
Delete in the first interface with identical key-value pair in the key-value pair of the second interface.
5. according to the method described in claim 4, it is characterized in that, successively traversing institute with the key in the first interface described The key in second interface is stated, it is described after the corresponding key assignments of key each in the first interface and the second interface Method further includes
If the corresponding value of the first interface and but key identical there are key in the second interface is unequal, by described second The corresponding value of the key replaces with the corresponding value of the key in first interface in interface;
Alternatively, if there are the keys being not present in second interface in the first interface, by the key-value pair in the first interface It is added in the second interface.
6. a kind of terminal device, special type are, including:
Storage unit, for when receiving the first data of slave computer transmission, first data to be stored to first interface In;
Comparing unit, for the data in the first data and second interface in the first interface, wherein described second Data in interface are the data that display interface is currently shown;
Processing unit, for handling data identical with the data in the second interface in the first interface;
Refresh unit, for using display interface described in treated in first interface Refresh Data.
7. terminal device according to claim 6, which is characterized in that the comparing unit includes:
Traversal Unit, for successively traversing the key in the second interface with the key in the first interface, with more described The corresponding value of each key in one interface and the second interface;
Determination unit, if in the first interface and the second interface there are identical key it is corresponding value it is equal, really The fixed key-value pair is data identical with the data in the second interface in the first interface;
The processing unit, for delete in the first interface with identical key-value pair in the key-value pair of the second interface.
8. terminal device according to claim 9, which is characterized in that the terminal device further includes:
Replacement unit, if for the first interface with but key identical there are key in the second interface corresponding value not phase Deng the corresponding value of the key in the second interface is then replaced with the corresponding value of the key in first interface;
Adding unit, if for there are the keys being not present in second interface in the first interface, it will be in the first interface The key-value pair is added in the second interface.
9. a kind of terminal device, which is characterized in that including processor, input equipment, output equipment and memory, the processing Device, input equipment, output equipment and memory are connected with each other, wherein the memory is for storing computer program, the meter Calculation machine program includes program instruction, and the processor is configured for calling described program instruction, executes claim 1-5 such as and appoints Method described in one.
10. a kind of computer readable storage medium, which is characterized in that the computer storage medium is stored with computer program, The computer program includes program instruction, and described program instruction makes the processor execute such as right when being executed by a processor It is required that the described in any item methods of 1-5.
CN201810627595.1A 2018-06-15 2018-06-15 Data refreshing method, terminal equipment and computer readable medium Active CN108874344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810627595.1A CN108874344B (en) 2018-06-15 2018-06-15 Data refreshing method, terminal equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810627595.1A CN108874344B (en) 2018-06-15 2018-06-15 Data refreshing method, terminal equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN108874344A true CN108874344A (en) 2018-11-23
CN108874344B CN108874344B (en) 2021-10-08

Family

ID=64339746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810627595.1A Active CN108874344B (en) 2018-06-15 2018-06-15 Data refreshing method, terminal equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN108874344B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597813A (en) * 2018-11-28 2019-04-09 深圳市轱辘汽车维修技术有限公司 A kind of vehicle data processing method and processing device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1499750A (en) * 2002-11-04 2004-05-26 威达电股份有限公司 System and method for monitoring iamge transmission in realtime
CN103455292A (en) * 2012-05-28 2013-12-18 展讯通信(上海)有限公司 Business data display and processing method and device and user equipment
CN103970061A (en) * 2013-01-24 2014-08-06 阿自倍尔株式会社 Data creating device and method
CN104748757A (en) * 2013-12-31 2015-07-01 北京四维图新科技股份有限公司 Data updating method and device for navigation electronic map
CN105068843A (en) * 2015-08-24 2015-11-18 北京网田科技发展有限公司 Data updating method of automobile recommendation program and data updating system of automobile recommendation program
CN106027645A (en) * 2016-05-19 2016-10-12 Tcl移动通信科技(宁波)有限公司 Mutual control method and system for mobile terminals
CN106197441A (en) * 2016-06-29 2016-12-07 奇瑞汽车股份有限公司 A kind of vehicle-mounted navigation map difference update method
CN106595681A (en) * 2016-12-16 2017-04-26 上海博泰悦臻网络技术服务有限公司 Differential updating method for path data, system and server
CN107360229A (en) * 2017-07-12 2017-11-17 北京海克智动科技开发有限公司 A kind of system and method for environmental data push and response
CN107947366A (en) * 2017-12-07 2018-04-20 中科创能实业有限公司 Data processing method and data processing equipment
CN108153784A (en) * 2016-12-06 2018-06-12 北京京东尚科信息技术有限公司 Synchrodata treating method and apparatus

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1499750A (en) * 2002-11-04 2004-05-26 威达电股份有限公司 System and method for monitoring iamge transmission in realtime
CN103455292A (en) * 2012-05-28 2013-12-18 展讯通信(上海)有限公司 Business data display and processing method and device and user equipment
CN103970061A (en) * 2013-01-24 2014-08-06 阿自倍尔株式会社 Data creating device and method
CN104748757A (en) * 2013-12-31 2015-07-01 北京四维图新科技股份有限公司 Data updating method and device for navigation electronic map
CN105068843A (en) * 2015-08-24 2015-11-18 北京网田科技发展有限公司 Data updating method of automobile recommendation program and data updating system of automobile recommendation program
CN106027645A (en) * 2016-05-19 2016-10-12 Tcl移动通信科技(宁波)有限公司 Mutual control method and system for mobile terminals
CN106197441A (en) * 2016-06-29 2016-12-07 奇瑞汽车股份有限公司 A kind of vehicle-mounted navigation map difference update method
CN108153784A (en) * 2016-12-06 2018-06-12 北京京东尚科信息技术有限公司 Synchrodata treating method and apparatus
CN106595681A (en) * 2016-12-16 2017-04-26 上海博泰悦臻网络技术服务有限公司 Differential updating method for path data, system and server
CN107360229A (en) * 2017-07-12 2017-11-17 北京海克智动科技开发有限公司 A kind of system and method for environmental data push and response
CN107947366A (en) * 2017-12-07 2018-04-20 中科创能实业有限公司 Data processing method and data processing equipment

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
于德新: "《非常态下道路交通异常状态信息获取技术》", 31 July 2013 *
张震: "《食品药品监管信息化工程概论》", 31 January 2018 *
杨兆升: "《基于动态信息的智能导航与位置服务系统关键技术及其应用》", 31 May 2012 *
林艳: "《地理信息增量描述与计算》", 30 June 2017 *
车云: "《智能汽车 决战2020》", 30 April 2018 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597813A (en) * 2018-11-28 2019-04-09 深圳市轱辘汽车维修技术有限公司 A kind of vehicle data processing method and processing device
CN109597813B (en) * 2018-11-28 2022-01-04 深圳市轱辘车联数据技术有限公司 Vehicle data processing method and device

Also Published As

Publication number Publication date
CN108874344B (en) 2021-10-08

Similar Documents

Publication Publication Date Title
CN105159530B (en) A kind of the display object switching method and device of application
US10289819B2 (en) Active authentication of users
CN102508700B (en) Method and device for quickly recovering webpage of mobile terminal
CN110380917A (en) Control method, device, terminal device and the storage medium of federal learning system
WO2021103403A1 (en) Blockchain transaction information management method and device, computer device and storage medium
CN107515890A (en) A kind of method and terminal for identifying resident point
CN103309620B (en) For the virtualized management interface of many storage subsystems
CN108287708A (en) A kind of data processing method, device, server and computer readable storage medium
CN108038112A (en) Document handling method, mobile terminal and computer-readable recording medium
CN106716335A (en) Asynchronous processing of mapping information
CN107368255B (en) Unlocking method, mobile terminal and computer readable storage medium
WO2011079433A1 (en) An apparatus, method, computer program and user interface
WO2019214438A1 (en) Radio frequency card function calling method and device
CN107506494B (en) Document handling method, mobile terminal and computer readable storage medium
CN107491300A (en) The reminding method and its terminal of a kind of intelligent function
CN104123102B (en) A kind of IP hard disks and its data processing method
CN108874344A (en) A kind of method for refreshing data, terminal device and computer-readable medium
CN109783321A (en) Monitoring data management method, device, terminal device
CN106469017A (en) A kind of terminal arranges the method and device of password and certification
CN108052269A (en) Unlocking screen optimization method, terminal device and computer-readable medium
CN108268291A (en) A kind of application program delet method and terminal device
CN109213662A (en) A kind of user's touch-control behavioral data collection method and terminal
CN107517307A (en) A kind of method and its terminal that alarm clock is set
CN106528141A (en) Task sweep-out method and system
CN110245130A (en) Data duplicate removal method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Bantian street, Longgang District of Shenzhen City, Guangdong province 518000 yuan and five Avenue sign technology plant No. 1 building 4 floor

Applicant after: SHENZHEN GOLO CHELIAN DATA TECHNOLOGY Co.,Ltd.

Address before: Bantian street Shenzhen city Guangdong province 518000 yuan and five Avenue sign technology plant No. 1 building 4 floor

Applicant before: GOLO IOV DATA TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant