Program call decoupling method and device, electronic device and storage medium

A program call and program technology, applied in the computer field, can solve problems such as low program start-up efficiency, achieve the effect of shortening start-up time and improving start-up efficiency

Active Publication Date: 2018-12-11
BEIJING SANKUAI ONLINE TECH CO LTD
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The present application provides a program call decoupling method, which at least solves the

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Program call decoupling method and device, electronic device and storage medium
  • Program call decoupling method and device, electronic device and storage medium
  • Program call decoupling method and device, electronic device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0024] A program call decoupling method disclosed in this embodiment, such as figure 1 As shown, the method includes: Step 110 to Step 130.

[0025] Step 110, during program execution, in response to calling the first element in the program, load the dependency data in the binary data of the program into the runtime environment.

[0026] Wherein, the dependency data includes at least: an index key corresponding to the first element, and an index value corresponding to the second element, and the second element is an element on which the first element depends.

[0027] The programs described in the embodiments of the present application have corresponding binary data, and the binary data includes dependency data. The first element and the second element described in the embodiment of this application are used to represent two different elements, and the elements can be: functions, classes, methods, characters, strings, etc. that need to be accessed during the running of the pr...

Embodiment 2

[0036] A program call decoupling method disclosed in this embodiment, such as figure 2 As shown, the method includes: Step 210 to Step 250.

[0037] Step 210, according to the index key corresponding to the first element in the program and the second element on which the first element depends, determine the dependency relationship data composed of the index key and the index value corresponding to the second element.

[0038] During specific implementation, before loading the dependency relationship data in the binary data of the program into the runtime environment in response to the calling of the first element in the program during the execution of the program, it also includes: according to the The index key corresponding to the first element in the program, and the second element on which the first element depends, determine the dependency relationship data composed of the index key and the index value corresponding to the second element; the dependency relationship data...

Embodiment 3

[0076] A program call decoupling processing device disclosed in this embodiment, such as image 3 As shown, wherein the program has corresponding binary data, the binary data includes dependency data, and the device includes:

[0077] The dependency data loading module 310 is configured to load the dependency data in the binary data of the program into the runtime environment in response to calling the first element in the program during program execution, wherein the The dependency data includes at least: an index key corresponding to the first element, an index value corresponding to the second element, and the second element is an element on which the first element depends;

[0078] An index value determination module 320, configured to obtain an index value in the dependency data corresponding to the index key corresponding to the first element through the runtime environment;

[0079] A calling module 330, configured to call the second element corresponding to the index ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

A program call decoupling method belongs to the field of computer technology, and solves the problem of low program startup efficiency caused by program invocation decoupling in the prior art. The program call decoupling method disclosed in the present application includes: loading, during program execution, dependency data in binary data of the program to a runtime environment in response to a call to a first element in the program, the dependency data comprising at least an index key corresponding to the first element and an index value corresponding to a second element dependent on the first element; obtaining and calling a second element corresponding to the first element through the runtime environment. The program call decoupling method disclosed in the present application writes thedependency relation data in advance into the binary data of the program when the program is running, and loads the dependency relation data only when the element with dependency relation needs to beinvoked, thereby shortening the starting time of the program and improving the starting efficiency of the program.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a program call decoupling method, device, and electronic equipment. Background technique [0002] In the process of software development, when there is a dependency relationship between software modules or functions, there must be coupling between modules or functions. Theoretically, absolute zero coupling cannot be achieved, but some existing methods can be used to reduce the degree of coupling. to minimum. The +load method is often used as the first choice for decoupling information injection. The introduction of +load can help deal with decoupling issues such as dependency inversion. But at the same time, +load will cause the dynamic loader to load the classes corresponding to dependencies in advance when the program starts, which will prolong the program startup time. [0003] To sum up, the program call decoupling method in the prior art has at least the defect...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/445
CPCG06F9/44505G06F8/433G06F9/445G06F8/42G06F8/437
Inventor 王志宇徐臻姜沂
Owner BEIJING SANKUAI ONLINE TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products