CN117032857A - Loading control optimization method and device, electronic equipment and readable storage medium - Google Patents

Loading control optimization method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN117032857A
CN117032857A CN202310906500.0A CN202310906500A CN117032857A CN 117032857 A CN117032857 A CN 117032857A CN 202310906500 A CN202310906500 A CN 202310906500A CN 117032857 A CN117032857 A CN 117032857A
Authority
CN
China
Prior art keywords
loading
function
return value
executed
optimization method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310906500.0A
Other languages
Chinese (zh)
Inventor
潘杨
张毅鸿
江彬
邹定云
邓新疆
周勇
郝园园
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Three Gorges Times Energy Technology Co ltd
Original Assignee
Chongqing Three Gorges Times Energy Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Three Gorges Times Energy Technology Co ltd filed Critical Chongqing Three Gorges Times Energy Technology Co ltd
Priority to CN202310906500.0A priority Critical patent/CN117032857A/en
Publication of CN117032857A publication Critical patent/CN117032857A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • 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
    • 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a loading control optimization method, a loading control optimization device, electronic equipment and a readable storage medium, which are applied to the technical field of computers and comprise the following steps: acquiring a function to be executed and loading style parameters of a page component; the loading service code is called to start the loading state of the page component; executing the function to be executed to obtain a return value; and calling a closing code according to the return value to close the loading state of the page component. The application solves the technical problem of higher development complexity of loading control.

Description

Loading control optimization method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for optimizing load control, an electronic device, and a readable storage medium.
Background
Along with the development of technology, computer technology is also developed and matured more and more, at present, the loading state of a component of a page is controlled by adopting an instruction and a loading variable together, that is, when an execution function and a loading style parameter corresponding to the component of the page are detected, the instruction is executed and the loading variable is defined to be true, at this time, a programmer is required to program the loading state of the component in advance to define the loading variable to be false after the execution function is finished, so that the loading state of the component is closed, and the development complexity of loading control is high.
Disclosure of Invention
The application mainly aims to provide a loading control optimization method, a loading control optimization device, electronic equipment and a readable storage medium, and aims to solve the technical problem of high development complexity of loading control in the prior art.
In order to achieve the above object, the present application provides a load control optimizing method, including:
acquiring a function to be executed and loading style parameters of a page component;
the loading service code is called to start the loading state of the page component;
executing the function to be executed to obtain a return value;
and calling a closing code according to the return value to close the loading state of the page component.
Optionally, the step of calling the closing code according to the return value includes:
judging whether the return value meets a preset condition or not;
if the return value does not meet the preset condition, invoking a closing code;
and if the return value meets the preset condition, executing a chained calling function according to the return value until the execution task corresponding to the function to be executed is completed, and calling the closing code.
Optionally, the step of determining whether the return value meets a preset condition includes:
acquiring the function type of the function to be executed;
if the function type is a synchronous function type, judging that the return value does not meet a preset condition;
and if the function type is an asynchronous function type, judging that the return value meets the preset condition.
Optionally, before the step of opening the loading state of the page component by calling the loading service code, the method further includes:
and calling a receiving function back, and receiving the global parameters to form the closure.
Optionally, after the step of loading the service code by calling, the method further includes:
and if the abnormal grammar is detected, calling the closing code.
Optionally, before the step of opening the loading state of the page component by calling the loading service code, the method further includes:
and if the loading style parameter comprises a preset style parameter and a receiving style parameter, generating the loading service code according to the receiving style parameter.
Optionally, before the step of obtaining the function to be executed and the loading style parameter of the page component, the method further includes:
and constructing a constraint function, and respectively carrying out parameter type constraint on the loading style parameters and the function to be executed through the constraint function.
In order to achieve the above object, the present application also provides a load control optimizing apparatus, including:
the acquisition module is used for acquiring functions to be executed and loading style parameters of the page component;
the starting module is used for starting the loading state of the page component by calling the loading service code;
the execution module is used for executing the function to be executed to obtain a return value;
and the closing module is used for calling a closing code according to the return value so as to close the loading state of the page component.
The application also provides an electronic device comprising: the system comprises a memory, a processor and a program of the load control optimization method stored in the memory and capable of running on the processor, wherein the program of the load control optimization method can realize the steps of the load control optimization method when being executed by the processor.
The present application also provides a computer-readable storage medium having stored thereon a program for implementing a load control optimization method, which when executed by a processor implements the steps of the load control optimization method as described above.
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a load control optimization method as described above.
The application provides a loading control optimization method, a loading control optimization device, electronic equipment and a readable storage medium, wherein functions to be executed and loading style parameters of a page component are obtained; the loading service code is called to start the loading state of the page component; executing the function to be executed to obtain a return value; and calling a closing code according to the return value to close the loading state of the page component, so that automatic control of the loading state is realized, programming by a programmer is not needed in advance, and the complexity of calling the control code is lower than that of executing an instruction and adjusting a loading variable, thereby reducing the development complexity of loading control.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a first embodiment of a load control optimization method of the present application;
FIG. 2 is a diagram illustrating an exemplary structure of a device according to an embodiment of the present application;
fig. 3 is a schematic device structure diagram of a hardware operating environment related to a loading control optimization method in an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to make the above objects, features and advantages of the present application more comprehensible, the following description of the embodiments accompanied with the accompanying drawings will be given in detail. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Example 1
An embodiment of the present application provides a load control optimization method, in a first embodiment of the load control optimization method of the present application, referring to fig. 1, the load control optimization method includes:
step S10, acquiring functions to be executed and loading style parameters of a page component;
in this embodiment, it should be noted that, the function to be executed is a function that needs to be executed when the page component runs, and when the execution of the function to be executed is completed, the page component is illustrated to be loaded. The loading style parameter is used for defining a loading style presented by the page component, and the loading style parameter includes, but is not limited to, a size, a color, a shape and a presentation form of a loading icon, and the loading style parameter may be a default style parameter or a style parameter set by a user, which is not limited herein.
In a possible embodiment, the functions to be executed and the loading style parameters of the page component are acquired in response to the operation of the user on the page component.
In another possible embodiment, the function to be executed and the loading style parameter of the page component are acquired in response to the operation of the user on the page component and the setting operation of the user on the loading style of the page component.
In yet another possible embodiment, one acquisition function is encapsulated, the acquisition function being used to receive a function to be executed and a load style parameter of the page component.
Optionally, the acquiring function may specifically be: myLoading function.
Step S20, loading service codes are called to start the loading state of the page component;
alternatively, the loading service code may be: loading.
Step S30, executing the function to be executed to obtain a return value;
in a possible embodiment, fn (..args) is called to execute the function to be executed, resulting in a return value res.
And step S40, calling a closing code according to the return value to close the loading state of the page component.
In a possible embodiment, according to the return value res, a closing code is called.
Wherein, in step S40, the step of calling the closing code according to the return value includes:
step S41, judging whether the return value meets a preset condition;
in a possible embodiment, it is determined whether the return value res is a promise object in ES6 (ECMAScript 6.0, current version standard of javascript).
In step S41, the step of determining whether the return value meets a preset condition includes:
step A10, obtaining the function type of the function to be executed;
step A20, if the function type is a synchronous function type, judging that the return value does not meet a preset condition;
and step A30, if the function type is an asynchronous function type, judging that the return value meets the preset condition.
Step S42, if the return value does not meet the preset condition, a closing code is called;
in a possible embodiment, if the return value res is not a promise object in ES6, it is determined that the return value does not meet a preset condition, and a closing code.
Optionally, in a possible embodiment, after invoking the shutdown code, the method further includes: the code promise. Reserve (res) is returned.
And step S43, if the return value meets the preset condition, executing a chained call function according to the return value until the execution task corresponding to the function to be executed is completed, and calling the closing code.
In a possible embodiment, if the return value res is a promise object in ES6, it is determined that the return value meets the preset condition, and then the return value is implemented according to the return value res, so that the return value is called in a chained manner by the syntax of the promise object, and finally, the loading state is closed by using the syntax of the final grammar, so that the loading state of the page component is closed when the execution task corresponding to the function to be executed is completed.
The embodiment of the application provides a loading control optimization method, which comprises the steps of obtaining functions to be executed and loading style parameters of a page component; the loading service code is called to start the loading state of the page component; executing the function to be executed to obtain a return value; and calling a closing code according to the return value to close the loading state of the page component, so that automatic control of the loading state is realized, programming by a programmer is not needed in advance, and the complexity of calling the control code is lower than that of executing an instruction and adjusting a loading variable, thereby reducing the development complexity of loading control.
Example two
Further, in another embodiment of the present application, the same or similar content as that of the first embodiment may be referred to the above description, and will not be repeated. On this basis, in step S20, after the step of loading the service code by calling, the method further includes:
and S21, if the abnormal grammar is detected, calling the closing code.
The detection of abnormal grammar is illustratively performed by a tree grammar, and if abnormal grammar is detected, the closing code is invoked.
It will be appreciated that the try block includes code in the system that the load control optimization method operates on, and the catch block includes code that the system operates on when the exception syntax occurs.
In a possible embodiment, identifying the code of the abnormal grammar through a try block, if the code of the abnormal grammar is identified, calling the closing code, and transmitting the suspicious code to a catch block; if the code of the abnormal grammar is not identified, returning to the step of identifying the code of the abnormal grammar through a try block; and processing the code of the abnormal grammar through a catch block, and returning to the step of acquiring the function to be executed and the loading style parameter of the page component if the code of the abnormal grammar is detected to be processed.
Wherein, in step S20, before the step of opening the loading state of the page component by calling the loading service code, the method further includes:
and step B10, if the loading style parameter comprises a preset style parameter and a receiving style parameter, generating the loading service code according to the receiving style parameter.
In a possible embodiment, if the loading style parameter includes a preset style parameter, the loading service code is generated according to the preset style parameter, where the loading service code specifically includes: loading.
In another possible embodiment, if the loading style parameter includes a preset style parameter and a receiving style parameter, the loading service code is generated according to the receiving style parameter, where the loading service code specifically includes: loading.
Wherein, in step S10, before the step of obtaining the function to be executed and the loading style parameter of the page component, the method further includes:
and S01, constructing a constraint function, and respectively carrying out parameter type constraint on the loading style parameters and the function to be executed through the constraint function.
Illustratively, the parameter type of the loading style parameter is constrained by a constraint function, the parameter type of the output parameter of the function to be executed is constrained by the constraint function, and the parameter type of the output value of the function to be executed is constrained.
In a possible embodiment, the step of performing parameter type constraint on the loading style parameter and the function to be executed by the constraint function may specifically be:
interface MyLoading{<T extends(...args:unknown[])=>ReturnType<T>>(fn:T,options?:LoadingOptions):(...args:Parameters<T>)=>Promise<ReturnType<T>>|ReturnType<T>}。
wherein, in step S20, before the step of opening the loading state of the page component by calling the loading service code, the method further includes:
and step C10, calling a receiving function back, and receiving the global parameters to form the closure.
In this embodiment, the residual parameter syntax of ES6 is used as the receiving function. The global parameters are all parameters, the parameter types are not limited, and the parameter sending end is not limited.
The embodiment of the application provides a loading control optimization method, which comprises the steps of obtaining functions to be executed and loading style parameters of a page component; the loading service code is called to start the loading state of the page component; executing the function to be executed to obtain a return value; and calling a closing code according to the return value to close the loading state of the page component, so that automatic control of the loading state is realized, programming by a programmer is not needed in advance, and the complexity of calling the control code is lower than that of executing an instruction and adjusting a loading variable, thereby reducing the development complexity of loading control.
Example III
The embodiment of the application also provides a loading control optimizing device, referring to fig. 2, the loading control optimizing device includes:
the acquisition module is used for acquiring functions to be executed and loading style parameters of the page component;
the starting module is used for starting the loading state of the page component by calling the loading service code;
the execution module is used for executing the function to be executed to obtain a return value;
and the closing module is used for calling a closing code according to the return value so as to close the loading state of the page component.
Optionally, the closing module is further configured to:
judging whether the return value meets a preset condition or not;
if the return value does not meet the preset condition, invoking a closing code;
and if the return value meets the preset condition, executing a chained calling function according to the return value until the execution task corresponding to the function to be executed is completed, and calling the closing code.
Optionally, the closing module is further configured to:
acquiring the function type of the function to be executed;
if the function type is a synchronous function type, judging that the return value does not meet a preset condition;
and if the function type is an asynchronous function type, judging that the return value meets the preset condition.
Optionally, before the step of opening the loading state of the page component by calling the loading service code, the loading control optimizing apparatus further includes:
and calling a receiving function back, and receiving the global parameters to form the closure.
Optionally, after the step of loading the service code by invoking, the load control optimizing apparatus further includes:
and if the abnormal grammar is detected, calling the closing code.
Optionally, before the step of opening the loading state of the page component by calling the loading service code, the loading control optimizing apparatus further includes:
and if the loading style parameter comprises a preset style parameter and a receiving style parameter, generating the loading service code according to the receiving style parameter.
Optionally, before the step of acquiring the function to be executed and the loading style parameter of the page component, the loading control optimizing apparatus further includes:
and constructing a constraint function, and respectively carrying out parameter type constraint on the loading style parameters and the function to be executed through the constraint function.
The loading control optimizing device provided by the application solves the technical problem of higher development complexity of loading control by adopting the loading control optimizing method in the embodiment. Compared with the prior art, the beneficial effects of the loading control optimizing device provided by the embodiment of the application are the same as those of the loading control optimizing method provided by the embodiment, and other technical features in the loading control optimizing device are the same as those disclosed by the method of the embodiment, so that the description is omitted herein.
Example IV
An embodiment of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the load control optimization method of the above embodiments.
Referring now to fig. 3, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers PDAs (Personal Digital Assistant, personal digital assistants), PADs (tablet computers), PMPs (Portable Media Player, portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 3 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 3, the electronic device may include a processing means (e.g., a central processor, a graphics processor, etc.) that may perform various appropriate actions and processes according to a program stored in a ROM (Read-Only Memory) or a program loaded from a storage means into a RAM (Random Access Memory ). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM and RAM are connected to each other via a bus. Input/output (I/O) ports are also connected to the bus.
In general, the following systems may be connected to I/O ports: input devices including, for example, touch screens, touch pads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid Crystal Displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tape, hard disk, etc.; a communication device. The communication means may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While electronic devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from ROM. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by a processing device.
The electronic equipment provided by the application adopts the loading control optimization method in the embodiment, and solves the technical problem of higher development complexity of loading control. Compared with the prior art, the electronic device provided by the embodiment of the application has the same beneficial effects as the loading control optimization method provided by the embodiment, and other technical features in the electronic device are the same as the features disclosed by the method of the embodiment, and are not repeated here.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Example five
The present embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon for performing the method of the load control optimization method in the above-described embodiments.
The computer readable storage medium according to the embodiments of the present application may be, for example, a usb disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, 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, RAM, ROM, EPROM (Erasable Programmable Read Only Memory, erasable programmable read-only memory) or flash memory, an optical fiber, a CD-ROM (compact disc read-only memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, 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, or device. Program code embodied on a computer readable storage 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 thereof.
The above-described computer-readable storage medium may be contained in an electronic device; or may exist alone without being assembled into an electronic device.
The computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: acquiring a function to be executed and loading style parameters of a page component; the loading service code is called to start the loading state of the page component; executing the function to be executed to obtain a return value; and calling a closing code according to the return value to close the loading state of the page component.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a LAN (Local Area Network ) or WAN (Wide Area Network, wide area network), or it may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The computer readable storage medium provided by the application stores the computer readable program instructions for executing the loading control optimizing method, and solves the technical problem of higher development complexity of loading control. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the embodiment of the application are the same as those of the loading control optimizing method provided by the implementation, and are not described in detail herein.
Example six
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a load control optimization method as described above.
The computer program product provided by the application solves the technical problem of higher development complexity of load control. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the load control optimization method provided by the above embodiment, and are not described herein.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein, or any application, directly or indirectly, within the scope of the application.

Claims (10)

1. A load control optimization method, characterized in that the load control optimization method comprises:
acquiring a function to be executed and loading style parameters of a page component;
the loading service code is called to start the loading state of the page component;
executing the function to be executed to obtain a return value;
and calling a closing code according to the return value to close the loading state of the page component.
2. The load control optimization method of claim 1, wherein the step of invoking a shutdown code based on the return value comprises:
judging whether the return value meets a preset condition or not;
if the return value does not meet the preset condition, invoking a closing code;
and if the return value meets the preset condition, executing a chained calling function according to the return value until the execution task corresponding to the function to be executed is completed, and calling the closing code.
3. The load control optimization method of claim 2, wherein the step of determining whether the return value satisfies a preset condition comprises:
acquiring the function type of the function to be executed;
if the function type is a synchronous function type, judging that the return value does not meet a preset condition;
and if the function type is an asynchronous function type, judging that the return value meets the preset condition.
4. The load control optimization method of claim 1, further comprising, prior to the step of invoking load service code to open the load state of the page component:
and calling a receiving function back, and receiving the global parameters to form the closure.
5. The load control optimization method of claim 1, further comprising, after the step of loading the service code by invoking:
and if the abnormal grammar is detected, calling the closing code.
6. The load control optimization method of claim 1, further comprising, prior to the step of invoking load service code to open the load state of the page component:
and if the loading style parameter comprises a preset style parameter and a receiving style parameter, generating the loading service code according to the receiving style parameter.
7. The load control optimization method of claim 1, further comprising, prior to the step of obtaining the function to be executed and the load style parameters of the page component:
and constructing a constraint function, and respectively carrying out parameter type constraint on the loading style parameters and the function to be executed through the constraint function.
8. A load control optimizing apparatus, characterized in that the load control optimizing apparatus comprises:
the acquisition module is used for acquiring functions to be executed and loading style parameters of the page component;
the starting module is used for starting the loading state of the page component by calling the loading service code;
the execution module is used for executing the function to be executed to obtain a return value;
and the closing module is used for calling a closing code according to the return value so as to close the loading state of the page component.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the load control optimization method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a program that implements a load control optimization method, the program implementing the load control optimization method being executed by a processor to implement the steps of the load control optimization method according to any one of claims 1 to 7.
CN202310906500.0A 2023-07-21 2023-07-21 Loading control optimization method and device, electronic equipment and readable storage medium Pending CN117032857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310906500.0A CN117032857A (en) 2023-07-21 2023-07-21 Loading control optimization method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310906500.0A CN117032857A (en) 2023-07-21 2023-07-21 Loading control optimization method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN117032857A true CN117032857A (en) 2023-11-10

Family

ID=88634536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310906500.0A Pending CN117032857A (en) 2023-07-21 2023-07-21 Loading control optimization method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117032857A (en)

Similar Documents

Publication Publication Date Title
CN108182131B (en) Method and device for monitoring application running state, storage medium and electronic equipment
CN104572042A (en) Cross-platform middleware device of mobile terminal equipment and implementation method of cross-platform middleware device of mobile terminal equipment
CN109634599B (en) Page view display method, device, equipment and storage medium
CN111813641B (en) Method, device, medium and equipment for collecting crash information
CN110874217A (en) Interface display method and device for fast application and storage medium
EP3073371A1 (en) Method and device for loading theme application
CN110287810B (en) Vehicle door motion detection method, device and computer readable storage medium
CN114489896B (en) Content display method and device, storage medium and electronic equipment
CN110489180B (en) Buried point reporting method, device, medium and electronic equipment
CN117032857A (en) Loading control optimization method and device, electronic equipment and readable storage medium
CN113377365B (en) Code display method, apparatus, device, computer readable storage medium and product
CN114860368A (en) Control method and device of display equipment, electronic equipment and readable storage medium
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN113709573B (en) Method, device, equipment and storage medium for configuring video special effects
CN110908860B (en) Java thread acquisition method and device, medium and electronic equipment
CN114979792B (en) Display device control method and device, electronic device and readable storage medium
CN109542696B (en) Method and device for acquiring equipment data, readable storage medium and electronic equipment
CN111885194B (en) Communication method and device for communication application and electronic equipment
CN114816609B (en) Method and device for displaying window, electronic equipment and computer readable storage medium
CN117421251B (en) Method and system for debugging user interface of embedded terminal
CN115348478B (en) Equipment interactive display method and device, electronic equipment and readable storage medium
CN112559394B (en) System library access method and device and electronic equipment
CN111381797B (en) Processing method and device for realizing KTV function on client and user equipment
CN111124553B (en) Program execution method, device, terminal and storage medium
CN111381898B (en) Interface calling method and device, mobile terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: No. 107 Datagu Middle Road, Xiantao Street, Yubei District, Chongqing, 401100

Applicant after: Chongqing Gengchen Energy Technology Co.,Ltd.

Address before: No. 107 Datagu Middle Road, Xiantao Street, Yubei District, Chongqing, 401100

Applicant before: Chongqing Three Gorges Times Energy Technology Co.,Ltd.

Country or region before: China