CN107589978B - Method and device for refreshing page in Flash - Google Patents

Method and device for refreshing page in Flash Download PDF

Info

Publication number
CN107589978B
CN107589978B CN201710842944.7A CN201710842944A CN107589978B CN 107589978 B CN107589978 B CN 107589978B CN 201710842944 A CN201710842944 A CN 201710842944A CN 107589978 B CN107589978 B CN 107589978B
Authority
CN
China
Prior art keywords
key data
view
page
chain
data chain
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.)
Active
Application number
CN201710842944.7A
Other languages
Chinese (zh)
Other versions
CN107589978A (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710842944.7A priority Critical patent/CN107589978B/en
Publication of CN107589978A publication Critical patent/CN107589978A/en
Application granted granted Critical
Publication of CN107589978B publication Critical patent/CN107589978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method and a device for refreshing a page in Flash, wherein the method comprises the following steps: s1, respectively using a set of key data set during refreshing of each page view in a page as a key data chain, binding each key data chain with the corresponding page view, and generating a view data chain mapping list; s2, when resetting the key data in the page, if the values of the key data before and after resetting are different, obtaining a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view. The method directly drives the refreshing of the page through the changed key data, reduces the coupling between page views, improves the development efficiency and is convenient for later maintenance.

Description

Method and device for refreshing page in Flash
Technical Field
The invention relates to the technical field of application development, in particular to a method and a device for refreshing a page in Flash.
Background
Flash is an authoring software integrating animation creation and application development, is widely used for creating applications containing rich videos, sounds, graphics and animations, and can use Adobe ActionScript3.0 to develop advanced interactive projects.
In existing Flash-based applications, most of the page refreshes are triggered by event streams. For example, when a button in the a element is clicked to change the color of the B element, a global event that the button in the a element is clicked needs to be monitored in the B element, and the color of the B element is modified in a response function of the global event; meanwhile, it is necessary to listen to click events of a button in the a element and throw the global event in the click events of the button.
When a page is refreshed in the existing Flash application, a large number of events need to be registered in the whole application program according to business logic, and are thrown out, one element may be coupled with one or more other elements through one event, a large number of codes need to be written, and development difficulty is increased. The user needs to care about the entire life cycle of the event stream during the post-maintenance process because the event stream may be truncated at a certain node, thereby affecting the page logic. Therefore, the page refreshing mode based on the event stream is low in development efficiency and inconvenient for later maintenance.
Disclosure of Invention
In order to solve the problems that the development efficiency of the event stream-based page refreshing mode is low and the later maintenance is inconvenient or at least partially solve the problems, the invention provides a page refreshing method and device in Flash.
According to a first aspect of the present invention, there is provided a page refreshing method in Flash, including:
s1, respectively using a set of key data set during refreshing of each page view in a page as a key data chain, binding each key data chain with the corresponding page view, and generating a view data chain mapping list;
s2, when resetting the key data in the page, if the values of the key data before and after resetting are different, obtaining a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view.
Specifically, the step S1 specifically includes:
in a data chain manager, respectively storing key data set when each page view in the page is refreshed into an array, and taking each array as a key data chain;
and for each key data chain, storing the key data chain and the page view corresponding to the key data chain as an object, and taking all the objects as the view data chain mapping list.
Specifically, in step S1, the step of binding each key data chain with a corresponding page view and generating a view data chain mapping list specifically includes:
setting a temporary traversal in a data view binding method in a data chain manager, wherein a first parameter in the data view binding method is a key data chain, and a second parameter is a page view;
taking the first parameter as a key data chain of the temporary traversal, and taking the second parameter as a page view of the temporary traversal;
storing the temporary traversal into the view data chain mapping list.
Specifically, the step S2 specifically includes:
when the key data in the page are reset, traversing the key data chain;
for each key data chain, if key data which are the same as the key codes of the reset key data and have different values exist in the key data chain, acquiring a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view.
Specifically, the step of obtaining a corresponding page view in the view data chain mapping list according to the reset key data specifically includes:
and for each key data chain in the view data chain mapping list, if the key data chain has the key data which is the same as the key code of the reset key data, acquiring the page view corresponding to the key data chain.
Specifically, the step of obtaining the page view to be refreshed in the view data chain mapping list according to the reset key data further includes:
for each key data chain in the view data chain mapping list, if the key data chain has the key data same as the key code of the reset key data, taking the value of the reset key data as the value of the key data same as the key code of the reset key data in the key data chain.
Specifically, the step S2 further specifically includes:
creating a key data setting method in a data manager, wherein parameters of the key data setting method are reset key data, and the reset key data comprise a key code and a value;
in the key data setting method, if the values of the key data before and after resetting are different, calling an obtaining method for obtaining a page view to be refreshed;
in the page view acquisition method, a corresponding page view is acquired in the view data chain mapping list according to the reset key data, and the reset key data is used as a parameter of a page refresh method to refresh the corresponding page view.
According to a second aspect of the present invention, there is provided a page refreshing apparatus in Flash, including:
the binding unit is used for respectively taking a set of key data set during refreshing of each page view in a page as a key data chain, binding each key data chain with the corresponding page view and generating a view data chain mapping list;
and the refreshing unit is used for acquiring a corresponding page view in the view data chain mapping list according to the reset key data and refreshing the page by using the corresponding page view if the values of the key data before and after resetting are different when the key data in the page are reset.
According to a third aspect of the present invention, there is provided a page refreshing apparatus in Flash, including:
at least one processor, at least one memory, and a bus; wherein the content of the first and second substances,
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, which when called by the processor are capable of performing the method as previously described.
According to a fourth aspect of the invention, there is provided a non-transitory computer readable storage medium storing a computer program of the method as described above.
The invention provides a method and a device for refreshing a page in Flash, wherein the method comprises the steps of gathering key data which affect refreshing of a page view together, generating a corresponding relation between the page view and a corresponding key data set, acquiring the page view corresponding to the changed key data according to the corresponding relation when the key data are changed, and refreshing the page according to the page view, so that the refreshing of the page is directly driven through the changed key data, the coupling between the page views is reduced, the development efficiency is improved, and the later maintenance is facilitated.
Drawings
FIG. 1 is a schematic overall flow chart of a page refreshing method in Flash according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an overall structure of a page refreshing apparatus in Flash according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an overall structure of a page refreshing device in Flash according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
In an embodiment of the present invention, a new method for refreshing a page in Flash is provided, and fig. 1 is a schematic overall flow chart of the new method for refreshing a page in Flash provided in the embodiment of the present invention, where the method includes: s1, respectively using a set of key data set when each page view in the page is refreshed as a key data chain, binding the key data chain with the corresponding page view, and generating a view data chain mapping list; s2, when resetting the key data in the page, if the values of the key data before and after resetting are different, obtaining a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view.
Specifically, in the present embodiment, a data-driven view refresh mode is used, and a page is refreshed when data changes. In S1, the page view is a portion of the page where data is displayed, and is typically created according to a model. The refreshed page view means that the page view changes, and the page view can be reloaded into the current page or transferred to other pages. The key data are data which can cause the page view to be refreshed when being changed, and are global variables, wherein the key codes are used for uniquely marking the key data. A page view is refreshed because one or more key data changes, and the key data chain is a set of one or more key data that cause a page view to change by refreshing, and may be an array. Each page view has a corresponding key data chain. When any key data in the key data chain changes, the corresponding page view is refreshed. The key data in the key data chain corresponding to each page view may be the same, that is, when one key data changes, multiple page views may need to be refreshed. And binding each key data chain with the corresponding page view to generate a view data chain mapping list. And binding each key data chain and the corresponding page view to generate each key data chain and the corresponding page view for mapping, wherein the view data chain mapping list is the corresponding relation between each key data chain and the corresponding page view. In S2, when the business logic needs to change a certain key data, that is, when the key data in the page is reset, it is determined whether the value of the key data before resetting is the same as the value of the key data after resetting, that is, it is determined whether the value of the key data after resetting is changed. And if the values of the key data before and after resetting are different, the fact that the value of the key data after resetting is changed is known. And acquiring a page view which needs to be refreshed when the value of the key data changes in the view data chain mapping list according to the reset key data, thereby refreshing the page.
Specifically, a view base class baseView is created, which is a parent class of all page views, that is, all page views inherit the method and properties of the baseView. Two abstract methods are contained in baseView, a refresh view method refreshView and a binding key data chain method onViewData. The first parameter of the onViewData method is the key data chain datalist, and the second parameter is the page view, each key data in the key data chain including the key and the value. The binding data chain view method BindDataView in the data chain manager is called in the onViewData method to realize the binding of key data chain and page view, such as this. The refreshView method is a view refreshing method, is triggered when key data are changed, judges which key data are changed according to transmitted parameters in the refreshView method, and performs corresponding page refreshing operation according to the changed key data.
According to the embodiment, the key data sets which affect the refreshing of one page are combined together, the corresponding relation between the page view and the corresponding key data set is generated, when the key data are changed, the page view corresponding to the changed key data is obtained according to the corresponding relation, and the page is refreshed according to the page view, so that the page refreshing is directly driven through the changed key data, the coupling between the page views is reduced, the development efficiency is improved, and the later maintenance is facilitated.
On the basis of the foregoing embodiment, step S1 in this embodiment specifically includes: in a data chain manager, respectively storing key data set when each page view in the page is refreshed into an array, and taking each array as a key data chain; and for each key data chain, storing the key data chain and the page view corresponding to the key data chain as an object, and taking all the objects as the view data chain mapping list.
Specifically, the DatalistManager is a global singleton. In the data chain manager, for each key data chain, storing the key data chain datalist and the page view corresponding to the key data chain by using an object. The data chain manager stores all object objects by an array, and the array containing the object objects is used as a view data chain mapping list. The key data chain datalist is an array for storing key data.
In the embodiment, an array is generated by key data affecting refreshing of a page view, and the page view and the array of the corresponding key data are stored as an object, that is, a corresponding relationship between the page view and the corresponding array of the key data is generated, so that a data-view model is established.
On the basis of the foregoing embodiments, in this embodiment, the step of binding each key data chain with a corresponding page view in step S1, and the step of generating a view data chain mapping list specifically includes: setting a temporary traversal in a data view binding method in a data chain manager, wherein a first parameter in the data view binding method is a key data chain, and a second parameter is a page view; taking the first parameter as a key data chain of the temporary traversal, and taking the second parameter as a page view of the temporary traversal; storing the temporary traversal into the view data chain mapping list.
In particular, DatalistManager is a global single instance, and the methods in DatalistManager can be called directly in all baseView. The datalistmanager is provided with a view data chain mapping list dataviewer for storing incoming view data chain mapping objects and a critical data chain dataList for storing incoming critical data. The DatalistManager simultaneously provides a data view binding method BindDataView, wherein the first parameter in the BindDataView is a single key data chain dataList, the second parameter is a single page view, and the onViewData method calls the BindDataView method. Setting a temporary traversal _ object in the BindDataView method, making _ object.datalist be the first parameter of incoming, _ object.view be the second parameter of incoming, and then storing the _ object in dataview, the code is as follows:
Var_object:object={};
_object.datalist=datalist;
_object.view=view;
dataviewlist.push(object).
on the basis of the foregoing embodiments, in this embodiment, the step S2 specifically includes: when the key data in the page are reset, traversing the key data chain; for each key data chain, if key data which are the same as the key codes of the reset key data and have different values exist in the key data chain, acquiring a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view.
Specifically, when a business logic needs to change certain key data, that is, when the key data in the page is reset, it is determined whether the value of the key data before resetting is the same as the value of the key data after resetting, that is, it is determined whether the value of the key data after resetting is changed. An array for storing key data, namely a key data chain datalist, is arranged in the data chain manager. Traversing the key data chain each time reset key data is introduced. And comparing whether the reset key data is inconsistent with the key data in the key data chain, namely whether the key data which is the same as the key code of the reset key data and has different values exists in the key data chain. And if the data are inconsistent, the change of the key data is known, and the page view needing to be refreshed is obtained in the view data chain mapping list according to the reset key data.
Specifically, the key data chain datalist is traversed, the incoming reset key data setdaobject is compared with each key data in the datalist, and whether key data which is the same as the key code of setdaobject and has different values exists in the datalist is judged. If the key data exists, the key data is changed, and page refreshing is needed. The code is as follows:
For each(var o:object in DataList)
{
If(o.key==setdataobject.key&&o.value!=setdataobject.value);
{
this. refresh (setdaobject); // performing a flush view operation
Value// change key data
}
In this embodiment, the reset key data is compared with the key data in the key data chain, and if it is determined that the key data changes, the page view is refreshed according to the reset key data, so that the resource utilization is reduced. Since not all the reset critical data is changed, for example, the experience value of the user is 100, if the server resets the experience value of the user to 100, the page view of the experience value does not need to be refreshed. While it is also normal to refresh the page view with the user experience value of 100 once again, resources are wasted.
On the basis of the foregoing embodiments, in this embodiment, the step of obtaining the corresponding page view in the view data chain mapping list according to the reset key data specifically includes: and for each key data chain in the view data chain mapping list, if the key data chain has the key data which is the same as the key code of the reset key data, viewing the page corresponding to the key data chain.
Specifically, after determining that the key data in the page changes, acquiring a page view needing to be refreshed. In the above embodiment, when the key data is changed, the refresh method is called. The refresh method is used for obtaining the page views to be refreshed in the view data chain mapping list dataviewlist according to the incoming reset key data setdataobject, wherein the number of the page views to be refreshed is possibly multiple. The refreshView method in the refreshmethod can judge which corresponding page view needs to be refreshed when the key data is changed according to the key attribute of the transmitted parameter setdaobject. Specifically, the page view to be refreshed is obtained by traversing whether the reset key data exists in each key data chain in the dataviewsis, that is, the key data which is the same as the key code of the reset key data exists in the key data chain. And if so, transmitting the reset key data into a view refreshing interface, namely refreshView. Using for each traversal dataview to obtain the attribute of the datalist, if key data with a key code identical to setdaobject. key exists in the datalist, obtaining the page view corresponding to the datalist, and calling a refreshView method to refresh the view, wherein the codes are as follows:
For each(var_ob in dataviewlist)
{
If(_ob.datalist.havowen(setdataobject.key))
{
_ob.view.refreshView(setdataobject).
}
}
since the view is a baseView object and a refreshView method is provided in the baseView, the refresh of the page view is directly performed by the refreshView method of the _ ob.
When the key data are determined to be changed, the page view corresponding to the key data chain with the changed key data is taken as the page view to be refreshed, the page view to be refreshed is refreshed, the refreshing of the page view is directly driven through the changed key data, the coupling between the page views is reduced, the development efficiency is improved, and the later maintenance is facilitated.
On the basis of the foregoing embodiment, in this embodiment, the step of obtaining the page view to be refreshed in the view data chain mapping list according to the reset key data further includes: for each key data chain in the view data chain mapping list, if the key data chain has the key data same as the key code of the reset key data, taking the value of the reset key data as the value of the key data same as the key code of the reset key data in the key data chain.
In the embodiment, when the changed key data exists in the key data chain, that is, when the page view to be refreshed is acquired, the changed key data is used for covering the key data before the change, so that the key data is updated, and when whether the key data is changed or not is judged next time, the key data is compared with the updated key data, so that the judgment accuracy is improved.
On the basis of the foregoing embodiment, the step S2 in this embodiment further specifically includes: creating a key data setting method in a data manager, wherein parameters of the key data setting method are reset key data, and the reset key data comprise a key code and a value; in the key data setting method, if the values of the key data before and after resetting are different, a page view acquisition method is called; in the page view acquisition method, a corresponding page view is acquired in the view data chain mapping list according to the reset key data, and the reset key data is used as a parameter of a page refresh method to refresh the corresponding page view.
Specifically, the DatalistManager provides a method setdata, whose parameter is the reset key data setdataobject. The reset key data setdaobject includes a key and a value, i.e., setdaobject ({ key: value }). This method is called when critical data needs to be set in the business logic, for example, when an error panel is closed, it can be called to set whether the error panel displays data, i.e., false ({ isshwerrpanel: false }). In this method it is necessary to distinguish whether incoming reset critical data has changed compared to critical data before resetting. If no change occurs, the page view is not refreshed; if a change occurs, the page view acquisition method refresh needs to be called. In the page view acquisition method, a corresponding page view is acquired in the view data chain mapping list according to the reset key data, and the reset key data setdaobject is taken as a parameter of a page refresh method refreshView to refresh the corresponding page view, thereby realizing the refreshing of the page.
In the embodiment, the reset key data is compared with the key data in the key data chain, and if the key data is judged to be changed, the page view to be refreshed is acquired according to the reset key data, so that the resource utilization is reduced.
In another embodiment of the present invention, a page refreshing apparatus in Flash is provided, and fig. 2 is a schematic diagram of an overall structure of the page refreshing apparatus in Flash according to the embodiment of the present invention, where the apparatus includes a binding unit 1 and a refreshing unit 2, where:
the binding unit 1 is configured to use a set of key data set when each page view in a page is refreshed as a key data chain, bind each key data chain with a corresponding page view, and generate a view data chain mapping list; the refreshing unit 2 is configured to, when resetting key data in the page, if values of the key data before and after the resetting are different, obtain a corresponding page view in the view data chain mapping list according to the reset key data, and refresh the page by using the corresponding page view.
Specifically, in the present embodiment, a data-driven view refresh mode is used, and a page is refreshed when data changes. The page view is the part of the page where data is displayed, and is usually created according to a model. The refreshed page view means that the page view changes, and the page view can be reloaded into the current page or transferred to other pages. The key data are data which can cause the page view to be refreshed when being changed, and are global variables, wherein the key codes are used for uniquely marking the key data. A page view is refreshed because one or more key data changes, and the key data chain is a set of one or more key data that cause a page view to change by refreshing, and may be an array. Each page view has a corresponding key data chain. When any key data in the key data chain changes, the corresponding page view is refreshed. The key data in the key data chain corresponding to each page view may be the same, that is, when one key data changes, multiple page views may need to be refreshed. The binding unit 1 binds each key data chain with a corresponding page view to generate a view data chain mapping list. And binding each key data chain and the corresponding page view to generate each key data chain and the corresponding page view for mapping, wherein the view data chain mapping list is the corresponding relation between each key data chain and the corresponding page view. When the business logic needs to change some key data, that is, when the key data in the page is reset, the refresh unit 2 determines whether the value of the key data before resetting is the same as the value of the key data after resetting, that is, determines whether the value of the key data after resetting is changed. And if the values of the key data before and after resetting are different, the fact that the value of the key data after resetting is changed is known. And the refreshing unit 2 acquires a page view which needs to be refreshed when the value of the key data changes in the view data chain mapping list according to the reset key data, so that the page is refreshed.
According to the method and the device, the key data sets which affect the refreshing of one page are combined together, the corresponding relation between the page view and the corresponding key data set is generated, when the key data are changed, the page view corresponding to the changed key data is obtained according to the corresponding relation, and the page is refreshed according to the corresponding page view, so that the page is directly driven to be refreshed through the changed key data, the coupling between the page views is reduced, the development efficiency is improved, and the later maintenance is facilitated.
On the basis of the foregoing embodiment, the binding unit in this embodiment is specifically configured to: in a data chain manager, respectively storing key data set when each page view in the page is refreshed into an array, and taking each array as a key data chain; and for each key data chain, storing the key data chain and the page view corresponding to the key data chain as an object, and taking all the objects as the view data chain mapping list.
On the basis of the foregoing embodiment, the binding unit in this embodiment is further specifically configured to: setting a temporary traversal in a data view binding method in a data chain manager, wherein a first parameter in the data view binding method is a key data chain, and a second parameter is a page view; taking the first parameter as a key data chain of the temporary traversal, and taking the second parameter as a page view of the temporary traversal; storing the temporary traversal into the view data chain mapping list.
On the basis of the foregoing embodiment, the refresh unit in this embodiment is specifically configured to: when the key data in the page are reset, traversing the key data chain; for each key data chain, if key data which are the same as the key codes of the reset key data and have different values exist in the key data chain, acquiring a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view.
On the basis of the foregoing embodiments, the refresh unit in this embodiment is further specifically configured to: and for each key data chain in the view data chain mapping list, if the key data chain has the key data which is the same as the key code of the reset key data, acquiring the page view corresponding to the key data chain.
On the basis of the foregoing embodiment, the refresh unit in this embodiment is further specifically configured to: for each key data chain in the view data chain mapping list, if the key data chain has the key data same as the key code of the reset key data, taking the value of the reset key data as the value of the key data same as the key code of the reset key data in the key data chain.
On the basis of the foregoing embodiment, the refresh unit in this embodiment is further specifically configured to: creating a key data setting method in a data manager, wherein parameters of the key data setting method are reset key data, and the reset key data comprise a key code and a value; in the key data setting method, if the values of the key data before and after resetting are different, a page view acquisition method is called; in the page view acquisition method, a corresponding page view is acquired in the view data chain mapping list according to the reset key data, and the reset key data is used as a parameter of a page refresh method to refresh the corresponding page view.
The present embodiment provides a device for refreshing a page in Flash, and fig. 3 is a schematic diagram of an overall structure of the device for refreshing a page in Flash according to the present embodiment of the present invention, where the device includes: at least one processor 31, at least one memory 32, and a bus 33; wherein the content of the first and second substances,
the processor 31 and the memory 32 complete mutual communication through the bus 33;
the memory 32 stores program instructions executable by the processor 31, and the processor calls the program instructions to execute the methods provided by the method embodiments, for example, the method includes: s1, respectively using a set of key data set when each page view in the page is refreshed as a key data chain, binding the key data chain with the corresponding page view, and generating a view data chain mapping list; s2, when resetting the key data in the page, if the values of the key data before and after resetting are different, obtaining a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: s1, respectively using a set of key data set when each page view in the page is refreshed as a key data chain, binding the key data chain with the corresponding page view, and generating a view data chain mapping list; s2, when resetting the key data in the page, if the values of the key data before and after resetting are different, obtaining a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the page refreshing apparatus in Flash are merely illustrative, where the units illustrated as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, the method of the present application is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A page refreshing method in Flash is characterized by comprising the following steps:
s1, respectively taking a set of key data set during refreshing of each page view in a page as a key data chain, binding each key data chain with the corresponding page view, and generating a view data chain mapping list, wherein the key data are data which can enable the page view to be refreshed during changing and are global variables;
s2, when resetting the key data in the page, if the values of the key data before and after resetting are different, acquiring a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view;
the step S2 further includes:
creating a key data setting method in a data manager, wherein parameters of the key data setting method are reset key data, and the reset key data comprise a key code and a value;
in the key data setting method, if the values of the key data before and after resetting are different, a page view acquisition method is called;
in the page view acquisition method, a corresponding page view is acquired in the view data chain mapping list according to the reset key data, and the reset key data is used as a parameter of a page refresh method to refresh the corresponding page view.
2. The method according to claim 1, wherein the step S1 specifically includes:
in a data chain manager, respectively storing key data set when each page view in the page is refreshed into an array, and taking each array as a key data chain;
and for each key data chain, storing the key data chain and the page view corresponding to the key data chain as an object, and taking all the objects as the view data chain mapping list.
3. The method according to claim 1 or 2, wherein in step S1, each key data chain is bound to a corresponding page view, and the step of generating the view data chain mapping list specifically includes:
setting a temporary traversal in a data view binding method in a data chain manager, wherein a first parameter in the data view binding method is a key data chain, and a second parameter is a page view;
taking the first parameter as a key data chain of the temporary traversal, and taking the second parameter as a page view of the temporary traversal;
storing the temporary traversal into the view data chain mapping list.
4. The method according to claim 1 or 2, wherein the step S2 specifically includes:
when the key data in the page are reset, traversing the key data chain;
for each key data chain, if key data which are the same as the key codes of the reset key data and have different values exist in the key data chain, acquiring a corresponding page view in the view data chain mapping list according to the reset key data, and refreshing the page by using the corresponding page view.
5. The method according to claim 4, wherein the step of obtaining the corresponding page view in the view data chain mapping list according to the reset key data specifically comprises:
and for each key data chain in the view data chain mapping list, if the key data chain has the key data which is the same as the key code of the reset key data, acquiring the page view corresponding to the key data chain.
6. The method according to claim 4, wherein the step of obtaining the page view to be refreshed in the view data chain mapping list according to the reset key data further comprises:
for each key data chain in the view data chain mapping list, if the key data chain has the key data same as the key code of the reset key data, taking the value of the reset key data as the value of the key data same as the key code of the reset key data in the key data chain.
7. A page refreshing device in Flash is characterized by comprising:
the binding unit is used for respectively taking a set of key data set during refreshing of each page view in a page as a key data chain, binding each key data chain with the corresponding page view, and generating a view data chain mapping list, wherein the key data are data which can enable the page view to be refreshed during changing and are global variables;
the refreshing unit is used for acquiring a corresponding page view in the view data chain mapping list according to the reset key data and refreshing the page by using the corresponding page view if the values of the key data before and after the reset are different when the key data in the page are reset;
accordingly, the refresh unit is further specifically configured to:
creating a key data setting method in a data manager, wherein parameters of the key data setting method are reset key data, and the reset key data comprise a key code and a value;
in the key data setting method, if the values of the key data before and after resetting are different, a page view acquisition method is called;
in the page view acquisition method, a corresponding page view is acquired in the view data chain mapping list according to the reset key data, and the reset key data is used as a parameter of a page refresh method to refresh the corresponding page view.
8. A page refreshing device in Flash is characterized by comprising:
at least one processor, at least one memory, and a bus; wherein the content of the first and second substances,
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 6.
CN201710842944.7A 2017-09-18 2017-09-18 Method and device for refreshing page in Flash Active CN107589978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710842944.7A CN107589978B (en) 2017-09-18 2017-09-18 Method and device for refreshing page in Flash

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710842944.7A CN107589978B (en) 2017-09-18 2017-09-18 Method and device for refreshing page in Flash

Publications (2)

Publication Number Publication Date
CN107589978A CN107589978A (en) 2018-01-16
CN107589978B true CN107589978B (en) 2021-11-26

Family

ID=61047457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710842944.7A Active CN107589978B (en) 2017-09-18 2017-09-18 Method and device for refreshing page in Flash

Country Status (1)

Country Link
CN (1) CN107589978B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109670130B (en) * 2018-11-28 2022-02-18 国云科技股份有限公司 Front-end page long-task multi-page refreshing method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9098455B2 (en) * 2004-06-01 2015-08-04 Inmage Systems, Inc. Systems and methods of event driven recovery management

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8001463B2 (en) * 2002-12-02 2011-08-16 Oracle International Corporation Web page communications using parameters and events
CN106302008B (en) * 2016-08-05 2019-02-26 腾讯科技(深圳)有限公司 Data-updating method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9098455B2 (en) * 2004-06-01 2015-08-04 Inmage Systems, Inc. Systems and methods of event driven recovery management

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一份不错的vue.js基础笔记;就酱样Y;《www.cnblogs.com/yueyue-love/p/6215711.html》;20161223;第一页 *
数据驱动视图简单实现;前端C罗;《www.jianshu.com/p/b1a28d0aea8c》;20160531;第一页 *

Also Published As

Publication number Publication date
CN107589978A (en) 2018-01-16

Similar Documents

Publication Publication Date Title
CN106527892B (en) Screen capturing method and system of electronic equipment
US10275339B2 (en) Accessibility testing software automation tool
CN110244942B (en) Page generation method, device and system
US11138216B2 (en) Automatically invoked unified visualization interface
CN105260170B (en) A kind of accident deducing manoeuver method and system based on case
US11481948B2 (en) Method, device and storage medium for generating animation group by synthesizing animation layers based on tree structure relation between behavior information and sub-behavior information
CN106681701B (en) Task display method and device
WO2022048329A1 (en) Menu display method and apparatus
US20140019889A1 (en) Regenerating a user interface area
US10067859B2 (en) Constructing test-centric model of application
CN109800135A (en) A kind of information processing method and terminal
CN107766307B (en) Method and equipment for linkage of table elements
US10210001B2 (en) Automatic execution of objects in a user interface
CN107589978B (en) Method and device for refreshing page in Flash
CN106201461A (en) Generation method, system and the background server at a kind of interface
US20180336122A1 (en) Generating application flow entities
US9430125B1 (en) Simplifying rules generation for an event-based analysis engine
US20130239096A1 (en) Application Programming Interface Tracing Mechanism
US10896161B2 (en) Integrated computing environment for managing and presenting design iterations
CN104778087B (en) A kind of information processing method and information processing unit
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
US20130311974A1 (en) Debugger integration of reporting tool renderer
CN110908647B (en) Building block type programmed object variable presenting method, device, terminal and storage medium
US9552347B1 (en) Data grid cell styling systems and methods
CN112416995B (en) Data statistics 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
GR01 Patent grant
GR01 Patent grant