CN114090146B - Method, device and equipment for determining completion of data loading - Google Patents

Method, device and equipment for determining completion of data loading Download PDF

Info

Publication number
CN114090146B
CN114090146B CN202111263621.5A CN202111263621A CN114090146B CN 114090146 B CN114090146 B CN 114090146B CN 202111263621 A CN202111263621 A CN 202111263621A CN 114090146 B CN114090146 B CN 114090146B
Authority
CN
China
Prior art keywords
page operation
target component
dynamic variable
data
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111263621.5A
Other languages
Chinese (zh)
Other versions
CN114090146A (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, and the method, the device and the equipment 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 requests for acquisition of target data. And after the target data is acquired, determining that the target component requests to be 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. 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 completed. The data required by the page operation consists of target data acquired by a component corresponding to the page operation. It can be known that whether the data required by the page operation is loaded is monitored through the set dynamic variables, so that inaccuracy caused by manually setting the loading time is avoided.

Description

Method, device and equipment for determining completion of data loading
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
With the development of component technology, front-end pages apply more and more components, which can be understood as functional modules.
In the front page, some page operations can be performed after all the required data is loaded. For example, if the page operation is to determine a data collation relationship between the source database and the destination database. Before the collation relation is determined, a data request needs to be made by the component to acquire 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 arrives. But the artificially set loading time may be inaccurate. In addition, it is also possible to poll and check whether the request of each component is completed by setting a timer for each component. When the request is completed, the loading of the representative data in the page is completed. The use of timers must consume additional thread resources to complete.
Disclosure of Invention
In order to solve the technical problems, the application provides a method, a device and equipment for determining the completion of data loading, which are used for accurately determining whether the data is loaded completely.
In order to achieve the above object, the technical solution provided in the embodiments of the present application is as follows:
the embodiment of the application provides a data loading completion determining method, 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 requests for obtaining target data;
after the target data is acquired, determining that the target component requests to be 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 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 completed; and 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, before the generating, based on the target component, the target component request corresponding to the target component, the method further includes:
and initializing the numerical value of the dynamic variable corresponding to the page operation.
Optionally, when the initialization value of the dynamic variable corresponding to the page operation is the number of 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 value of the dynamic variable corresponding to the page operation reaches a preset number, determining that the loading of the data required by the page operation is completed includes:
and when the value of the dynamic variable corresponding to the page operation reaches zero, determining that the data loading required by the page operation is completed.
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 executing the page operation after the data loading required by the page operation is completed.
The embodiment of the application also provides a device for determining the completion of data loading, which comprises:
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 the target component based on the target component; the target component is any one of components corresponding to the page operation; the target component requests for obtaining target data;
the updating unit is used for determining that the target component requests to be completed after the target data are 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 completed when the value of the dynamic variable corresponding to the page operation reaches the preset number; and 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:
and the initialization unit is used for carrying out 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 the target component request corresponding to the target component is generated based on the target component.
The embodiment of the application also provides a data loading completion determining device, which comprises: the data loading completion determination method according to any one of the preceding claims, wherein the processor is configured to execute the computer program.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores instructions, and when the instructions run on a terminal device, the instructions cause the terminal device to execute the data loading completion determination method according to any one of the above.
According to the technical scheme, the application has the following beneficial effects:
the embodiment of the application provides a method, a device and equipment for determining the completion of data loading, which comprise the following steps: and determining page operation, the number of component requests corresponding to the page operation and dynamic variables corresponding to the page operation. The data required for page operation needs to be acquired by sending a component request through the component. 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 requests for acquisition of target data. And after the target data is acquired, determining that the target component requests to be 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. 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 completed. The data required by the page operation consists of target data acquired by a component corresponding to the page operation. According to the method, whether the data required by the page operation is loaded or not can be monitored through the set dynamic variable, inaccuracy caused by manually setting the loading time is avoided, and the setting of the dynamic variable does not consume extra 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 that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
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 method for determining completion of data loading according to an embodiment of the present application;
FIG. 3a is a schematic diagram of a page according to an embodiment of the present disclosure;
FIG. 3b is a schematic diagram of another exemplary application scenario provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data loading completion determining device 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 above objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures and detailed description are described in further detail below.
In order to facilitate understanding and explanation of the technical solutions provided by the embodiments of the present application, the following description will first explain the background technology of the embodiments of the present application.
With the development of component technology, front-end pages apply more and more components to improve reusability and maintainability. A small functional unit can be regarded as a component. The more complex the page, the more components are separated and extracted from the page.
If the page operation needs to be carried out after the loading of the required data, 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. Multiple components send component requests asynchronously to obtain data, then the page operation requires all component requests to be completed to execute. At this time, it is important to accurately know when a component request corresponding to a page operation can be completed in a page.
Currently, by setting the loading time in the page, the page operation is completed when the loading time arrives. 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 loading time is shorter than the actual data loading time, some requests start to execute page operations without being completed, and when the set loading time is longer than the actual data loading time, unnecessary waiting time is caused. In addition, it is also possible to poll and check whether the request of each component is completed by setting a timer for each component. The use of timers must consume additional thread resources to complete.
Based on the above, the embodiment of the application provides a method, a device and equipment for determining the completion of data loading. In order to facilitate understanding of the data loading completion determining method provided in the embodiments 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 a component 1 and a component 2. The number of components to which the page operation corresponds is 2. The dynamic variable corresponding to the page operation is used for monitoring whether the loading of the data required by the page operation is completed.
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 page operation. For example, the target component may be component 1 or component 2.
The target component requests for acquisition of target data. And after the target data is acquired, determining that the target component requests to be 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 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 completed. The data required by the page operation consists of target data acquired by a component 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 necessary for page operations. When the 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 frame diagram shown in fig. 1 is but one example in which embodiments of the present application may be implemented. The scope of applicability of the embodiments of the application is not limited in any way by the framework.
Based on the foregoing, embodiments of the present application provide a specific implementation manner of a data loading completion determination method, and the detailed description will be given below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flowchart of a data loading completion determining method provided in an embodiment of the present application. The method may be performed by a terminal device. As shown in fig. 2, the method includes S201 to S204:
s201: and determining page operation, components corresponding to the page operation and dynamic variables corresponding to the page operation.
Typically, a page is made up of multiple components. According to the independence of functions, the page is split into individual functional modules, which may be referred to as components. For example, current practice, vue, etc. development frameworks allow front-end development to be more and more componentized, and a complete page may be divided into multiple functional components. The user interface interaction and the data interaction of the functional modules are included in the assembly, and then the assembly connection is carried out on the main page, so that the overall operation of the page is mastered.
A page operation is an operation performed on a page. The data loading required for the page operation needs to be completed before the page operation is performed. Acquiring the data required for the page operation is completed through different components. Specifically, data required for page operation is divided into different data according to a flow or rule. Different data is requested and loaded by means of different components, and during a component request, the component request may be an asynchronous request. For example, a page operation is to obtain a data collation of a source database and a destination database. Before the data comparison relation between the source database and the destination database is obtained, the data of the source database and the data of the destination database are required to be loaded. 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, dynamic variables corresponding to page operations are set on a page. When a dynamic variable is called, the dynamic variable needs to be called from the page to which it 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 knowing 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 knowing 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 page operation; the target component requests for acquisition of target data.
It can be understood that the components corresponding to the page operation are set according to the actual situation, and the number of the components corresponding to the page operation 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 requests for retrieval of 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, numerical initialization is also required for the dynamic variable corresponding to the page operation. For example, the dynamic variable initialization value is the number of components corresponding to the page operation or 0.
S203: and after the target data is acquired, determining that the target component requests to be 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.
After the target data is acquired, the target component request specifying the target component is completed. At this time, the target component invokes the dynamic variable corresponding to the page operation in the page. After the target component calls the dynamic variable corresponding to the page operation, the dynamic variable corresponding to the page operation is updated. Whether the target component request is completed or not can be known by the updated value of the dynamic variable.
As an alternative example, when the initialized value of the dynamic variable is the number of components corresponding to the page operation, after the target data is acquired, it is determined that the target component requests to be 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 alternative example, when the initialization value of the dynamic variable is 0, after the target data is acquired, it is determined that the target component requests to be 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 completed. The data required by the page operation consists of target data acquired by a component corresponding to the page operation.
The page acquires dynamic variables corresponding to the page operation in real time, and when the numerical value of the dynamic variables reaches the preset number, the data loading required by the page operation is determined to be completed. For example, when the initialization value of the dynamic variable is the number of components corresponding to the page operation, the preset number is 0. When the initialization 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 may be set according to actual needs, which is not limited in this embodiment of the present application.
It can be understood that the dynamic variable corresponding to the page operation is obtained, and when the value of the dynamic variable does not reach the preset number, the dynamic variable corresponding to the page operation is re-obtained until the value of the dynamic variable reaches the preset number.
In addition, when the loading of data required for the page operation is completed, the page operation is executed.
As an alternative example, S201-S204 may be implemented by setStates method in React, watth in Vue, capable of conveniently monitoring changes in dynamic variable values.
Based on S201-S204, the embodiment of the present application provides a method for determining completion of data loading, which determines a page operation, a component request number corresponding to the page operation, and dynamic variables corresponding to the page operation. The data required for page operation needs to be acquired by sending a component request through the component. 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 requests for acquisition of target data. And after the target data is acquired, determining that the target component requests to be 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. 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 completed. The data required by the page operation consists of target data acquired by a component corresponding to the page operation. According to the method, whether the data required by the page operation is loaded or not can be monitored through the set dynamic variable, inaccuracy caused by manually setting the loading time is avoided, and the setting of the dynamic variable does not consume extra thread resources.
In order to facilitate understanding of the data loading completion determining method provided in the embodiments 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 an embodiment of the present application, and fig. 3b is a schematic view of another exemplary application scenario provided in an 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 for the page operation requires the six components to send the component requests to acquire the data required for the page operation.
As shown in fig. 3b, a monitorable dynamic variable count is set in page a, and the dynamic variable is updated by a function setCount. The initialization value of the dynamic variable is set to be the number of components corresponding to the page operation, namely 6.
When the component request of each component is completed, the component requests the target data of the request to be loaded, and the component calls the function setCount in the page to execute count-1.
And adding a judging condition on the page A, namely judging whether the value of the dynamic variable reaches the preset quantity. In this application scenario, a preset number of 0 is set. That is, whether count= =0 is satisfied is determined, and if so, the data loading required for the page operation is determined to be completed.
According to the method, whether the data required by the page operation is loaded or not can be monitored through the set dynamic variable, inaccuracy caused by manually setting the loading time is avoided, and the setting of the dynamic variable does not consume extra thread resources.
Based on the method for determining the completion of loading cardiac data provided by the above-mentioned method embodiment, the embodiment of the present application further provides a device for determining the completion of loading data, and the device for determining the completion of loading 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 loading completion determining apparatus 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 requests for obtaining target data;
an updating unit 403, configured to determine that the target component requests to complete after the target data is acquired, and send a 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 loading of data required for the page operation is completed when the value of the dynamic variable corresponding to the page operation reaches a preset number; and 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:
and the initialization unit is used for carrying out 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 the target component request corresponding to the target component is generated based on the target component.
In one possible implementation manner, when the initialization value of the dynamic variable corresponding to the page operation is the number of 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 value of the dynamic variable corresponding to the page operation reaches zero, determining that the data loading required by the page operation is completed.
In one possible implementation, the apparatus further includes:
and the second acquisition unit is used for re-acquiring the dynamic variable corresponding to the page operation until the value of the dynamic variable reaches the preset number when the value of the dynamic variable does 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 completed.
In addition, an embodiment of the present application further provides a computer readable storage medium, where an instruction is stored in the computer readable storage medium, where the instruction when executed on a terminal device causes the terminal device to execute the data loading completion determining method according to any one of the foregoing 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 device 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 which, when executed by the processor 52, implements a data loading completion determination method according to an exemplary embodiment of the present disclosure.
In an exemplary embodiment of the present disclosure, the following steps may be implemented when the computer program is executed by the processor 52:
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 requests for obtaining target data;
after the target data is acquired, determining that the target component requests to be 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 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 completed; and the data required by the page operation consists of the target data acquired by the component corresponding to the page operation.
The embodiment of the application provides a device and equipment for determining the completion of data loading, comprising the following steps: and determining page operation, the number of component requests corresponding to the page operation and dynamic variables corresponding to the page operation. The data required for page operation needs to be acquired by sending a component request through the component. 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 requests for acquisition of target data. And after the target data is acquired, determining that the target component requests to be 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. 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 completed. The data required by the page operation consists of target data acquired by a component corresponding to the page operation. It can be known that whether the data required by the page operation is loaded or not can be monitored through the set dynamic variable, so that inaccuracy caused by manually setting the loading time is avoided, and the setting of the dynamic variable does not consume extra thread resources.
From the above description of embodiments, it will be apparent to those skilled in the art that all or part of the steps of the above described example methods may be implemented in software plus necessary general purpose hardware platforms. Based on such understanding, the technical solutions of the present application may be embodied essentially or in part in the form of a software product, which may be stored in a computer-readable storage medium.
It should be noted that the computer readable storage medium described in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this document, 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 the present application, however, a computer-readable signal medium may include a data signal that propagates in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing. The computer-readable storage medium includes instructions for causing a computer 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 by various embodiments or portions of embodiments herein.
It should be noted that, in the present description, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the system part.
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 one … …" does not exclude the presence of other like 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 (6)

1. A method for determining completion of data loading, the method comprising:
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 requests for obtaining target data;
after the target data is acquired, determining that the target component requests to be 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 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 completed; the data required by the page operation consists of the target data acquired by the component 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, before the target component is generated based on the target component, the method further comprises:
carrying out numerical initialization on the dynamic variable corresponding to the page operation;
when the initialization value of the dynamic variable corresponding to the page operation is the number of 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:
transmitting 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;
and when the 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 completed, including:
and when the value of the dynamic variable corresponding to the page operation reaches zero, determining that the data loading required by the page operation is completed.
2. The data loading completion determination method of claim 1, 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.
3. The data loading completion determination method of claim 1, wherein the method further comprises:
and executing the page operation after the data loading required by the page operation is completed.
4. A data loading completion determination apparatus, the apparatus comprising:
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 the target component based on the target component; the target component is any one of components corresponding to the page operation; the target component requests for obtaining target data;
the updating unit is used for determining that the target component requests to be completed after the target data are 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 completed when the value of the dynamic variable corresponding to the page operation reaches the preset number; the data required by the page operation consists of the target data acquired by the component corresponding to the page operation;
the apparatus further comprises:
the initialization unit is used for carrying out 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 the target component request corresponding to the target component is generated based on the target component;
when the initialization value of the dynamic variable corresponding to the page operation is the number of components corresponding to the page operation, the updating unit is specifically configured to:
transmitting 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;
the second determining unit is specifically configured to:
and when the value of the dynamic variable corresponding to the page operation reaches zero, determining that the data loading required by the page operation is completed.
5. A data loading completion determination apparatus, characterized by comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the data loading completion determination method of any of claims 1-3 when the computer program is executed.
6. A computer readable storage medium having instructions stored therein which, when executed on a terminal device, cause the terminal device to perform the data loading completion determination method of any of claims 1-3.
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 CN114090146A (en) 2022-02-25
CN114090146B true 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)

Families Citing this family (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 (11)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8090911B2 (en) * 2009-04-16 2012-01-03 International Business Machines Corporation Selecting a target number of pages for allocation to a partition

Patent Citations (11)

* 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
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

Also Published As

Publication number Publication date
CN114090146A (en) 2022-02-25

Similar Documents

Publication Publication Date Title
US11550599B2 (en) Method and apparatus for running applet
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
CN109873863B (en) Asynchronous calling method and device of service
CN110413384B (en) Delay task processing method and device, storage medium and electronic equipment
CN111125064B (en) Method and device for generating database schema definition statement
CN114090146B (en) Method, device and equipment for determining completion of data loading
CN111221869A (en) Method and device for tracking database transaction time and analyzing database lock
CN115329170A (en) Webpage crawling method, device, equipment and storage medium
CN111338944A (en) Remote Procedure Call (RPC) interface test method, device, medium and equipment
CN109087107B (en) Real-time monitoring method and system based on distributed memory database and electronic equipment
CN109871560B (en) Method and device for operating target model
CN110806967A (en) Unit testing method and device
CN108804442B (en) Serial number generation method and device
CN111338928A (en) Chrome-based browser testing method and device
CN115391204A (en) Test method and device for automatic driving service, electronic equipment and storage medium
CN113656050B (en) Method and apparatus for generating version number
CN108287792B (en) Method and apparatus for outputting information
US8527580B2 (en) Saving multiple data items using partial-order planning
CN113297081A (en) Execution method and device of continuous integration assembly line
CN111625866A (en) Authority management method, system, equipment and storage medium
CN113760417A (en) Page countdown display method and device
CN112632159B (en) Database access control method and device, electronic equipment and storage medium
CN113590483A (en) Case operation method and device
CN114281697A (en) Test data generation method and device

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