CN114090146A - Data loading completion determining method, device and equipment - Google Patents

Data loading completion determining method, device and equipment Download PDF

Info

Publication number
CN114090146A
CN114090146A CN202111263621.5A CN202111263621A CN114090146A CN 114090146 A CN114090146 A CN 114090146A CN 202111263621 A CN202111263621 A CN 202111263621A CN 114090146 A CN114090146 A CN 114090146A
Authority
CN
China
Prior art keywords
page operation
target component
dynamic variable
data
target
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
CN202111263621.5A
Other languages
Chinese (zh)
Other versions
CN114090146B (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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202111263621.5A priority Critical patent/CN114090146B/en
Publication of CN114090146A publication Critical patent/CN114090146A/en
Application granted granted Critical
Publication of CN114090146B publication Critical patent/CN114090146B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application discloses a method, a device and equipment for determining data loading completion, which are used for determining page operation, component request number corresponding to the page operation and dynamic variables corresponding to the page operation. And generating a target component request corresponding to the target component based on the target component. The target component is any one of the components corresponding to the page operation. The target component request is for obtaining target data. And after the target data is acquired, determining that the target assembly request is completed, and sending the dynamic variable corresponding to the page operation to the target assembly so that the target assembly updates the dynamic variable corresponding to the page operation. And when the numerical value of the dynamic variable corresponding to the page operation reaches the preset number, determining that the data loading required by the page operation is finished. The data required by the page operation consists of target data acquired by the components corresponding to the page operation. Therefore, whether the data required by the page operation is loaded or not is monitored through the set dynamic variable, and inaccuracy caused by manually setting the loading time is avoided.

Description

Data loading completion determining method, device and equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, and a device for determining completion of data loading.
Background
As component technology advances, more and more components are applied to front-end pages, and a component can be understood as a functional module.
In the front-end page, some page operations can be executed after the required data is loaded. For example, if the page operation is to determine the data contrast relationship between the source database and the destination database. Before determining the comparison, a component is required to issue data requests to obtain various data in the source database and the destination database, such as tables or fields in the databases.
Currently, by setting the loading time in the page, the page operation is completed when the loading time is reached. But the artificially set loading time may be inaccurate. In addition, whether the request of each component is completed can be polled and checked by setting a timer for each component. When the request is completed, the load in the page on behalf of the data is completed. But the use of timers must consume additional thread resources to complete.
Disclosure of Invention
In order to solve the technical problem, the application provides a data loading completion determining method, device and equipment, which are used for accurately determining whether data is loaded completely.
In order to achieve the above purpose, the technical solutions provided in the embodiments of the present application are as follows:
the embodiment of the application provides a method for determining completion of data loading, which comprises the following steps:
determining page operation, a component corresponding to the page operation and a dynamic variable corresponding to the page operation;
generating a target component request corresponding to a target component based on the target component; the target component is any one of components corresponding to the page operation; the target component request is used for acquiring target data;
after the target data is acquired, determining that the target component request is completed, and sending the dynamic variable corresponding to the page operation to the target component so that the target component updates the dynamic variable corresponding to the page operation;
when the numerical value of the dynamic variable corresponding to the page operation reaches a preset number, determining that the data loading required by the page operation is finished; the data required by the page operation consists of the target data acquired by the component corresponding to the page operation.
Optionally, after the determining the page operation, the component corresponding to the page operation, and the dynamic variable corresponding to the page operation, and before the generating, based on the target component, the target component request corresponding to the target component, the method further includes:
and carrying out numerical value initialization on the dynamic variable corresponding to the page operation.
Optionally, when the initialized value of the dynamic variable corresponding to the page operation is the number of the components corresponding to the page operation, the sending the dynamic variable corresponding to the page operation to the target component to enable the target component to update the dynamic variable corresponding to the page operation includes:
and sending the dynamic variable corresponding to the page operation to the target component so that the target component reduces the value of the dynamic variable corresponding to the page operation by one.
Optionally, when the numerical value of the dynamic variable corresponding to the page operation reaches the preset number, determining that the data loading required by the page operation is completed includes:
and when the numerical value of the dynamic variable corresponding to the page operation reaches zero, determining that the data loading required by the page operation is finished.
Optionally, the method further comprises:
and when the numerical value of the dynamic variable does not reach the preset number, re-acquiring the dynamic variable corresponding to the page operation until the numerical value of the dynamic variable reaches the preset number.
Optionally, the method further comprises:
and when the data loading required by the page operation is finished, executing the page operation.
An embodiment of the present application further provides a device for determining completion of data loading, where the device includes:
the device comprises a first determining unit, a second determining unit and a control unit, wherein the first determining unit is used for determining page operation, a component corresponding to the page operation and a dynamic variable corresponding to the page operation;
the generating unit is used for generating a target component request corresponding to a target component based on the target component; the target component is any one of components corresponding to the page operation; the target component request is used for acquiring target data;
the updating unit is used for determining that the target component request is completed after the target data is acquired, and sending the dynamic variable corresponding to the page operation to the target component so that the target component updates the dynamic variable corresponding to the page operation;
the second determining unit is used for determining that the data loading required by the page operation is finished when the numerical value of the dynamic variable corresponding to the page operation reaches a preset number; the data required by the page operation consists of the target data acquired by the component corresponding to the page operation.
Optionally, the apparatus further comprises:
an initialization unit, configured to perform numerical initialization on the dynamic variable corresponding to the page operation after the page operation, the component corresponding to the page operation, and the dynamic variable corresponding to the page operation are determined, and before a target component request corresponding to the target component is generated based on the target component.
An embodiment of the present application further provides a device for determining completion of data loading, including: the data loading completion determining method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the data loading completion determining method is realized according to any one of the above items.
An embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a terminal device, the terminal device is caused to execute the data loading completion determining method according to any one of the above.
According to the technical scheme, the method has the following beneficial effects:
the embodiment of the application provides a method, a device and equipment for determining completion of data loading, wherein the method comprises the following steps: determining page operation, the component request number corresponding to the page operation and a dynamic variable corresponding to the page operation. Data required by page operation needs to be acquired by a component sending component request. And generating a target component request corresponding to the target component based on the target component. The target component is any one of the components corresponding to the page operation. The target component request is for obtaining target data. And after the target data is acquired, determining that the target assembly request is completed, and sending the dynamic variable corresponding to the page operation to the target assembly so that the target assembly updates the dynamic variable corresponding to the page operation. And when the numerical value of the dynamic variable corresponding to the page operation reaches the preset number, determining that the data loading required by the page operation is finished. The data required by the page operation consists of target data acquired by the components corresponding to the page operation. Therefore, the method can monitor whether the data required by the page operation is loaded or not through the set dynamic variable, so that the inaccuracy caused by manually setting the loading time is avoided, and the setting of the dynamic variable does not consume additional thread resources.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of a data loading completion determining method according to an embodiment of the present application;
fig. 3a is a schematic view of a page provided in the present embodiment;
FIG. 3b is a schematic diagram of another exemplary application scenario provided by an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data loading completion determining apparatus according to an embodiment of the present application;
fig. 5 is a schematic diagram of a computing device according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the drawings are described in detail below.
In order to facilitate understanding and explaining the technical solutions provided by the embodiments of the present application, the following first describes the background art of the embodiments of the present application.
As component technology evolves, front-end pages apply more and more components to improve reusability and maintainability. A small functional unit can be seen as a component. The more complex the page, the more components are separated from the page.
If the page operation needs to be executed after the required data is loaded, the data required by the page operation is divided into a plurality of data, and each data needs to be acquired by sending a component request by a corresponding component. If multiple components asynchronously send component requests to get data, then the page operation requires all component requests to complete before execution. At this time, it is important to know exactly when a component request corresponding to a page operation in a page can be completed.
Currently, by setting the loading time in the page, the page operation is completed when the loading time is reached. However, the artificially set load time may be inaccurate and may not be exactly the same as the actual data load time. When the set load time is shorter than the actual data load time, it causes some requests to start performing page operations without being completed, and when the set load time is longer than the actual data load time, it causes unnecessary waiting time. In addition, whether the request of each component is completed can be polled and checked by setting a timer for each component. But the use of timers must consume additional thread resources to complete.
Based on this, the embodiment of the application provides a method, a device and equipment for determining data loading completion. In order to facilitate understanding of the data loading completion determination method provided in the embodiment of the present application, an exemplary application scenario of the method is described below with reference to fig. 1. Fig. 1 is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application.
And determining page operation, components corresponding to the page operation and dynamic variables corresponding to the page operation. As shown in FIG. 1, the components corresponding to the page operation are component 1 and component 2. The number of components corresponding to the page operation is 2. And monitoring whether the data required by the page operation is loaded or not by using a dynamic variable corresponding to the page operation.
And generating a target component request corresponding to the target component based on the target component. The target component is any one of components corresponding to the page operation. For example, the target component may be component 1, but also component 2.
The target component request is for obtaining target data. And after the target data is acquired, determining that the target component request is completed, and calling a dynamic variable corresponding to the page operation by the target component. And sending the dynamic variable corresponding to the page operation to the target component so that the target component updates the dynamic variable corresponding to the page operation. For example, after the component 1 completes the corresponding target component request, the dynamic variable corresponding to the page operation is called and the dynamic variable is updated. And after the component 2 completes the corresponding target component request, calling the dynamic variable corresponding to the page operation and updating the dynamic variable.
And when the numerical value of the dynamic variable corresponding to the page operation reaches the preset number, determining that the data loading required by the page operation is finished. The data required by the page operation consists of target data acquired by the components corresponding to the page operation. For example, the combination of the data acquired by the component 1 and the data acquired by the component 2 is data required for page operations. When the numerical value of the dynamic variable corresponding to the page operation reaches the preset number, the data acquired by the component 1 and the data acquired by the component 2 are both completed, and the data loading required by the page operation is determined to be completed.
Those skilled in the art will appreciate that the block diagram shown in fig. 1 is only one example in which embodiments of the present application may be implemented. The scope of applicability of the embodiments of the present application is not limited in any way by this framework.
Based on the above, embodiments of the present application provide specific implementations of a data loading completion determining method, which will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flowchart of a data loading completion determining method according to an embodiment of the present application. The method may be performed by a terminal device. As shown in fig. 2, the method includes S201-S204:
s201: and determining page operation, components corresponding to the page operation and dynamic variables corresponding to the page operation.
Typically, a page is composed of multiple components. According to the independence of functions, a page is divided into independent functional modules, and the independent functional modules can be called components. For example, the current development framework such as reach, Vue and the like enables front-end development to be more and more componentized, and a complete page can be divided into a plurality of functional components. The components comprise user interface interaction and data interaction of the functional modules, and then combined connection is carried out on the main page to master the integral operation of the page.
A page operation is an operation performed on a page. The data loading required by the page operation needs to be completed before the page operation is executed. The data required by the page operation needs to be jointly completed through different components. Specifically, data required by page operation is divided into different data according to a flow or a rule. Different data is requested and loaded by different components, and the component request may be an asynchronous request in the process of the component request. For example, a page operates to obtain a data contrast relationship for a source database and a destination database. Before acquiring the data comparison relationship between the source database and the destination database, the data of the source database and the data of the destination database need to be loaded completely. The data of the source database and the data of the destination database are requested and loaded through a plurality of components.
As an alternative example, a dynamic variable corresponding to a page operation is set on a page. When the dynamic variable is called, the dynamic variable needs to be called from the page to which the dynamic variable belongs. It should be noted that the dynamic variables required for different page operations are different. The value of the dynamic variable is used to monitor the completion of the component request. Compared with the method of manually setting the loading time, the method of acquiring whether the data required by the page operation is loaded or not through setting the dynamic variable is more accurate, and compared with the method of setting the timer, the method of acquiring whether the data required by the page operation is loaded or not through setting the dynamic variable does not consume extra thread resources.
S202: generating a target component request corresponding to the target component based on the target component; the target component is any one of components corresponding to the page operation; the target component request is for obtaining target data.
It can be understood that the components corresponding to the page operations are set according to actual conditions, and the number of the components corresponding to the page operations is at least one.
The target component is any one of the components corresponding to the page operation. Taking a target component as an example, a target component request corresponding to the target component is generated based on the target component. The target component request is for obtaining target data from the database.
It can be understood that each component needs to acquire corresponding target data, and the target data finally acquired by each component is combined to be data required by page operation.
After S202 and before S203, the dynamic variables corresponding to the page operations need to be initialized. For example, the dynamic variable initialization value is 0 or the number of components corresponding to the page operation.
S203: and after the target data is acquired, determining that the target assembly request is completed, and sending the dynamic variable corresponding to the page operation to the target assembly so that the target assembly updates the dynamic variable corresponding to the page operation.
And after the target data is acquired, the target component request of the target component is completed. At this time, the target component calls a dynamic variable corresponding to the page operation in the page. And after the target component calls the dynamic variable corresponding to the page operation, updating the dynamic variable corresponding to the page operation. Whether the target component request is completed or not can be known through the updated value of the dynamic variable.
As an optional example, when the initialized value of the dynamic variable is the number of the components corresponding to the page operation, after the target data is acquired, it is determined that the target component request is completed, and the dynamic variable corresponding to the page operation is sent to the target component, so that the target component reduces the value of the dynamic variable corresponding to the page operation by one. At this time, the preset number is 0.
As another optional example, when the initialized value of the dynamic variable is 0, after the target data is acquired, it is determined that the target component request is completed, and the dynamic variable corresponding to the page operation is sent to the target component, so that the target component increases the value of the dynamic variable corresponding to the page operation by one. At this time, the preset number is the number of components corresponding to the page operation.
S204: and when the numerical value of the dynamic variable corresponding to the page operation reaches the preset number, determining that the data loading required by the page operation is finished. The data required by the page operation consists of target data acquired by the components corresponding to the page operation.
The page obtains dynamic variables corresponding to the page operation in real time, and when the numerical value of the dynamic variables reaches a preset number, the data loading required by the page operation is determined to be completed. For example, when the initialized value of the dynamic variable is the number of components corresponding to the page operation, the preset number is 0. When the initialized value of the dynamic variable is 0, the preset number is the number of components corresponding to the page operation.
It should be noted that the preset number can be set according to actual needs, and this is not limited in the embodiment of the present application.
It can be understood that the dynamic variables corresponding to the page operations are acquired, and when the numerical values of the dynamic variables do not reach the preset number, the dynamic variables corresponding to the page operations are acquired again until the numerical values of the dynamic variables reach the preset number.
In addition, after the data loading required by the page operation is finished, the page operation is executed.
As an alternative example, S201-S204 may be implemented by setStates method in React, wacth in Vue, which can facilitate monitoring changes in the number of dynamic variables.
Based on S201-S204, the embodiment of the present application provides a data loading completion determining method, which determines a page operation, a component request number corresponding to the page operation, and a dynamic variable corresponding to the page operation. Data required by page operation needs to be acquired by a component sending component request. And generating a target component request corresponding to the target component based on the target component. The target component is any one of the components corresponding to the page operation. The target component request is for obtaining target data. And after the target data is acquired, determining that the target assembly request is completed, and sending the dynamic variable corresponding to the page operation to the target assembly so that the target assembly updates the dynamic variable corresponding to the page operation. And when the numerical value of the dynamic variable corresponding to the page operation reaches the preset number, determining that the data loading required by the page operation is finished. The data required by the page operation consists of target data acquired by the components corresponding to the page operation. Therefore, the method can monitor whether the data required by the page operation is loaded or not through the set dynamic variable, so that the inaccuracy caused by manually setting the loading time is avoided, and the setting of the dynamic variable does not consume additional thread resources.
In order to facilitate understanding of the data loading completion determination method provided in the embodiment of the present application, an exemplary application scenario of the method is described below with reference to fig. 3a and 3 b. Fig. 3a is a schematic view of a page provided in the embodiment of the present application, and fig. 3b is a schematic view of another exemplary application scenario provided in the embodiment of the present application.
As shown in FIG. 3a, page A includes component a, component b, component c, component d, component e, and component f. The data required by the page operation requires the six components to send the component requests to obtain the data required by the page operation.
As shown in fig. 3b, a monitorable dynamic variable count is set in the page a, and the dynamic variable is updated by the function setCount. And setting the initialized value of the dynamic variable to the number of components corresponding to the page operation, namely 6.
After the component request of each component is completed, the target data loading of the component request is completed, the component calls the function setCount in the page, and the count-1 is executed.
And adding a judgment condition on the page A, namely judging whether the value of the dynamic variable reaches a preset number. In this application scenario, the preset number is set to 0. That is, whether the count is 0 or not is judged, and if yes, it is determined that the data loading required by the page operation is completed.
Therefore, the method can monitor whether the data required by the page operation is loaded or not through the set dynamic variable, so that the inaccuracy caused by manually setting the loading time is avoided, and the setting of the dynamic variable does not consume additional thread resources.
Based on the method for determining completion of loading of cardiac data provided by the above method embodiment, an embodiment of the present application further provides a device for determining completion of loading of data, and the device for determining completion of loading of data will be described below with reference to the accompanying drawings.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a data loading completion determining apparatus according to an embodiment of the present application. As shown in fig. 4, the data load completion determining device includes:
a first determining unit 401, configured to determine a page operation, a component corresponding to the page operation, and a dynamic variable corresponding to the page operation;
a generating unit 402, configured to generate, based on a target component, a target component request corresponding to the target component; the target component is any one of components corresponding to the page operation; the target component request is used for acquiring target data;
an updating unit 403, configured to determine that the target component request is completed after the target data is obtained, and send the dynamic variable corresponding to the page operation to the target component so that the target component updates the dynamic variable corresponding to the page operation; a second determining unit 404, configured to determine that data loading required by the page operation is completed when the numerical value of the dynamic variable corresponding to the page operation reaches a preset number; the data required by the page operation consists of the target data acquired by the component corresponding to the page operation.
In one possible implementation, the apparatus further includes:
an initialization unit, configured to perform numerical initialization on the dynamic variable corresponding to the page operation after the page operation, the component corresponding to the page operation, and the dynamic variable corresponding to the page operation are determined, and before a target component request corresponding to the target component is generated based on the target component.
In a possible implementation manner, when the initialized value of the dynamic variable corresponding to the page operation is the number of the components corresponding to the page operation, the updating unit 403 is specifically configured to:
and sending the dynamic variable corresponding to the page operation to the target component so that the target component reduces the value of the dynamic variable corresponding to the page operation by one.
In a possible implementation manner, the second determining unit 404 is specifically configured to:
and when the numerical value of the dynamic variable corresponding to the page operation reaches zero, determining that the data loading required by the page operation is finished.
In one possible implementation, the apparatus further includes:
and the second obtaining unit is used for obtaining the dynamic variables corresponding to the page operation again until the numerical values of the dynamic variables reach the preset number when the numerical values of the dynamic variables do not reach the preset number.
In one possible implementation, the apparatus further includes:
and the execution unit is used for executing the page operation after the data loading required by the page operation is finished.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a terminal device, the terminal device is caused to execute the data loading completion determining method according to any of the above embodiments.
Referring to fig. 5, fig. 5 shows a schematic diagram of a computing device according to an exemplary embodiment of the present disclosure.
Referring to fig. 5, a computing apparatus according to an exemplary embodiment of the present disclosure includes a memory 51 and a processor 52, the memory 51 having stored thereon a computer program that, when executed by the processor 52, implements a data load completion determination method according to an exemplary embodiment of the present disclosure.
In an exemplary embodiment of the disclosure, the computer program, when executed by the processor 52, may implement the steps of:
determining page operation, a component corresponding to the page operation and a dynamic variable corresponding to the page operation;
generating a target component request corresponding to a target component based on the target component; the target component is any one of components corresponding to the page operation; the target component request is used for acquiring target data;
after the target data is acquired, determining that the target component request is completed, and sending the dynamic variable corresponding to the page operation to the target component so that the target component updates the dynamic variable corresponding to the page operation;
when the numerical value of the dynamic variable corresponding to the page operation reaches a preset number, determining that the data loading required by the page operation is finished; the data required by the page operation consists of the target data acquired by the component corresponding to the page operation.
An embodiment of the present application provides a device and an apparatus for determining completion of data loading, including: determining page operation, the component request number corresponding to the page operation and a dynamic variable corresponding to the page operation. Data required by page operation needs to be acquired by a component sending component request. And generating a target component request corresponding to the target component based on the target component. The target component is any one of the components corresponding to the page operation. The target component request is for obtaining target data. And after the target data is acquired, determining that the target assembly request is completed, and sending the dynamic variable corresponding to the page operation to the target assembly so that the target assembly updates the dynamic variable corresponding to the page operation. And when the numerical value of the dynamic variable corresponding to the page operation reaches the preset number, determining that the data loading required by the page operation is finished. The data required by the page operation consists of target data acquired by the components corresponding to the page operation. Therefore, whether the data required by the page operation is loaded or not can be monitored through the set dynamic variable, the inaccuracy caused by manually setting the loading time is avoided, and the setting of the dynamic variable does not consume extra thread resources.
As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by software plus a necessary general hardware platform. Based on this understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, or otherwise contribute to the prior art.
It should be noted that the computer readable storage medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing. A computer-readable storage medium includes instructions for causing a computing device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to perform the methods described in the various embodiments or portions of embodiments of the present application.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The method disclosed by the embodiment corresponds to the system disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the system part for description.
It should also be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data loading completion determination method, characterized in that the method comprises:
determining page operation, a component corresponding to the page operation and a dynamic variable corresponding to the page operation;
generating a target component request corresponding to a target component based on the target component; the target component is any one of components corresponding to the page operation; the target component request is used for acquiring target data;
after the target data is acquired, determining that the target component request is completed, and sending the dynamic variable corresponding to the page operation to the target component so that the target component updates the dynamic variable corresponding to the page operation;
when the numerical value of the dynamic variable corresponding to the page operation reaches a preset number, determining that the data loading required by the page operation is finished; the data required by the page operation consists of the target data acquired by the component corresponding to the page operation.
2. The method according to claim 1, wherein after the determining the page operation, the component corresponding to the page operation, and the dynamic variable corresponding to the page operation, and before the generating, based on the target component, the target component request corresponding to the target component, the method further comprises:
and carrying out numerical value initialization on the dynamic variable corresponding to the page operation.
3. The method according to claim 2, wherein when the initialized value of the dynamic variable corresponding to the page operation is the number of the components corresponding to the page operation, the sending the dynamic variable corresponding to the page operation to the target component so that the target component updates the dynamic variable corresponding to the page operation includes:
and sending the dynamic variable corresponding to the page operation to the target component so that the target component reduces the value of the dynamic variable corresponding to the page operation by one.
4. The method according to claim 3, wherein determining that the data loading required by the page operation is completed when the numerical value of the dynamic variable corresponding to the page operation reaches a preset number comprises:
and when the numerical value of the dynamic variable corresponding to the page operation reaches zero, determining that the data loading required by the page operation is finished.
5. The data load completion determination method according to any one of claims 1 to 4, wherein the method further comprises:
and when the numerical value of the dynamic variable does not reach the preset number, re-acquiring the dynamic variable corresponding to the page operation until the numerical value of the dynamic variable reaches the preset number.
6. The data load completion determination method according to any one of claims 1 to 4, wherein the method further comprises:
and when the data loading required by the page operation is finished, executing the page operation.
7. An apparatus for determining completion of data loading, the apparatus comprising:
the device comprises a first determining unit, a second determining unit and a control unit, wherein the first determining unit is used for determining page operation, a component corresponding to the page operation and a dynamic variable corresponding to the page operation;
the generating unit is used for generating a target component request corresponding to a target component based on the target component; the target component is any one of components corresponding to the page operation; the target component request is used for acquiring target data;
the updating unit is used for determining that the target component request is completed after the target data is acquired, and sending the dynamic variable corresponding to the page operation to the target component so that the target component updates the dynamic variable corresponding to the page operation;
the second determining unit is used for determining that the data loading required by the page operation is finished when the numerical value of the dynamic variable corresponding to the page operation reaches a preset number; the data required by the page operation consists of the target data acquired by the component corresponding to the page operation.
8. The data load completion determination apparatus according to claim 7, wherein said apparatus further comprises:
an initialization unit, configured to perform numerical initialization on the dynamic variable corresponding to the page operation after the page operation, the component corresponding to the page operation, and the dynamic variable corresponding to the page operation are determined, and before a target component request corresponding to the target component is generated based on the target component.
9. A data load completion determination device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the data load completion determination method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium having stored therein instructions that, when run on a terminal device, cause the terminal device to execute a data load completion determination method according to any one of claims 1-6.
CN202111263621.5A 2021-10-28 2021-10-28 Method, device and equipment for determining completion of data loading Active CN114090146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111263621.5A CN114090146B (en) 2021-10-28 2021-10-28 Method, device and equipment for determining completion of data loading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111263621.5A CN114090146B (en) 2021-10-28 2021-10-28 Method, device and equipment for determining completion of data loading

Publications (2)

Publication Number Publication Date
CN114090146A true CN114090146A (en) 2022-02-25
CN114090146B CN114090146B (en) 2023-06-16

Family

ID=80298403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111263621.5A Active CN114090146B (en) 2021-10-28 2021-10-28 Method, device and equipment for determining completion of data loading

Country Status (1)

Country Link
CN (1) CN114090146B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174593A (en) * 2022-07-05 2022-10-11 佛山技研智联科技有限公司 Front-end timing polling task multi-component linkage triggering method and device and related medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120079230A1 (en) * 2009-04-16 2012-03-29 International Business Machines Corporation Selecting a Target Number of Pages for Allocation to a Partition
US8738661B1 (en) * 2008-03-04 2014-05-27 Open Invention Network, Llc Maintaining web session data spanning multiple application servers in a session database
CN106570071A (en) * 2016-10-14 2017-04-19 上海斐讯数据通信技术有限公司 Method and system for loading front end page of cloud access controller
CN107665134A (en) * 2017-09-29 2018-02-06 北京金山安全软件有限公司 Page component loading method, device, medium and terminal equipment
CN110187932A (en) * 2019-05-23 2019-08-30 北京普天太力通信科技有限公司 A kind of business datum page loading method and system
CN110209967A (en) * 2019-04-17 2019-09-06 北京奇艺世纪科技有限公司 Page loading method, device, terminal device and computer-readable medium
CN111767111A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Page data processing method and device, electronic equipment and storage medium
CN111796821A (en) * 2020-06-17 2020-10-20 北京三快在线科技有限公司 Page updating method and device
CN111880990A (en) * 2020-07-20 2020-11-03 北京三快在线科技有限公司 Exception handling method and device
CN112417330A (en) * 2019-08-23 2021-02-26 腾讯科技(深圳)有限公司 Page loading method, device, equipment and storage medium
CN112685445A (en) * 2020-12-29 2021-04-20 杭州旷云金智科技有限公司 Data query method and device, storage medium and electronic equipment
CN113127783A (en) * 2021-04-27 2021-07-16 百度在线网络技术(北京)有限公司 Page display method and device, equipment and medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8738661B1 (en) * 2008-03-04 2014-05-27 Open Invention Network, Llc Maintaining web session data spanning multiple application servers in a session database
US20120079230A1 (en) * 2009-04-16 2012-03-29 International Business Machines Corporation Selecting a Target Number of Pages for Allocation to a Partition
CN106570071A (en) * 2016-10-14 2017-04-19 上海斐讯数据通信技术有限公司 Method and system for loading front end page of cloud access controller
CN107665134A (en) * 2017-09-29 2018-02-06 北京金山安全软件有限公司 Page component loading method, device, medium and terminal equipment
CN110209967A (en) * 2019-04-17 2019-09-06 北京奇艺世纪科技有限公司 Page loading method, device, terminal device and computer-readable medium
CN110187932A (en) * 2019-05-23 2019-08-30 北京普天太力通信科技有限公司 A kind of business datum page loading method and system
CN112417330A (en) * 2019-08-23 2021-02-26 腾讯科技(深圳)有限公司 Page loading method, device, equipment and storage medium
CN111796821A (en) * 2020-06-17 2020-10-20 北京三快在线科技有限公司 Page updating method and device
CN111767111A (en) * 2020-07-06 2020-10-13 网易(杭州)网络有限公司 Page data processing method and device, electronic equipment and storage medium
CN111880990A (en) * 2020-07-20 2020-11-03 北京三快在线科技有限公司 Exception handling method and device
CN112685445A (en) * 2020-12-29 2021-04-20 杭州旷云金智科技有限公司 Data query method and device, storage medium and electronic equipment
CN113127783A (en) * 2021-04-27 2021-07-16 百度在线网络技术(北京)有限公司 Page display method and device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174593A (en) * 2022-07-05 2022-10-11 佛山技研智联科技有限公司 Front-end timing polling task multi-component linkage triggering method and device and related medium

Also Published As

Publication number Publication date
CN114090146B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
US11449774B2 (en) Resource configuration method and apparatus for heterogeneous cloud services
CN112148711B (en) Batch processing task processing method and device
CN108733720B (en) On-line checking method and checking system for SQL (structured query language) query of multiple database types
CN110609755A (en) Message processing method, device, equipment and medium for cross-block chain node
CN111126948A (en) Processing method and device for approval process
CN108762905A (en) A kind for the treatment of method and apparatus of multitask event
CN111221869A (en) Method and device for tracking database transaction time and analyzing database lock
CN114090146A (en) Data loading completion determining method, device and equipment
CN109828830B (en) Method and apparatus for managing containers
CN111338944A (en) Remote Procedure Call (RPC) interface test method, device, medium and equipment
CN114281663A (en) Test processing method, test processing device, electronic equipment and storage medium
CN108696554B (en) Load balancing method and device
CN111831503B (en) Monitoring method based on monitoring agent and monitoring agent device
CN111176641A (en) Flow node execution method, device, medium and electronic equipment
CN110806967A (en) Unit testing method and device
CN111176679B (en) Application program updating method and device
CN111625866A (en) Authority management method, system, equipment and storage medium
CN109120692B (en) Method and apparatus for processing requests
US8527580B2 (en) Saving multiple data items using partial-order planning
CN113495747B (en) Gray scale release method and device
CN115941834B (en) Automatic operation method, device, equipment and storage medium of smart phone
CN114281697A (en) Test data generation method and device
CN112445852A (en) Cross-system multithreading data interaction method and system
CN115129604A (en) Data testing method and device, electronic equipment and computer readable medium
CN117112151A (en) Task scheduling method and device, electronic equipment and computer readable 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