CN109669756A - Data refreshing method and device, electronic equipment and storage medium - Google Patents

Data refreshing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109669756A
CN109669756A CN201811598215.2A CN201811598215A CN109669756A CN 109669756 A CN109669756 A CN 109669756A CN 201811598215 A CN201811598215 A CN 201811598215A CN 109669756 A CN109669756 A CN 109669756A
Authority
CN
China
Prior art keywords
item
data set
target
data
probability
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.)
Pending
Application number
CN201811598215.2A
Other languages
Chinese (zh)
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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201811598215.2A priority Critical patent/CN109669756A/en
Publication of CN109669756A publication Critical patent/CN109669756A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a data refreshing method, a data refreshing device, electronic equipment and a storage medium, which are used for solving the problem of low refreshing rate of RecyclerView. Wherein, the method comprises the following steps: when a first data set aiming at a target recoverer view control is received, acquiring a second data set from an adapter corresponding to the target recoverer view control; comparing the first data set with the second data set to obtain a difference data set; inputting the difference data set into the adapter so that the adapter performs partial refreshing on the target recycler view control. By implementing the embodiment of the invention, the data refreshing efficiency can be improved.

Description

Method for refreshing data, device, electronic equipment and storage medium
Technical field
The present invention relates to computer fields, and in particular to a kind of method for refreshing data, device, electronic equipment and storage are situated between Matter.
Background technique
Currently, the primary reclaimer's view control (RecyclerView) of Android (Android) due to its favorable expandability, more Flexibly etc. advantages and be increasingly being used for the display and control of user interface (User Interface, UI), and UI is usual Realize that the layout effect of project (item), every a line include the view (View) of multiple row project using grid layout, by It shows that focus lets the user know that current operated object on the view of project, and is added according to the slide of user instruction pull-up Carry the project except display area.In the prior art, the data of RecyclerView and view provider are adapters (Adapter), then the method for refreshing data of RecyclerView need to carry out difference calculating according to the Adapter and update behaviour Make, causes the rate of Refresh Data slow.
Summary of the invention
The embodiment of the present invention provides a kind of method for refreshing data, device, electronic equipment and storage medium, for solving The slow problem of RecyclerView refresh rate.
First aspect of the embodiment of the present invention provides a kind of method for refreshing data, comprising:
When receiving the first data set for target reclaimer view control, from the target reclaimer view control The second data set is obtained in corresponding adapter;
First data set and second data set are compared, difference data collection is obtained;
The difference data collection is inputted into the adapter, so that the adapter is to the target reclaimer view control Carry out Local hydrodynamic unit.
In conjunction with the embodiment of the present invention in a first aspect, first aspect of the embodiment of the present invention the first possible implementation In, it is described that first data set and second data set are compared, obtain difference data collection, comprising:
Third data set is established according to first data set and second data set;
Second data set and the third data set are compared, the difference data collection is obtained;
The method also includes:
The third data set is inputted into the adapter, so that the adapter updates first data set.
In conjunction with the first possible implementation of first aspect of the embodiment of the present invention, in first aspect of the embodiment of the present invention Second of possible implementation in, first data set includes multiple first items, second data set include it is more A second item, it is described that third data set is established according to first data set and second data set, comprising:
Using the first second item in the multiple second item as target second item, iteration is executed:
Judge to whether there is and the matched target first item of the target second item in the multiple first item;
The target first item if it exists then adds the target first item and institute in the third data set State the corresponding data of target first item;
The target first item if it does not exist, then added in the third data set target second item and The corresponding data of the target second item;
Judge whether the target second item is the last one second item in the multiple second item;
If the target second item is the last one second item, terminate iteration;
If the target second item is not the last one second item, by target described in the multiple second item Next second item of second item is as the target second item.
In conjunction with second of possible implementation of first aspect of the embodiment of the present invention, in first aspect of the embodiment of the present invention The third possible implementation in, the method also includes:
The variation probability for determining each second item in the multiple second item obtains multiple variation probability;
Determine that changing probability in the multiple second item to be greater than the second item of preset threshold is first data set In first item.
In conjunction with the third possible implementation of first aspect of the embodiment of the present invention, in first aspect of the embodiment of the present invention The 4th kind of possible implementation in, the variation probability of each second item, obtains in the multiple second item of determination To multiple variation probability, comprising:
The first probability is determined according to the corresponding item types of second item each in the multiple second item, is obtained multiple First probability;
Obtain the time difference between the current time of electronic equipment and the storage time of second data set;
The second probability of the corresponding data of each second item in the multiple second item is determined according to the time difference, Obtain multiple second probability;
According to the multiple first probability and the multiple variation probability of the multiple second determine the probability.
Second aspect of the embodiment of the present invention provides a kind of Refresh Data device, comprising:
Acquiring unit, for when receiving the first data set for target reclaimer view control, from the target The second data set is obtained in the corresponding adapter of reclaimer's view control;
Comparing unit obtains difference data collection for first data set and second data set to be compared;
Refresh unit, for the difference data collection to be inputted the adapter, so that the adapter is to the target Reclaimer's view control carries out Local hydrodynamic unit.
In conjunction with second aspect of the embodiment of the present invention, in the first possible implementation of second aspect of the embodiment of the present invention In, the comparing unit specifically includes:
Module is established, for establishing third data set according to first data set and second data set;
Comparison module obtains the difference number for second data set and the third data set to be compared According to collection;
The refresh unit is also used to the third data set inputting the adapter, so that the adapter updates First data set.
In conjunction with the first possible implementation of second aspect of the embodiment of the present invention, in second aspect of the embodiment of the present invention Second of possible implementation in, first data set includes multiple first items, second data set include it is more A second item, the module of establishing are specifically used for using the first second item in the multiple second item as target second Project, iteration execute: judging to whether there is and the matched target first of the target second item in the multiple first item Project;The target first item if it exists then adds the target first item and described in the third data set The corresponding data of target first item;The target first item if it does not exist, then in the third data set described in addition Target second item and the corresponding data of the target second item;Judge whether the target second item is the multiple The last one second item in second item;If the target second item is the last one second item, terminate iteration; If the target second item is not the last one second item, by target second item described in the multiple second item Next second item as the target second item.
In conjunction with second of possible implementation of second aspect of the embodiment of the present invention, in second aspect of the embodiment of the present invention The third possible implementation in, described device further include:
Determination unit obtains multiple changes for determining the variation probability of each second item in the multiple second item Change probability;Determine that changing probability in the multiple second item to be greater than the second item of preset threshold is in first data set First item.
In conjunction with the third possible implementation of second aspect of the embodiment of the present invention, the determination unit is specifically used for root The first probability is determined according to the corresponding item types of second item each in the multiple second item, obtains multiple first probability; Obtain the time difference between the current time of electronic equipment and the storage time of second data set;It is true according to the time difference The second probability of the corresponding data of each second item, obtains multiple second probability in fixed the multiple second item;According to institute State multiple first probability and the multiple variation probability of the multiple second determine the probability.
The third aspect of the embodiment of the present invention provide a kind of electronic equipment, comprising: shell, processor, memory, circuit board and Power circuit, wherein circuit board is placed in the space interior that shell surrounds, and processor and memory setting are on circuit boards;Electricity Source circuit, for each circuit or the device power supply for electronic equipment;Memory is for storing executable program code;Processor Program corresponding with executable program code is run by reading the executable program code stored in memory, for holding The method for refreshing data that row first aspect of the embodiment of the present invention provides.
Fourth aspect of the embodiment of the present invention provides a kind of non-transitorycomputer readable storage medium, wherein the storage Medium realizes that first aspect of the embodiment of the present invention mentions for storing computer program, when the computer program is executed by processor The method for refreshing data of confession.
In the embodiment of the present invention, when receiving the first data set for target reclaimer view control, from the mesh The second data set is obtained in the corresponding adapter of mark reclaimer's view control, then by first data set and second number It is compared according to collection to obtain difference data collection, the difference data collection is finally inputted into the adapter, so that the adaptation Device carries out Local hydrodynamic unit to the target reclaimer view control.In this way, obtaining the second data set from adapter, and by connecing The first data set received obtains difference data collection, so that adapter only need to carry out view update according to difference data collection, improves Refresh Data efficiency.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment 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 flow diagram of method for refreshing data provided in an embodiment of the present invention;
Fig. 2 is a kind of flow diagram for establishing third data set provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of another method for refreshing data provided in an embodiment of the present invention;
Fig. 4 A~Fig. 4 C is a kind of structural schematic diagram of Refresh Data device provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
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.
Term " first ", " second " and " third " in description and claims of this specification and attached drawing etc. are to be used for Different objects are distinguished, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, It is intended to cover and non-exclusive includes.Such as it contains the process, method of a series of steps or units, system, product or sets It is standby to be not limited to listed step or unit, but optionally further comprising the step of not listing or unit, or optionally It further include the other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments Containing at least one embodiment of the present invention.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
Electronic equipment described in the embodiment of the present invention may include smart phone (such as Android phone), tablet computer, Palm PC, laptop, mobile internet device (MID, Mobile Internet Devices) or wearable device It is only citing Deng, electronic equipment, and it is non exhaustive, including but not limited to electronic equipment.
The embodiment of the present invention provides a kind of method for refreshing data, device, electronic equipment and storage medium, for asking for solution Topic.
Referring to Fig. 1, Fig. 1 is a kind of flow chart of method for refreshing data provided in an embodiment of the present invention.As shown in Figure 1, This method may comprise steps of.
Step S101, it when receiving the first data set for target reclaimer view control, is recycled from the target The second data set is obtained in the corresponding adapter of person's view control.
Reclaimer's view control (RecyclerView) is a slide assemblies, generallys use grid layout to realize project (item) layout effect, every a line includes the view (View) of multiple row project, by showing that focus allows on the view of project User knows current operated object, and instructs the project except pull-up loaded and displayed region according to the slide of user.
In this application, target reclaimer view control can be any RecyclerView, it is not limited here.Adaptation Device (Adapter) shows view for storing the corresponding data of RecyclerView, and according to the data.Second data set is mesh The total data stored in the corresponding adapter of mark reclaimer's view control;First data set includes target reclaimer's view control The corresponding newest data of each project, the first data set can obtain in real time, interval time can also be waited to obtain, can be with Obtained in the slide for being responsive to user etc., herein also without limitation.
For example, target reclaimer view control be a weather control, then the second data set include Beijing, Changsha, For each project such as Chongqing, Guangzhou, Wuhan in 7 points of corresponding data on December 19th, 2018, the first data set may include Beijing, length Each project such as sand, Chongqing, Guangzhou, Wuhan is in 8 points of corresponding data on December 19th, 2018.
As an alternative embodiment, first data set includes multiple first items, second data set Including multiple second item, the method also includes: determine the variation probability of each second item in the multiple second item, Obtain multiple variation probability;Determine that changing probability in the multiple second item to be greater than the second item of preset threshold is described the First item in one data set.
Wherein, variation probability refers to the probability of the corresponding data variation of second item, can be according to the corresponding item of second item The changeability (such as: picture, numerical value, text etc.) of mesh type determines the first probability, further according to the corresponding data of second item Changeability determines the second probability, then changes probability further according to the first probability and the second determine the probability, in this way, determining change can be improved Change the accuracy of probability.
The application can be lesser value, that is to say, that first in the first data set without limitation for first threshold The variation probability of project is larger.
It is appreciated that first determine the variation probability of each second item, then choose variation probability is greater than first threshold the Two projects are as first item, in this way, the only data of receiving portion project, can save power consumption, and the variation of some projects is general Rate is larger, to improve refreshing efficiency.
For example, target reclaimer view control is a gaming controls, then the second data set includes game picture, trip Each projects such as icon, game name, online number play in 15 points of corresponding data on December 19th, 2018, wherein game figure Piece, game icon, game name, online number variation probability be 0.8,0.1,0.1,0.5, it is assumed that first threshold 0.2, then Determine that multiple first items are game picture and the corresponding data of online number.
In one possible implementation, the variation of each second item is general in the multiple second item of the determination Rate obtains multiple variation probability, comprising: is determined according to the corresponding item types of second item each in the multiple second item First probability obtains multiple first probability;Obtain electronic equipment current time and second data set storage time it Between time difference;The second general of the corresponding data of each second item in the multiple second item is determined according to the time difference Rate obtains multiple second probability;It is general according to the multiple variation of the multiple first probability and the multiple second determine the probability Rate.
It is appreciated that the length of time difference for data variation have it is certain influence, in this embodiment, according to each the The corresponding item types of two projects determine the first probability, further according to the current time of electronic equipment and depositing for second data set Time difference between the storage time determines that the corresponding data of each second item determine the second probability, then according to each second item Corresponding first probability and the second determine the probability second item for variation probability, in this way, can further improve determining change Change the accuracy of probability.
In one possible implementation, the method also includes: if it is the multiple variation probability in maximum value it is big In second threshold, then the request of data for being directed to first data set is sent to server corresponding with the electronic equipment;It connects Receive first data set that the server is sent.
Wherein, second threshold can be biggish value without limitation.If being appreciated that the maximum in multiple variation probability Value is greater than second threshold, then obtains the first data set by server corresponding with electronic equipment, that is to say, that in the first data When the variation probability of the data of the first item of concentration is larger, the application is just executed, power consumption can be saved.
Step S102, first data set and second data set are compared, obtain difference data collection.
In this application, difference data collection include difference project and changed data content.The application for Comparison method without limitation, can successively compare the project that whether there is the second data set in the first data set, and if it exists, then compare First data set corresponds to the difference of data between project project corresponding with the second data set, if difference is not 0, the project with And difference is added to difference data collection.
For example, target reclaimer view control is a weather control, and the second data set includes Beijing, Changsha, again Celebrating, Guangzhou, Wuhan totally 5 projects, wherein the corresponding temperature range in Beijing is -4~6 DEG C, and the corresponding temperature range in Changsha is 10 ~15 DEG C, the corresponding temperature range in Chongqing is 9~14 DEG C, and the corresponding temperature range in Guangzhou is 18~25 DEG C, the corresponding temperature in Wuhan Spending range is 6~15 DEG C;First data set includes Beijing, Chongqing, Guangzhou, Wuhan totally 4 projects, wherein the corresponding temperature in Beijing Spending range is -2~10 DEG C, and the corresponding temperature range in Chongqing is 9~14 DEG C, and the corresponding temperature range in Guangzhou is 18~25 DEG C, military The corresponding temperature range of the Chinese is 8~15 DEG C.In this way, difference data collection includes the corresponding difference data in Beijing and Wuhan, and Beijing Corresponding difference data is 2~4, and the corresponding difference data in Wuhan is 2~0.
It is in one possible implementation, described that first data set and second data set are compared, Obtain difference data collection, comprising: third data set is established according to first data set and second data set;By described Two data sets and the third data set are compared, and obtain the difference data collection.
Wherein, third data set is compared between the first data set and the second data set, obtained new data set, That is, if data in the second data set and the first data set it is inconsistent, with the data of the first data set newly obtained Subject to, in this way, the update to realize the second data.
The application is for establishing the method for third data set without limitation, as shown in Fig. 2, as a kind of optional embodiment party Formula, it is described that third data set is established according to first data set and second data set, comprising:
Step S201, using the first second item in the multiple second item as target second item, iteration is executed Step S202~S207:
Step S202, judge in the multiple first item with the presence or absence of with the matched target of target second item the One project;If so, thening follow the steps S203;If it is not, thening follow the steps S204;
Step S203, the target first item and the target first item pair are added in the third data set The data answered;
Step S204, the target second item and the target second item pair are added in the third data set The data answered;
Step S205, judge whether the target second item is the last one Section 2 in the multiple second item Mesh;If so, thening follow the steps S206;If it is not, thening follow the steps S207;
Step S206, terminate iteration;
Step S207, using next second item of target second item described in the multiple second item as described in Target second item.
It is appreciated that successively judge whether target first item matches with target second item, if matching, directly the Target first item and the corresponding data of the target first item are added in three data sets;If mismatching, directly the Target second item and the corresponding data of the target second item are added in three data sets, in this way, third data set and the The project matching of corresponding position in one data set, and third data set has updated the second data set according to the first data set.
For example, target reclaimer view control be a weather control, then the second data set include Beijing, Changsha, Chongqing, Guangzhou, Wuhan totally 5 projects, wherein the corresponding temperature range in Beijing is -4~6 DEG C, and the corresponding temperature range in Changsha is 10~15 DEG C, the corresponding temperature range in Chongqing is 9~14 DEG C, and the corresponding temperature range in Guangzhou is 18~25 DEG C, and Wuhan is corresponding Temperature range is 6~15 DEG C;First data set includes Beijing, Chongqing, Guangzhou, Wuhan totally 4 projects, wherein Beijing is corresponding Temperature range is -2~10 DEG C, and the corresponding temperature range in Chongqing is 9~14 DEG C, and the corresponding temperature range in Guangzhou is 18~25 DEG C, The corresponding temperature range in Wuhan is 8~15 DEG C.In this way, in third data set include the first data set in Beijing, Chongqing, Guangzhou, The corresponding data in Changsha in the corresponding data in Wuhan and the second data set, i.e., in third data set, the corresponding temperature in Beijing Range is -2~10 DEG C, and the corresponding temperature range in Changsha is 10~15 DEG C, and the corresponding temperature range in Chongqing is 9~14 DEG C, Guangzhou Corresponding temperature range is 18~25 DEG C, and the corresponding temperature range in Wuhan is 8~15 DEG C.
The application between the second data set and third data set comparison obtain difference data collection method without limitation, DiffUtil.calculateDiff method can be called, by DiffUtil.Callback class to the first data set and third number Difference calculating is carried out according to collection, to obtain DiffResult difference result set, wherein DiffUtil.Callback class is specifically used for Limit data set comparison rules.
In a possible embodiment, the method also includes: the third data set is inputted into the adapter, with The adapter is set to update first data set.
It is appreciated that by third data set input adapter, in this way, the first data set can be changed to third number by adapter According to collection, to realize the update of data set.
Step S103, the difference data collection is inputted into the adapter, so that the adapter recycles the target Person's view control carries out Local hydrodynamic unit.
In this application, adapter can call automatically dispatchUpdatesTo () method according to difference data collection so that Local hydrodynamic unit target reclaimer's view control, that is to say, that will be different from the corresponding project of the second data set in third data set Data are updated.
In the method for refreshing data described in Fig. 1, the first data for target reclaimer view control are being received When collection, the second data set is obtained from the corresponding adapter of the target reclaimer view control, then by first data Collection and second data set are compared to obtain difference data collection, and the difference data collection is finally inputted the adaptation Device, so that the adapter carries out Local hydrodynamic unit to the target reclaimer view control.In this way, obtaining second from adapter Data set, and difference data collection is obtained by the first data set for receiving, thus adapter only need to according to difference data collection into Row view update improves Refresh Data efficiency.
Referring to Fig. 3, Fig. 3 is the flow chart of another method for refreshing data provided in an embodiment of the present invention.Such as Fig. 3 institute Show, this method may comprise steps of.
Step S301, it when receiving the first data set for target reclaimer view control, is recycled from the target The second data set is obtained in the corresponding adapter of person's view control.
Step S302, third data set is established according to first data set and second data set.
Step S303, second data set and the third data set are compared, obtain difference data collection;
Step S304, the difference data collection is inputted into the adapter, so that the adapter recycles the target Person's view control carries out Local hydrodynamic unit.
In the method for refreshing data described in Fig. 3, the first data for target reclaimer view control are being received When collection, the second data set is obtained from the corresponding adapter of the target reclaimer view control, then according to first number Third data set is established according to collection and second data set, then second data set and the third data set are compared To obtain difference data collection, the difference data collection is finally inputted into the adapter, so that the adapter is to the target Reclaimer's view control carries out Local hydrodynamic unit.In this way, obtaining the second data set from adapter, and the by receiving first number Third data set to be updated is obtained according to collection, and obtains the difference data collection between third data set and the second data set, thus Adapter only need to carry out view update according to difference data collection, improve Refresh Data efficiency.
Fig. 4 A is please referred to, Fig. 4 A is a kind of structure chart of Refresh Data device provided in an embodiment of the present invention.Such as Fig. 4 A institute Show, which may include:
Acquiring unit 401, for when receiving the first data set for target reclaimer view control, from the mesh The second data set is obtained in the corresponding adapter of mark reclaimer's view control;
Comparing unit 402 obtains difference data for first data set and second data set to be compared Collection;
Refresh unit 403, for the difference data collection to be inputted the adapter, so that the adapter is to the mesh It marks reclaimer's view control and carries out Local hydrodynamic unit.
As a kind of alternative embodiment, as shown in Figure 4 B, the comparing unit 402 is specifically included:
Module 4021 is established, for establishing third data set according to first data set and second data set;
Comparison module 4022 obtains the difference for second data set and the third data set to be compared Other data set;
As a kind of alternative embodiment, the refresh unit 403 is also used to the third data set inputting the adaptation Device, so that the adapter updates first data set.
As a kind of alternative embodiment, first data set includes multiple first items, and second data set includes Multiple second item, the module 4021 of establishing are specifically used for using the first second item in the multiple second item as mesh Second item is marked, iteration executes: judging to whether there is and the matched mesh of target second item in the multiple first item Mark first item;The target first item if it exists, then added in the third data set target first item with And the corresponding data of the target first item;The target first item if it does not exist then adds in the third data set Add the target second item and the corresponding data of the target second item;Judge whether the target second item is institute State the last one second item in multiple second item;If the target second item is the last one second item, tie Beam iteration;If the target second item is not the last one second item, by target described in the multiple second item Next second item of second item is as the target second item.
As a kind of alternative embodiment, as shown in Figure 4 C, described device 400 further include:
Determination unit 404 obtains multiple for determining the variation probability of each second item in the multiple second item Change probability;Determine that changing probability in the multiple second item to be greater than the second item of preset threshold is first data set In first item.
As a kind of alternative embodiment, the determination unit is specifically used for according in the multiple second item every one second The corresponding item types of project determine the first probability, obtain multiple first probability;Obtain electronic equipment current time with it is described Time difference between the storage time of second data set;It is determined every one second in the multiple second item according to the time difference Second probability of the corresponding data of project obtains multiple second probability;According to the multiple first probability and the multiple second The multiple variation probability of determine the probability.
It will be appreciated that the function of each functional unit of the Refresh Data device 400 of the present embodiment can according to above-mentioned Fig. 1~ The method of Fig. 3 embodiment of the method implements, and details are not described herein again.
In the Refresh Data device described in Fig. 4, the first data for target reclaimer view control are being received When collection, the second data set is obtained from the corresponding adapter of the target reclaimer view control, then by first data Collection and second data set are compared to obtain difference data collection, and the difference data collection is finally inputted the adaptation Device, so that the adapter carries out Local hydrodynamic unit to the target reclaimer view control.In this way, obtaining second from adapter Data set, and difference data collection is obtained by the first data set for receiving, thus adapter only need to according to difference data collection into Row view update improves Refresh Data efficiency.
Referring to Fig. 5, Fig. 5 is electronic equipment provided in an embodiment of the present invention.Wherein, which is suitable for hand The electronic equipments such as machine, tablet computer.As shown in figure 5, the electronic equipment may include shell 510, processor 520, memory 530, circuit board 540 and power circuit 550, wherein circuit board 540 is placed in the space interior that shell surrounds, 520 He of processor Memory 530 is arranged on circuit board 540;Power circuit 550, for each circuit or the device power supply for electronic equipment;It deposits Reservoir 530 is for storing executable program code;Processor 520 is by reading the executable program generation stored in memory 530 Code runs program corresponding with executable program code, for executing following steps:
When receiving the first data set for target reclaimer view control, from the target reclaimer view control The second data set is obtained in corresponding adapter;
First data set and second data set are compared, difference data collection is obtained;
The difference data collection is inputted into the adapter, so that the adapter is to the target reclaimer view control Carry out Local hydrodynamic unit.
As a kind of alternative embodiment, first data set and second data set are compared described, obtained In terms of difference data collection, above-mentioned processor 520 is specifically used for executing following operation:
Third data set is established according to first data set and second data set;
Second data set and the third data set are compared, the difference data collection is obtained;
The method also includes:
The third data set is inputted into the adapter, so that the adapter updates first data set.
As a kind of alternative embodiment, first data set includes multiple first items, and second data set includes Multiple second item, it is described third data set is established according to first data set and second data set in terms of, it is above-mentioned Processor 520 is specifically used for executing following operation:
Using the first second item in the multiple second item as target second item, iteration is executed:
Judge to whether there is and the matched target first item of the target second item in the multiple first item;
The target first item if it exists then adds the target first item and institute in the third data set State the corresponding data of target first item;
The target first item if it does not exist, then added in the third data set target second item and The corresponding data of the target second item;
Judge whether the target second item is the last one second item in the multiple second item;
If the target second item is the last one second item, terminate iteration;
If the target second item is not the last one second item, by target described in the multiple second item Next second item of second item is as the target second item.
As a kind of alternative embodiment, above-mentioned processor 520 is also used to execute following operation:
The variation probability for determining each second item in the multiple second item obtains multiple variation probability;
Determine that changing probability in the multiple second item to be greater than the second item of preset threshold is first data set In first item.
As a kind of alternative embodiment, the variation of each second item is general in the multiple second item of the determination Rate, in terms of obtaining multiple variation probability, above-mentioned processor 520 is specifically used for executing following operation:
The first probability is determined according to the corresponding item types of second item each in the multiple second item, is obtained multiple First probability;
Obtain the time difference between the current time of electronic equipment and the storage time of second data set;
The second probability of the corresponding data of each second item in the multiple second item is determined according to the time difference, Obtain multiple second probability;
According to the multiple first probability and the multiple variation probability of the multiple second determine the probability.
In the electronic equipment described in Fig. 5, when receiving the first data set for target reclaimer view control, The second data set is obtained from the corresponding adapter of the target reclaimer view control, then by first data set and institute It states the second data set to be compared to obtain difference data collection, the difference data collection is finally inputted into the adapter, so that The adapter carries out Local hydrodynamic unit to the target reclaimer view control.In this way, the second data set is obtained from adapter, And the first data set by receiving obtains difference data collection, so that adapter only need to carry out view more according to difference data collection Newly, Refresh Data efficiency is improved.
A kind of non-transitorycomputer readable storage medium is provided in one embodiment, is stored thereon with computer journey Sequence, wherein the method for refreshing data of embodiment one or embodiment two is realized when the computer program is executed by processor.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, module or unit Division, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or group Part can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown Or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit it is indirect Coupling or communication connection can be electrical property, mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Integrated unit was both It can take the form of hardware realization, can also realize in the form of software functional units.
It, can if integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product To be stored in a computer readable storage medium.Based on this understanding, the technical solution of the application substantially or Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products Out, 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.) or processor (processor) execute each implementation of the application The all or part of the steps of example method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit Store up the medium of program code.
More than, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, and it is any to be familiar with Those skilled in the art within the technical scope of the present application, can easily think of the change or the replacement, and should all cover Within the protection scope of the application.Therefore, the protection scope of the application should be subject to the protection scope in claims.

Claims (10)

1. a kind of method for refreshing data characterized by comprising
It is corresponding from the target reclaimer view control when receiving the first data set for target reclaimer view control Adapter in obtain the second data set;
First data set and second data set are compared, difference data collection is obtained;
The difference data collection is inputted into the adapter, so that the adapter carries out the target reclaimer view control Local hydrodynamic unit.
2. the method according to claim 1, wherein described by first data set and second data set It is compared, obtains difference data collection, comprising:
Third data set is established according to first data set and second data set;
Second data set and the third data set are compared, the difference data collection is obtained;
The method also includes:
The third data set is inputted into the adapter, so that the adapter updates first data set.
3. described according to the method described in claim 2, it is characterized in that, first data set includes multiple first items Second data set includes multiple second item, described to establish third data according to first data set and second data set Collection, comprising:
Using the first second item in the multiple second item as target second item, iteration is executed:
Judge to whether there is and the matched target first item of the target second item in the multiple first item;
The target first item if it exists then adds the target first item and the mesh in the third data set Mark the corresponding data of first item;
The target first item if it does not exist then adds the target second item and described in the third data set The corresponding data of target second item;
Judge whether the target second item is the last one second item in the multiple second item;
If the target second item is the last one second item, terminate iteration;
If the target second item is not the last one second item, by target second described in the multiple second item Next second item of project is as the target second item.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
The variation probability for determining each second item in the multiple second item obtains multiple variation probability;
Determine that changing probability in the multiple second item to be greater than the second item of preset threshold is in first data set First item.
5. according to the method described in claim 4, it is characterized in that, each Section 2 in the multiple second item of the determination Purpose changes probability, obtains multiple variation probability, comprising:
The first probability is determined according to the corresponding item types of second item each in the multiple second item, obtains multiple first Probability;
Obtain the time difference between the current time of electronic equipment and the storage time of second data set;
The second probability that the corresponding data of each second item in the multiple second item are determined according to the time difference, obtains Multiple second probability;
According to the multiple first probability and the multiple variation probability of the multiple second determine the probability.
6. a kind of Refresh Data device characterized by comprising
Acquiring unit, for being recycled from the target when receiving the first data set for target reclaimer view control The second data set is obtained in the corresponding adapter of person's view control;
Comparing unit obtains difference data collection for first data set and second data set to be compared;
Refresh unit, for the difference data collection to be inputted the adapter, so that the adapter recycles the target Person's view control carries out Local hydrodynamic unit.
7. device according to claim 6, which is characterized in that the comparing unit specifically includes:
Module is established, for establishing third data set according to first data set and second data set;
Comparison module obtains the difference data collection for second data set and the third data set to be compared;
The refresh unit is also used to the third data set inputting the adapter, so that described in adapter update First data set.
8. device according to claim 7, which is characterized in that first data set includes multiple first items, described Second data set includes multiple second item, and the module of establishing is specifically used for first second in the multiple second item Project is executed as target second item, iteration: judging to whether there is and the target Section 2 in the multiple first item The matched target first item of mesh;The target first item if it exists then adds the target in the third data set First item and the corresponding data of the target first item;The target first item if it does not exist, then in the third The target second item and the corresponding data of the target second item are added in data set;Judge the target Section 2 Whether mesh is the last one second item in the multiple second item;If the target second item be the last one second Project then terminates iteration;If the target second item is not the last one second item, will be in the multiple second item Next second item of the target second item is as the target second item.
9. a kind of electronic equipment, comprising: shell, processor, memory, circuit board and power circuit, wherein circuit board is placed in The space interior that shell surrounds, processor and memory setting are on circuit boards;Power circuit, for for each of electronic equipment Circuit or device power supply;Memory is for storing executable program code;Processor is held by what is stored in reading memory Line program code runs program corresponding with executable program code, for executing as described in the claim any one of 1-5 Method.
10. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, which is characterized in that the meter Such as method as claimed in any one of claims 1 to 5 is realized when calculation machine program is executed by processor.
CN201811598215.2A 2018-12-25 2018-12-25 Data refreshing method and device, electronic equipment and storage medium Pending CN109669756A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811598215.2A CN109669756A (en) 2018-12-25 2018-12-25 Data refreshing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811598215.2A CN109669756A (en) 2018-12-25 2018-12-25 Data refreshing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109669756A true CN109669756A (en) 2019-04-23

Family

ID=66146890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811598215.2A Pending CN109669756A (en) 2018-12-25 2018-12-25 Data refreshing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109669756A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113971060A (en) * 2020-07-23 2022-01-25 北京字节跳动网络技术有限公司 Interface display method and device, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102236674A (en) * 2010-04-29 2011-11-09 腾讯科技(深圳)有限公司 Method and device for updating index page
CN105828200A (en) * 2016-03-22 2016-08-03 乐视网信息技术(北京)股份有限公司 Program menu updating method and device
CN105892831A (en) * 2016-04-29 2016-08-24 青岛海信移动通信技术股份有限公司 Sliding display method and sliding display device of list data of mobile terminal
CN106021512A (en) * 2016-05-24 2016-10-12 乐视控股(北京)有限公司 Page refresh method and apparatus
CN107484003A (en) * 2017-07-01 2017-12-15 武汉斗鱼网络科技有限公司 Television listing data Local hydrodynamic unit method, storage medium, electronic equipment and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102236674A (en) * 2010-04-29 2011-11-09 腾讯科技(深圳)有限公司 Method and device for updating index page
CN105828200A (en) * 2016-03-22 2016-08-03 乐视网信息技术(北京)股份有限公司 Program menu updating method and device
CN105892831A (en) * 2016-04-29 2016-08-24 青岛海信移动通信技术股份有限公司 Sliding display method and sliding display device of list data of mobile terminal
CN106021512A (en) * 2016-05-24 2016-10-12 乐视控股(北京)有限公司 Page refresh method and apparatus
CN107484003A (en) * 2017-07-01 2017-12-15 武汉斗鱼网络科技有限公司 Television listing data Local hydrodynamic unit method, storage medium, electronic equipment and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113971060A (en) * 2020-07-23 2022-01-25 北京字节跳动网络技术有限公司 Interface display method and device, electronic equipment and medium
WO2022017154A1 (en) * 2020-07-23 2022-01-27 北京字节跳动网络技术有限公司 Interface display method and apparatus, and electronic device and medium
CN113971060B (en) * 2020-07-23 2023-10-27 抖音视界有限公司 Interface display method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN104885041B (en) The progress of handwriting input is shown
CN111282268B (en) Plot showing method, plot showing device, plot showing terminal and storage medium in virtual environment
US10317931B2 (en) Method for managing multi-core processor, and apparatus
CN104616138A (en) Resource transferring method, system and device
CN112784739A (en) Model training method, key point positioning method, device, equipment and medium
CN105468440B (en) Information display method and device and electronic equipment
CN113641677A (en) Data processing method and device, electronic equipment and storage medium
CN106293327A (en) End application fast operating method and system
CN111640103A (en) Image detection method, device, equipment and storage medium
CN109669756A (en) Data refreshing method and device, electronic equipment and storage medium
CN108227953A (en) Character input method and related product
CN107679222A (en) Image processing method, mobile terminal and computer-readable recording medium
CN105989103A (en) Method for recommending application program and terminal
CN112631682A (en) Applet processing method, device, equipment and storage medium
CN107609174A (en) A kind of method and device of content retrieval, terminal and readable storage medium storing program for executing
CN112269513A (en) Interface display method and device and electronic equipment
CN113220367A (en) Applet running method and device, electronic equipment and storage medium
CN115840867A (en) Generation method and device of mathematical problem solving model, electronic equipment and storage medium
CN113515216A (en) Application program switching method and device and electronic equipment
CN108182122B (en) Application update reminding method and device, storage medium and server
CN113268620A (en) Picture display method and device
CN109725892B (en) System logic control method and device
CN106022022B (en) A kind of method and terminal of terminal unlocking
CN108037839A (en) Character input method and related product
CN116440504B (en) Game resource processing method, device 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190423

RJ01 Rejection of invention patent application after publication