CN110032404A - A kind of management method and device of refresh tasks - Google Patents

A kind of management method and device of refresh tasks Download PDF

Info

Publication number
CN110032404A
CN110032404A CN201811440902.1A CN201811440902A CN110032404A CN 110032404 A CN110032404 A CN 110032404A CN 201811440902 A CN201811440902 A CN 201811440902A CN 110032404 A CN110032404 A CN 110032404A
Authority
CN
China
Prior art keywords
component
refresh tasks
single page
management center
task management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811440902.1A
Other languages
Chinese (zh)
Other versions
CN110032404B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811440902.1A priority Critical patent/CN110032404B/en
Publication of CN110032404A publication Critical patent/CN110032404A/en
Application granted granted Critical
Publication of CN110032404B publication Critical patent/CN110032404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Memory System (AREA)

Abstract

Disclose the management method and device of a kind of refresh tasks.A kind of management method of refresh tasks is applied to single page application, is pre-configured with task management center in single page application, this method comprises: task management center establishes corresponding refresh tasks when receiving the refresh tasks register instruction of any component transmission;When external event triggering, task management center accesses each component for currently including in the single page application, obtains the external event and triggers generated parameter current information;According to the parameter current information, it is the established corresponding refresh tasks of each component for currently including in single page application that task management center, which executes, so that each component for currently including in single page application obtains the corresponding latest data of the parameter current information;When the refresh tasks for receiving any component transmission cancel instruction, task management center removes corresponding refresh tasks.

Description

A kind of management method and device of refresh tasks
Technical field
This specification embodiment is related to the management method and dress of single page applied technical field more particularly to a kind of refresh tasks It sets.
Background technique
Single page is a kind of special Web page application using (Single Page Application, referred to as SPA).It All activities are confined in a Web page, only load corresponding HTML, CSS when the Web page initializes (Cascading Style Sheets, cascading style sheets) and JavaScript.Once page load completes, single page application Will not because of user operation and carry out reloading or jumping for the page, instead using JavaScript it is dynamic The content (being showed usually in the form of component, component is the simplified package to data and method) for converting HTML, to realize UI With the interaction of user.Since single page application avoids reloading for the page, more smooth user experience can be provided.
At present for traditional single page application, especially for the single page application of monitoring type, it is (every that it includes a large amount of components A component has the life cycle of oneself), it is required to realize automatic refresh function.And single page generally passes through using each component at present Refresh tasks realize automatic refresh function, and general single page is managed using giving refresh tasks to component itself, that is, work as component Component itself opens refresh tasks when load, and then when component unloads, component itself cancels refresh tasks, during which works as external thing When part triggers (such as Parameters variation), component needs voluntarily to handle, and executes a refresh tasks to guarantee data consistency.
Since each component itself manages refresh tasks, during which when external event triggers, each component needs voluntarily to locate Reason, and a refresh tasks are executed to guarantee data consistency, such encoder complexity is higher, can expend developer accordingly More time and efforts.
Summary of the invention
In view of the above technical problems, this specification embodiment provides the management method and device of a kind of refresh tasks, technology Scheme is as follows:
A kind of management method of refresh tasks is applied to single page application, is pre-configured with task pipe in single page application Reason center, this method comprises:
When receiving the refresh tasks register instruction of any component transmission, task management center is established corresponding refresh and is appointed Business;
When external event triggering, task management center accesses each component for currently including in the single page application, obtains The external event triggers generated parameter current information;
According to the parameter current information, it is each component for currently including in single page application that task management center, which executes, Established corresponding refresh tasks, so that each component for currently including in single page application obtains the parameter current The corresponding latest data of information;
When the refresh tasks for receiving any component transmission cancel instruction, task management center removes corresponding refresh and appoints Business.
A kind of managing device of refresh tasks, is applied to single page application, which includes:
Configuration module, for being pre-configured with task management center in single page application;
Task creation module, for when receiving the refresh tasks register instruction of any component transmission, in task management The heart establishes corresponding refresh tasks;
Data obtaining module, for when external event triggering, task management center to access current in the single page application Each component for including obtains the external event and triggers generated parameter current information;
Task execution module, for according to the parameter current information, it to be the single page application that task management center, which executes, In currently include the established corresponding refresh tasks of each component so that the single page application in currently include each group Part obtains the corresponding latest data of the parameter current information;
Task remove module, for when the refresh tasks for receiving any component transmission cancel instruction, in task management The heart removes corresponding refresh tasks.
Technical solution provided by this specification embodiment is pre-configured with task management center, task in single page application Administrative center can be managed collectively refresh tasks: when receiving the refresh tasks register instruction of any component transmission, task pipe Corresponding refresh tasks are established at reason center;When external event triggering, currently include in task management center access single page application Each component, obtain external event trigger caused by parameter current information execute and answered for single page according to the current parameter information The established corresponding refresh tasks of each component for currently including in, so that each component for currently including in single page application Obtain the corresponding latest data of parameter current information;When the refresh tasks for receiving any component transmission cancel instruction, task Administrative center removes corresponding refresh tasks.In this way, task management center can be managed collectively refresh tasks, can make point The data maintenance task being dispersed in each component is unitized, can be effectively reduced encoder complexity, can also reduce exploitation accordingly Time and efforts spent by personnel.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not This specification embodiment can be limited.
In addition, any embodiment in this specification embodiment does not need to reach above-mentioned whole effects.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only The some embodiments recorded in this specification embodiment for those of ordinary skill in the art can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is structural schematic diagram in single page application in the prior art;
Fig. 2 is structural schematic diagram in a kind of single page application of this specification embodiment;
Fig. 3 is a kind of implementation flow chart of the management method of refresh tasks of this specification embodiment;
Fig. 4 is a kind of structural schematic diagram of the managing device of refresh tasks of this specification embodiment;
Fig. 5 is the structural schematic diagram for configuring a kind of equipment of this specification embodiment device.
Specific embodiment
Single page application is a kind of special Web page application.All activities are confined in a Web page by it, only The Web page initialization when load corresponding HTML, CSS (Cascading Style Sheets, cascading style sheets) and JavaScript, activities are all controlled by JavaScript.Once page load completes, single page application will not be because of use The operation at family and carry out reloading or jumping for the page, instead added using the dynamic control assembly of JavaScript It carries and unloads, to realize the interaction of UI and user.
A large amount of components are generally comprised especially for the single page application of monitoring type for traditional single page application at present, It is required to realize automatic refresh function, and current single page generally passes through refresh tasks using each component and realizes automatic refresh function. As shown in Figure 1, be a single page schematic diagram of application structure, include 4 components, respectively component A, component B, component C, component D, often A component can realize automatic refresh function by refresh tasks, and general single page is applied and gives refresh tasks to component sheet Body is managed, and assembly management refresh tasks are broadly divided into three parts: when component loads, component itself opens refreshing first Task;Then when external event triggers (such as Parameters variation), component needs voluntarily to handle, and executes a refresh tasks to protect Demonstrate,prove data consistency;Secondly when component unloading, component itself cancels refresh tasks.So for component A, component B, component C, Component D, each component itself manage refresh tasks, and encoder complexity is higher, can expend developer's more time accordingly And energy.
In view of the above-mentioned problems, this specification embodiment provides a kind of technical solution, task is pre-configured in single page application Administrative center is managed collectively refresh tasks, as shown in Fig. 2, showing for a kind of single page application structure that this specification embodiment provides It is intended to, includes 4 components, respectively component A, component B, component C, component D, task management center unified management component A, component B, the refresh tasks of component C, component D, the data maintenance task that can be will be dispersed in each component is unitized, can effectively drop Low encoder complexity can also reduce time and efforts spent by developer accordingly.
The technical solution that specific this specification embodiment provides is as follows:
When receiving the refresh tasks register instruction of any component transmission, task management center is established corresponding refresh and is appointed Business;When external event triggering, task management center accesses each component for currently including in the single page application, obtains described outer Portion's event triggers generated parameter current information;According to the parameter current information, it is the list that task management center, which executes, The established corresponding refresh tasks of each component for currently including in page application, so as to currently include in single page application Each component obtain the corresponding latest data of the parameter current information;When the refresh tasks for receiving any component transmission are cancelled When instruction, task management center removes corresponding refresh tasks.
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual, Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
As shown in figure 3, be the implementation flow chart of the management method for the refresh tasks that this specification embodiment provides, it is specific It may comprise steps of:
The refresh tasks management method that wherein this specification embodiment provides is broadly divided into three parts, respectively refreshes and appoints Business is established, refresh tasks execute and refresh tasks remove, and is illustrated separately below:
Refresh tasks establish part:
S301, when receiving the refresh tasks register instruction of any component transmission, task management center is established corresponding Refresh tasks;
In the present specification, when component, which loads, to be completed, refresh tasks register instruction can be sent to task management center, it is right For task management center, it is likely to be received the refresh tasks register instruction of any component transmission, when receiving any component When the refresh tasks register instruction of transmission, it is meant that the refresh tasks register instruction is issued in the case where component is loaded and completed , task management center (such as task pool) can establish corresponding refresh tasks directly in a reservoir.
Component A as shown in Figure 2, component B, component C, component D, single page application initialization charging assembly A, component B, component C, component D, once component A, component B, component C, component D load complete, component A, component B, component C, component D can respectively to Task management center sends refresh tasks register instruction, when task management center receives component A, component B, component C, component D When the refresh tasks register instruction sent respectively, then it can establish and component A, component B, component C, the corresponding refreshing of component D Task.
Preferably, it is established before corresponding refresh tasks in a reservoir, searches whether that there are corresponding are in not to depend on shape The refresh tasks of state, if it does not exist, task management center establish corresponding refresh tasks in a reservoir, and if it exists, will then correspond to Attached in container again in the refresh tasks for not depending on state, it is not necessary to establish corresponding refresh tasks.Here in not The refresh tasks for depending on state are the refresh tasks for not depending on container, and state is unavailable.
Refresh tasks execution part:
S302, when external event triggering, task management center accesses each component for currently including in the single page application, It obtains the external event and triggers generated parameter current information;
After by above-mentioned steps S301, each component for currently including in single page application has been established corresponding refresh and appoints Business needs to be implemented the corresponding refresh tasks of each component when external event triggering, to guarantee data consistency, will be dispersed in each Data maintenance task in component is unitized.
External event can be parameter change, page change, timed task etc., such as single page application, display nearest 5 Data in it, user's adjustment time parameter, the data in display nearest 7 days, in another example every for the component in single page application It is spaced 5 seconds and refreshes once.When the triggering of said external event, before executing the corresponding refresh tasks of each component, in order to protect Data consistency is demonstrate,proved, task management center needs to access each component for currently including in single page application, obtains said external event Parameter current information caused by triggering, such as by taking parameter change as an example, user's adjustment time parameter, in display nearest 7 days Data, for task management center, in this case it is not apparent which 7 days this 7 days be specifically, therefore then task management center needs to access Each component in single page application, obtains the parameter current information as caused by adjustment time parameter, that is, determines that this 7 days are specifically which 7 days.
Preferably, when external event triggers, said external thing is determined from each component for currently including in single page application Part triggers the component being directed to, and current ginseng caused by the triggering of said external event is obtained from the component that external event triggering is directed to Number information.
Such as component A as shown in Figure 2, component B, component C, component D, the object that external event triggering is directed to is component A, The object that task management center determines that external event triggering is directed to from said modules A, component B, component C, component D is component A, Said external event can be then obtained from component A triggers generated parameter current information.
S303, according to the parameter current information, task management center, which executes in the single page application, currently includes Each established corresponding refresh tasks of component, so as to work as described in each component acquisition for currently including in single page application The corresponding latest data of preceding parameter information;
For parameter current information obtained in S302, can be executed according to the parameter information, task management center For the established corresponding refresh tasks of each component for currently including in single page application, then each component can refresh once, The corresponding latest data of parameter current information is obtained, can so guarantee data consistency in each component.
Such as component A as shown in Figure 2, component B, component C, component D, current time parameter obtained in S302 is believed Breath is 2017-01-05 to 2017-01-12, and according to the time parameter information, task management center can be executed as component A, group The established corresponding refresh tasks of part B, component C, component D, each self-refresh one of component A, component B, component C, component D Secondary, component A, component B, component C, component D respectively obtain the corresponding latest data of 2017-01-05 to 2017-01-12, so may be used So that the time range for the data that component A, component B, component C, component D are shown is 2017-01-05 to 2017-01-12, guarantee Data consistency.
Refresh tasks remove part:
S304, when the refresh tasks for receiving any component transmission cancel instruction, task management center removes corresponding Refresh tasks.
Since each refresh tasks correspond to unique component, each component has the life cycle of itself, therefore works as component When starting unloading, refresh tasks are sent to task management center and cancel instruction, for task management center, when reception is taken office When the refresh tasks that one component is sent cancel instruction, the refresh tasks cancellation instruction that can learn that any component is sent is any Component starts the refresh tasks sent in the case where unloading and cancels instruction, removes corresponding refresh tasks from container, makes to be moved The refresh tasks removed are in and do not depend on state, i.e., do not depend on container, and state is unavailable.
Such as component A as shown in Figure 2, component B, component C, component D, refresh when component A is sent to task management center When task cancels instruction, task management center receives the instruction, removes the corresponding refresh tasks of component A from container, makes at its It is subsequent when component A reloads completion in not depending on state, the refresh tasks register instruction of component A transmission is received, directly It is attached in container again in the refresh tasks for not depending on state by component A is corresponding, state is available at this time, it is not necessary to again Re-establish the corresponding refresh tasks of component A.
By the description of the above-mentioned technical solution provided this specification embodiment, task is pre-configured in single page application Administrative center, task management center can be managed collectively refresh tasks: when the refresh tasks registration for receiving any component transmission When instruction, task management center establishes corresponding refresh tasks;When external event triggering, task management center access single page is answered Each component for currently including in, obtain external event trigger caused by parameter current information, according to the current parameter information, Executing is the established corresponding refresh tasks of each component for currently including in single page application, so that current in single page application Each component for including obtains the corresponding latest data of parameter current information;When the refresh tasks for receiving any component transmission are cancelled When instruction, task management center removes corresponding refresh tasks.Appoint in this way, which task management center can be managed collectively refreshing Business can make the data maintenance task being dispersed in each component unitized, can be effectively reduced encoder complexity, accordingly Time and efforts spent by developer can be reduced.
Relative to above method embodiment, this specification embodiment also provides a kind of managing device of refresh tasks, referring to Shown in Fig. 4, which be can specifically include: configuration module 410, task creation module 420, data obtaining module 430, task are held Row module 440, task remove module 450.
Configuration module 410, for being pre-configured with task management center in single page application;
Task creation module 420, for when receive any component transmission refresh tasks register instruction when, task management Corresponding refresh tasks are established at center;
Data obtaining module 430, for when external event triggering, task management center access in single page application when The preceding each component for including obtains the external event and triggers generated parameter current information;
Task execution module 440, for according to the parameter current information, it to be that the single page is answered that task management center, which executes, The established corresponding refresh tasks of each component for currently including in, so that currently include in single page application is each Component obtains the corresponding latest data of the parameter current information;
Task remove module 450, for when receive any component transmission refresh tasks cancel instruction when, task management Center removes corresponding refresh tasks.
In a kind of specific embodiment of this specification, the data obtaining module 430 is specifically used for:
When external event triggering, external event triggering needle is determined from each component for currently including in single page application Pair component;
The external event is obtained from the component that external event triggering is directed to triggers generated parameter current information.
In a kind of specific embodiment of this specification, the task creation module 420 is specifically used for:
When receiving the refresh tasks register instruction of any component transmission, search whether that there are corresponding are in not to depend on The refresh tasks of state;
If it does not exist, task management center establishes corresponding refresh tasks in a reservoir, otherwise by it is corresponding in not according to The refresh tasks of attached state attach in container again.
In a kind of specific embodiment of this specification, the task remove module 450 is specifically used for:
When the refresh tasks for receiving any component transmission cancel instruction, task management center is removed from the container Corresponding refresh tasks are in removed refresh tasks and do not depend on state.
In a kind of specific embodiment of this specification,
The refresh tasks register instruction that any component is sent is sent in the case where any component is loaded and completed Refresh tasks register instruction;
It is to start to send in the case where unloading in any component that the refresh tasks that any component is sent, which cancel instruction, Refresh tasks cancel instruction.
The function of modules and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
By the description of the above-mentioned technical solution provided this specification embodiment, task is pre-configured in single page application Administrative center, task management center can be managed collectively refresh tasks: when the refresh tasks registration for receiving any component transmission When instruction, task management center establishes corresponding refresh tasks;When external event triggering, task management center access single page is answered Each component for currently including in, obtain external event trigger caused by parameter current information, according to the current parameter information, Executing is the established corresponding refresh tasks of each component for currently including in single page application, so that current in single page application Each component for including obtains the corresponding latest data of parameter current information;When the refresh tasks for receiving any component transmission are cancelled When instruction, task management center removes corresponding refresh tasks.Appoint in this way, which task management center can be managed collectively refreshing Business can make the data maintenance task being dispersed in each component unitized, can be effectively reduced encoder complexity, accordingly Time and efforts spent by developer can be reduced.
This specification embodiment also provides a kind of computer equipment, as shown in figure 5, the equipment may include: processor 510, memory 520, input/output interface 530, communication interface 540 and bus 550.Wherein processor 510, memory 520, Input/output interface 530 and communication interface 540 pass through the communication connection between the realization of bus 550 inside equipment.
Processor 510 can use general CPU (Central Processing Unit, central processing unit), micro process Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 520 can use ROM (Read Only Memory, read-only memory), RAM (Random Access Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 520 can store Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware When, relevant program code is stored in memory 520, and execution is called by processor 510.
Input/output interface 530 is for connecting input/output module, to realize information input and output.Input and output/ Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display, Loudspeaker, vibrator, indicator light etc..
Communication interface 540 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly (such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 550 includes an access, in various components (such as the processor 510, memory 520, input/output of equipment Interface 530 and communication interface 540) between transmit information.
It should be noted that although above equipment illustrates only processor 510, memory 520, input/output interface 530, communication interface 540 and bus 550, but in the specific implementation process, which can also include realizing to operate normally Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment Component necessary to this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey The management method of refresh tasks above-mentioned is realized when sequence is executed by processor.This method includes at least:
A kind of management method of refresh tasks is applied to single page application, is pre-configured with task pipe in single page application Reason center, this method comprises:
When receiving the refresh tasks register instruction of any component transmission, task management center is established corresponding refresh and is appointed Business;
When external event triggering, task management center accesses each component for currently including in the single page application, obtains The external event triggers generated parameter current information;
According to the parameter current information, it is each component for currently including in single page application that task management center, which executes, Established corresponding refresh tasks, so that each component for currently including in single page application obtains the parameter current The corresponding latest data of information;
When the refresh tasks for receiving any component transmission cancel instruction, task management center removes corresponding refresh and appoints Business.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media, can be by any side Method or technology realize that information stores.Information can be computer readable instructions, data structure, the module of program or other numbers According to.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to Herein defines, and computer-readable medium does not include temporary computer readable media (transitory media), such as modulation Data-signal and carrier wave.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words, The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description Module may or may not be physically separated, can be each module when implementing this specification example scheme Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.

Claims (11)

1. a kind of management method of refresh tasks is applied to single page application, task management is pre-configured in single page application Center, this method comprises:
When receiving the refresh tasks register instruction of any component transmission, task management center establishes corresponding refresh tasks;
When external event triggering, task management center accesses each component for currently including in single page application, described in acquisition External event triggers generated parameter current information;
According to the parameter current information, it is built that task management center executes each component for being currently include in single page application Vertical corresponding refresh tasks, so that each component for currently including in single page application obtains the parameter current information Corresponding latest data;
When the refresh tasks for receiving any component transmission cancel instruction, task management center removes corresponding refresh tasks.
2. task management center accesses the single page and answers according to the method described in claim 1, described when external event triggering Each component for currently including in obtains the external event and triggers generated parameter current information, comprising:
When external event triggering, determine that external event triggering is directed to from each component for currently including in single page application Component;
The external event is obtained from the component that external event triggering is directed to triggers generated parameter current information.
3. according to the method described in claim 1, it is described when receive any component transmission refresh tasks register instruction when, appoint Business administrative center establishes corresponding refresh tasks, comprising:
When receiving the refresh tasks register instruction of any component transmission, search whether that there are corresponding are in not to depend on state Refresh tasks;
If it does not exist, task management center establishes corresponding refresh tasks in a reservoir, and corresponding be in otherwise is not depended on shape The refresh tasks of state attach in container again.
4. according to the method described in claim 3, it is described when receive any component transmission refresh tasks cancel instruction when, appoint Business administrative center removes corresponding refresh tasks, comprising:
When the refresh tasks for receiving any component transmission cancel instruction, task management center removes correspondence from the container Refresh tasks, make removed refresh tasks be in do not depend on state.
5. method according to any one of claims 1 to 4,
The refresh tasks register instruction that any component is sent is the refreshing sent in the case where any component is loaded and completed Task registration instruction;
It is the refreshing for starting to send in the case where unloading in any component that the refresh tasks that any component is sent, which cancel instruction, Task cancels instruction.
6. a kind of managing device of refresh tasks, is applied to single page application, which includes:
Configuration module, for being pre-configured with task management center in single page application;
Task creation module, for when receiving the refresh tasks register instruction of any component transmission, task management center to be built Found corresponding refresh tasks;
Data obtaining module, for currently including in the task management center access single page application when external event triggering Each component, obtain the external event trigger caused by parameter current information;
Task execution module, for according to the parameter current information, task management center execute be in single page application when The preceding established corresponding refresh tasks of each component for including, so that each component for currently including in single page application obtains Take the corresponding latest data of the parameter current information;
Task remove module, for when the refresh tasks for receiving any component transmission cancel instruction, task management center to be moved Except corresponding refresh tasks.
7. device according to claim 6, the data obtaining module is specifically used for:
When external event triggering, determine that external event triggering is directed to from each component for currently including in single page application Component;
The external event is obtained from the component that external event triggering is directed to triggers generated parameter current information.
8. device according to claim 6, the task creation module is specifically used for:
When receiving the refresh tasks register instruction of any component transmission, search whether that there are corresponding are in not to depend on state Refresh tasks;
If it does not exist, task management center establishes corresponding refresh tasks in a reservoir, and corresponding be in otherwise is not depended on shape The refresh tasks of state attach in container again.
9. device according to claim 8, the task remove module is specifically used for:
When the refresh tasks for receiving any component transmission cancel instruction, task management center removes correspondence from the container Refresh tasks, make removed refresh tasks be in do not depend on state.
10. according to the described in any item devices of claim 6 to 9,
The refresh tasks register instruction that any component is sent is the refreshing sent in the case where any component is loaded and completed Task registration instruction;
It is the refreshing for starting to send in the case where unloading in any component that the refresh tasks that any component is sent, which cancel instruction, Task cancels instruction.
11. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, wherein the processor realizes such as method described in any one of claim 1 to 5 when executing described program.
CN201811440902.1A 2018-11-29 2018-11-29 Method and device for managing refresh tasks Active CN110032404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811440902.1A CN110032404B (en) 2018-11-29 2018-11-29 Method and device for managing refresh tasks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811440902.1A CN110032404B (en) 2018-11-29 2018-11-29 Method and device for managing refresh tasks

Publications (2)

Publication Number Publication Date
CN110032404A true CN110032404A (en) 2019-07-19
CN110032404B CN110032404B (en) 2021-11-02

Family

ID=67235294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811440902.1A Active CN110032404B (en) 2018-11-29 2018-11-29 Method and device for managing refresh tasks

Country Status (1)

Country Link
CN (1) CN110032404B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569463A (en) * 2019-08-02 2019-12-13 视联动力信息技术股份有限公司 Page refreshing method and device and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100262678A1 (en) * 2009-04-13 2010-10-14 Microsoft Corporation Configuration of a single-purpose application via a web application
CN103546476A (en) * 2013-10-30 2014-01-29 北京华胜天成科技股份有限公司 Transmission method and system for information between page assemblies
US20150281321A1 (en) * 2014-03-28 2015-10-01 Viachaslau Hrytsevich Real-time event monitoring and video surveillance web application based on data push
CN105739984A (en) * 2016-01-29 2016-07-06 中国人民解放军63811部队 Qt based high maintenance data display frame
CN106293972A (en) * 2016-08-12 2017-01-04 金蝶软件(中国)有限公司 The single page application page means of communication and device
CN107291462A (en) * 2017-06-13 2017-10-24 成都四方伟业软件股份有限公司 The self-defined method of combination of interactive data system, system and compiling, operation method
CN108536832A (en) * 2018-04-12 2018-09-14 江南大学 A kind of page layout switch intelligent animation effect application process and system
CN108769152A (en) * 2018-05-15 2018-11-06 阿里巴巴集团控股有限公司 Service flushing policy registration, service refresh requests method, apparatus and equipment
CN108874389A (en) * 2018-06-27 2018-11-23 中国建设银行股份有限公司 front end page development framework

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100262678A1 (en) * 2009-04-13 2010-10-14 Microsoft Corporation Configuration of a single-purpose application via a web application
CN103546476A (en) * 2013-10-30 2014-01-29 北京华胜天成科技股份有限公司 Transmission method and system for information between page assemblies
US20150281321A1 (en) * 2014-03-28 2015-10-01 Viachaslau Hrytsevich Real-time event monitoring and video surveillance web application based on data push
CN105739984A (en) * 2016-01-29 2016-07-06 中国人民解放军63811部队 Qt based high maintenance data display frame
CN106293972A (en) * 2016-08-12 2017-01-04 金蝶软件(中国)有限公司 The single page application page means of communication and device
CN107291462A (en) * 2017-06-13 2017-10-24 成都四方伟业软件股份有限公司 The self-defined method of combination of interactive data system, system and compiling, operation method
CN108536832A (en) * 2018-04-12 2018-09-14 江南大学 A kind of page layout switch intelligent animation effect application process and system
CN108769152A (en) * 2018-05-15 2018-11-06 阿里巴巴集团控股有限公司 Service flushing policy registration, service refresh requests method, apparatus and equipment
CN108874389A (en) * 2018-06-27 2018-11-23 中国建设银行股份有限公司 front end page development framework

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈辰等: "" 基于路由模式的前端框架设计与改进"", 《电脑知识与技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110569463A (en) * 2019-08-02 2019-12-13 视联动力信息技术股份有限公司 Page refreshing method and device and storage medium
CN110569463B (en) * 2019-08-02 2022-06-14 视联动力信息技术股份有限公司 Page refreshing method and device and storage medium

Also Published As

Publication number Publication date
CN110032404B (en) 2021-11-02

Similar Documents

Publication Publication Date Title
EP3998720A2 (en) Orchestrator execution planning using a distributed ledger
JP6106344B2 (en) Location-based software update
CN109636384A (en) A kind of parallelization executes the method, apparatus and system of block chain transaction
CN104680876B (en) Teaching monitoring method, system and device for learning machine
EP2739097B1 (en) A mobile telecommunication device in a cellular-digital wireless telecommunication system and a method for operating thereof
CN108242837A (en) The method of the charging of electronic equipment and control electronics
CN109145238A (en) Card display method and device and mobile device
CN111694617B (en) Processing method of network offline model, artificial intelligence processing device and related products
CN110187923A (en) A kind of CPU starting method and apparatus applied to multi -CPU board
CN106445063A (en) Method of managing application and electronic device therefor
CN107923980A (en) Method and apparatus for providing positional information
CN105260082A (en) Display method for test data and development terminal
CN113553178A (en) Task processing method and device and electronic equipment
CN107463422A (en) Code dispositions method and device, electronic equipment
EP4300310A1 (en) Opportunistic placement of compute in an edge network
CN110019537A (en) Local cache method for refreshing, device, computer equipment and storage medium
CN110020383A (en) A kind of page data request processing method and processing device
CN109102200B (en) Timed task processing method and device
CN110032404A (en) A kind of management method and device of refresh tasks
CN110019538A (en) A kind of tables of data switching method and device
CN110188975A (en) A kind of resource acquiring method and device
Palmer et al. The case for smartphones as an urgent computing client platform
Park et al. Self-adaptive middleware framework for internet of things
CN110020264A (en) A kind of determination method and device of broken hyperlink
CN116954878A (en) Method, apparatus, device, storage medium and program product for managing container clusters

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40010772

Country of ref document: HK

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant