CN106940714A - A kind of data processing method, device and electronic equipment - Google Patents

A kind of data processing method, device and electronic equipment Download PDF

Info

Publication number
CN106940714A
CN106940714A CN201710129745.1A CN201710129745A CN106940714A CN 106940714 A CN106940714 A CN 106940714A CN 201710129745 A CN201710129745 A CN 201710129745A CN 106940714 A CN106940714 A CN 106940714A
Authority
CN
China
Prior art keywords
delay
class
agent object
data processing
processing 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.)
Granted
Application number
CN201710129745.1A
Other languages
Chinese (zh)
Other versions
CN106940714B (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.)
Zhangyue Technology Co Ltd
Original Assignee
Zhangyue 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 Zhangyue Technology Co Ltd filed Critical Zhangyue Technology Co Ltd
Priority to CN201710129745.1A priority Critical patent/CN106940714B/en
Publication of CN106940714A publication Critical patent/CN106940714A/en
Application granted granted Critical
Publication of CN106940714B publication Critical patent/CN106940714B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • 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

Abstract

The embodiment of the invention discloses a kind of data processing method, device and electronic installation, it is related to technical field of data processing.The data processing method of the embodiment of the present invention includes:The delay proxy class with type parameter attribute is built, using the delay proxy class generation delay agent object, based on the delay agent object, the destination object with Circular dependency relation is generated in the way of delay loading.In addition, the embodiment of the invention also discloses a kind of data processing equipment and electronic equipment.By the scheme of the embodiment of the present invention, abnormal problem caused by Circular dependency can effectively solve the problem that.

Description

A kind of data processing method, device and electronic equipment
Technical field
The present invention relates to technical field of data processing, more particularly to for the processing skill of the data with Circular dependency relation Art.
Background technology
Circular dependency, the object of exactly two or more classes mutually holds the reference of other side in respective domain, such as CircleA quotes CircleB, and CircleB quotes CircleC, and CircleC quotes CircleA, then they are finally reflected as one Ring.Circular dependency during code compilation is carried out, would not often pass through due to there is recursive call.
For Circular dependency problem, in the prior art in the presence of some solutions, such as intermediary's method is injected, that is, is interdepended Class object do not hold the reference of other side directly, but by holding medium object (i.e. intermediary) drawing come indirect gain other side With.However, intermediary's injection method can produce the dependence between object and intervening objects, the coupling between software module is exacerbated Property.In addition, also there are problems that the scheme that Circular dependency is solved with delay injection method, i.e., complementary class in the prior art Object does not hold the reference of other side in construction, but is mutually injected into again in the domain of other side after construction complete.Due to prolonging Slow injection method is separated the constitutive logic and construction of object in itself, before construction complete is completed to injection, and object will In incomplete state, this incomplete state can be significantly expanded its duration with the increase of the complexity of system module, Add the unstability of system.Simultaneously as outside constitutive logic is split into construction in itself, and reduce to a certain extent The intelligibility of system.
Accordingly, it would be desirable to a kind of significantly more efficient Circular dependency data processing method.
The content of the invention
In view of this, it is at least part of the embodiments of the invention provide a kind of data processing method, device and electronic equipment Solve problems of the prior art.
In a first aspect, the embodiments of the invention provide a kind of data processing method, including:
Build the delay proxy class with type parameter attribute;
Use the delay proxy class generation delay agent object;
Based on the delay agent object, the destination object with Circular dependency relation is generated in the way of delay loading.
A kind of specific implementation according to embodiments of the present invention, methods described also includes:
Build the process class interface for generating object.
A kind of specific implementation according to embodiments of the present invention, it is described to use the delay proxy class generation delay agency Object, including:
The object of the process class interface is generated in the delay proxy class;
Based on the object of the process class interface, the delay agent object is generated.
A kind of specific implementation according to embodiments of the present invention, it is raw in the object based on the process class interface Into after the delay agent object, methods described also includes:
In the case where the object of the delay proxy class is sky, the delay of the delay proxy class generation for the first time is preserved Agent object;
When the delay agent object is called again, directly using the delay agent object preserved.
A kind of specific implementation according to embodiments of the present invention, it is described to be based on the delay agent object, to postpone to add The mode of load generates the destination object with Circular dependency relation, including:
The destination object with Circular dependency relation is generated in the way of anonymous function.
A kind of specific implementation according to embodiments of the present invention, it is described to be based on the delay agent object, to postpone to add The mode of load generates the destination object with Circular dependency relation, including:
When the delay proxy class is loaded, the delay agent object that the delay proxy class is defined is not initialised.
A kind of specific implementation according to embodiments of the present invention, it is described to be based on the delay agent object, to postpone to add The mode of load generates the destination object with Circular dependency relation, including:
Judge whether the delay agent object is in by use state;
When the delay agent object quilt in use, performing initialization operation to the delay agent object, and based on institute State delay agent object mode and generate the destination object with Circular dependency relation.
A kind of specific implementation according to embodiments of the present invention, the number of the destination object with Circular dependency relation Mesh is two or more;
The number of the delay agent object is identical with the number of the destination object with Circular dependency relation.
A kind of specific implementation according to embodiments of the present invention, it is described to use the delay proxy class generation delay agency Object, including:
In the class of the destination object with Circular dependency relation, the delay proxy class generation is defined in privately owned mode The delay agent object.
Second aspect, the embodiment of the present invention additionally provides a kind of data processing equipment, including:
First builds module, for building the delay proxy class with type parameter attribute;
First generation module, for using the delay proxy class generation delay agent object;
Second generation module, for based on the delay agent object, generated in the way of delay loading have circulation according to The destination object for the relation of relying.
A kind of specific implementation according to embodiments of the present invention, described device also includes:
Second builds module, for building the process class interface for being used for generating object.
A kind of specific implementation according to embodiments of the present invention, first generation module is additionally operable to:
The object of the process class interface is generated in the delay proxy class;
Based on the object of the process class interface, the delay agent object is generated.
A kind of specific implementation according to embodiments of the present invention, described device also includes:
Preserving module, in the case of empty, preserving the delay proxy class the in the object of the delay proxy class The delay agent object once generated;
Using module, for when the delay agent object is called again, directly using the delay agency couple preserved As.
A kind of specific implementation according to embodiments of the present invention, second generation module is additionally operable to:
The destination object with Circular dependency relation is generated in the way of anonymous function.
A kind of specific implementation according to embodiments of the present invention, second generation module is additionally operable to:
When the delay proxy class is loaded, the delay agent object that the delay proxy class is defined is not initialised.
A kind of specific implementation according to embodiments of the present invention, second generation module also includes:
Judge module, for judging whether the delay agent object is in by use state;
Performing module, for when the delay agent object to the delay agent object by use, perform initialization Operation, and the destination object with Circular dependency relation is generated based on the delay agent object mode.
A kind of specific implementation according to embodiments of the present invention, the number of the destination object with Circular dependency relation Mesh is two or more;
The number of the delay agent object is identical with the number of the destination object with Circular dependency relation.
A kind of specific implementation according to embodiments of the present invention, first generation module is additionally operable to:
In the class of the destination object with Circular dependency relation, the delay proxy class generation is defined in privately owned mode The delay agent object.
The third aspect, the embodiment of the present invention additionally provides a kind of electronic equipment, and the electronic equipment includes:
At least one processor;And,
The memory being connected with least one processor communication;Wherein,
The memory storage has can be by the instruction of at least one computing device, and the instruction is by least one processor Perform, so that at least one processor is able to carry out the number in any implementation of foregoing first aspect or first aspect According to processing method.
Fourth aspect, the embodiment of the present invention additionally provides a kind of non-transient computer readable storage medium storing program for executing, the non-transient meter Calculation machine readable storage medium storing program for executing stores computer instruction, and the computer instruction is used to make the computer perform aforementioned first aspect or the Data processing method in any implementation of one side.
5th aspect, the embodiment of the present invention additionally provides a kind of computer program product, and the computer program product includes The calculation procedure on non-transient computer readable storage medium storing program for executing is stored in, the computer program includes programmed instruction, when the program When instruction is computer-executed, the computer is set to perform the data in any implementation of aforementioned first aspect or first aspect Processing method.
Data processing method provided in an embodiment of the present invention, device, electronic equipment, non-transient computer readable storage medium storing program for executing And computer program, by the way that based on delay agent object, the target with Circular dependency relation is generated in the way of delay loading Object, ensure that the object that construction is produced can reach shape in construction complete make it that object is in status of relative intact status Formula and unification in logic, it is to avoid the presence of incomplete object.Simultaneously as only there is circulation by postponing agent object generation The destination object of dependence, compares intermediary's injection method in the system degree of coupling, only can produce object to agent object, generation here Object is managed to the two unidirectional couplings relations relied between object, the coupling of system is reduced.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be attached to what is used needed for embodiment Figure is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this area For those of ordinary skill, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of data processing method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet for generating delay agent object method provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic flow sheet for postponing agent object initialization provided in an embodiment of the present invention;
Fig. 4 is the schematic flow sheet of another data processing method provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic block diagram of data processing equipment provided in an embodiment of the present invention;
Fig. 6 is the schematic block diagram of another data processing equipment provided in an embodiment of the present invention;
Fig. 7 is the schematic block diagram of another data processing equipment provided in an embodiment of the present invention;
Fig. 8 is the schematic block diagram of the second generation module provided in an embodiment of the present invention;
Fig. 9 is the structural representation of a kind of electronic equipment provided in an embodiment of the present invention.
Embodiment
The embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.
It will be appreciated that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Base Embodiment in the present invention, those of ordinary skill in the art obtained under the premise of creative work is not made it is all its Its embodiment, belongs to the scope of protection of the invention.
Fig. 1 is a kind of data processing method provided in an embodiment of the present invention, and referring to Fig. 1, this method comprises the following steps:
S101, builds the delay proxy class with type parameter attribute.
For Circular dependency problem, it is assumed that we have a class ProductionDepartment, it contains other one Individual class MarketingDepartment object marketing, while class MarketingDepartment also contains one Class ProductionDepartment object production.So now no matter instantiate which class, can all produce because Compiling is caused to can't pass or the problem of abnormity prompt for Circular dependency.
In order to solve the problems, such as such object Circular dependency, class ProductionDepartment object can be given What the object that production writes proxy class a LazyProxy, such class MarketingDepartment was included is no longer Marketing but proxy class LazyProxy, thus make use of third party to solve the problems, such as Circular dependency.By taking Java as an example, Delay proxy class can be built as follows:
Defined herein LazyProxy type parameter is T, and T is the object type that can be pre-defined.
S102, uses the delay proxy class generation delay agent object.
Specifically, can be generated in the class with Circular dependency relation using the delay proxy class defined in step S101 Postpone agent object., it is necessary to pre-define the class with Circular dependency relation before generation delay agent object, with Exemplified by ProductionDepartment classes, it is defined as follows:
class ProductionDepartment{
Private LazyProxy < MarketingDepartment > marketing
}
Through the above way, defined in ProductionDepartment class with delay proxy class LazyProxy MarketingDepartment object marketing, can when ProductionDepartment classes are by system initialization To generate ProductionDepartment object marketing using LazyProxy classes.
Based on same mode, it would however also be possible to employ LazyProxy is generated in MarketingDepartment class ProductionDepartment object production:
class MarketingDepartment{
Private LazyProxy < ProductionDepartment > production;
}
S103, based on the delay agent object, generates the target with Circular dependency relation in the way of delay loading Object.
Specifically, in needs call the operation function of the object with dependence, can state to need to make first Object, these objects are packaged generation using LazyProxy classes, such as:
LazyProxy < ProductionDepartment > production
LazyProxy < MarketingDepartment > marketing
During object is generated, different from traditional i.e. generation object of class loading, needing to specify herein needs generation Destination object produced by the way of delay loading, i.e. only just generated when destination object is used, and in other feelings Destination object is not generated under condition then.
As a kind of implementation, the Lazy anonymous functions in JAVA can be used to realize above-mentioned functions, the work(is being realized During energy, in order to which logic is realized in simplification, above-mentioned functions can be realized using Lambda expression formulas, it is as follows:
This.production=lazy (()-> new ProductionDepartment (this, " production″))
This.marketing=lazy (()-> new MarketingDepartment (this, " marketing "))
In step S101~S103, the destination object with Circular dependency relation, energy are generated in the way of delay loading Enough objects for ensureing that construction is produced can reach form and logic in construction complete make it that object is in status of relative intact status On unification, it is to avoid the presence of incomplete object.
During Circular dependency is solved, in addition to step S101~S103 in above-described embodiment, optionally, ginseng See Fig. 2, generation delay agent object method can also comprise the following steps:
S201, builds the process class interface for generating object.
By definition procedure class interface, the process class of definition can be quoted in delay agency, and by pair of the process class As carrying out parameter transmission as intermediary.Specifically, can define as follows:
interface Provider<T>{
T get();
}
S202, generates the object of the process class interface in the delay proxy class.
After process class interface is defined, the process class can be defined in delay proxy class, and generate the process class Object, it is as follows:
class LazyProxy<T>{
private Provider<T>provider;
}
S203, based on the object of the process class interface, generates the delay agent object.
By the object of the invoked procedure class interface in delay agency, delay agent object can be generated, specific delay The content of agent object, can determine according to the parameter of input, be exemplified below:
public LazyProxy(Provider<T>provider){
This.provider=provider;
S204, in the case where the object of the process class interface is sky, preserves the delay proxy class and generates for the first time Delay agent object.
Efficiency is called in order to ensure object, can repeat to call the delay agent object generated for the first time, therefore, can be with Function is set to judge whether to postpone agent object, when there is delay agent object, the delay to first time generation is acted on behalf of Object is preserved, as follows:
S205, when the delay agent object is called again, directly using the delay agent object preserved.
By the technical scheme in the embodiment, the object of delay proxy class can be flexibly defined, and improves life Into delay act on behalf of the service efficiency of class object.
Optionally, the embodiment of the present invention additionally provides a kind of method for postponing agent object initialization, referring to Fig. 3, the party Method comprises the following steps:
S301, when the delay proxy class is loaded, the delay agent object that the delay proxy class is defined is not first Beginningization.
In order to ensure that the delay agent object that delay proxy class is defined is not initialised, it is necessary to using specific mode The initialization mode of object is defined, as a kind of concrete implementation mode, the function can be realized using Lazy anonymous functions.
S302, judges whether the delay agent object is in by use state.
The state of monitoring delay agent object, to judge whether delay agent object is called.When delay agent object It is called or in use, go to step S303, otherwise, do not perform operation.
S303, initialization operation is performed to the delay agent object, and generate based on the delay agent object mode Destination object with Circular dependency relation.
By way of in the embodiment, it ensure that the object that construction is produced can be to cause object in construction complete In status of relative intact status, form and unification in logic are reached.
During step S102 is realized, referring to Fig. 4, specifically it can implement in the following way:
S401, in the class of the destination object with Circular dependency relation, the delay proxy class is defined in privately owned mode The delay agent object of generation.
Specifically, the delay agent object of delay proxy class generation can be defined by the way of private, pass through This definition mode, the delay agent object of delay proxy class generation can only be accessed in this class, in other classes It can not conduct interviews, improve the security of data.Using the marketing defined in ProductionDepartment classes as Example, is exemplified below:
class ProductionDepartment{
Private LazyProxy < MarketingDepartment > marketing;
}
Fig. 5 is a kind of data processing equipment provided in an embodiment of the present invention, and referring to Fig. 5, the data processing equipment 50 includes:
First builds module 501, for building the delay proxy class with type parameter attribute.
For Circular dependency problem, it is assumed that we have a class ProductionDepartment, it contains other one Individual class MarketingDepartment object marketing, while class MarketingDepartment also contains one Class ProductionDepartment object production.Which so now can all occur no matter class instantiated StackOverflowError mistakes.
In order to solve the problems, such as such object Circular dependency, class ProductionDepartment object can be given What the object that production writes proxy class a LazyProxy, such class MarketingDepartment was included is no longer Marketing but proxy class LazyProxy, thus make use of third party to solve the problems, such as Circular dependency.By taking Java as an example, Delay proxy class can be built as follows:
Defined herein LazyProxy type parameter is T, and T is the object type that can be pre-defined.
First generation module 502, for using the delay proxy class generation delay agent object.
Specifically, can be generated in the class with Circular dependency relation using the delay proxy class defined in step S101 Postpone agent object., it is necessary to pre-define the class with Circular dependency relation before generation delay agent object, with Exemplified by ProductionDepartment classes, it is defined as follows:
class ProductionDepartment{
Private LazyProxy < MarketingDepartment > marketing
}
Through the above way, defined in ProductionDepartment class with delay proxy class LazyProxy MarketingDepartment object marketing, can when ProductionDepartment classes are by system initialization To generate ProductionDepartment object marketing using LazyProxy classes.
Based on same mode, it would however also be possible to employ LazyProxy is generated in MarketingDepartment class ProductionDepartment object production:
class MarketingDepartment{
Private LazyProxy < ProductionDepartment > production;
}
Second generation module 503, has circulation for based on the delay agent object, being generated in the way of delay loading The destination object of dependence.
Specifically, in needs call the operation function of the object with dependence, can state to need to make first Object, these objects are packaged generation using LazyProxy classes, such as:
LazyProxy < ProductionDepartment > production
LazyProxy < MarketingDepartment > marketing
During object is generated, different from traditional i.e. generation object of class loading, needing to specify herein needs generation Destination object produced by the way of delay loading, i.e. only just generated when destination object is used, and in other feelings Destination object is not generated under condition then.
As a kind of implementation, the Lazy anonymous functions in JAVA can be used to realize above-mentioned functions, the work(is being realized During energy, in order to which logic is realized in simplification, above-mentioned functions can be realized using Lambda expression formulas, it is as follows:
This.production=lazy (()-> new ProductionDepartment (this, " production″))
This.marketing=lazy (()-> new MarketingDepartment (this, " marketing "))
In scheme in the present embodiment, the destination object with Circular dependency relation is generated in the way of delay loading, It ensure that the object that construction is produced can reach form and patrol in construction complete make it that object is in status of relative intact status Unification on volume, it is to avoid the presence of incomplete object.
Data processing equipment 50, in addition to including above-mentioned module, optionally, referring to Fig. 6, data processing equipment 50 may be used also With including:
Second builds module 601, for building the process class interface for being used for generating object.
By definition procedure class interface, the process class of definition can be quoted in delay agency, and by pair of the process class As carrying out parameter transmission as intermediary.Specifically, can define as follows:
interface Provider<T>{
T get();
}
Optionally, referring to Fig. 7, data processing equipment 50 can also include:
Preserving module 701, in the case of in the object of the delay proxy class for sky, preserves the delay proxy class The delay agent object generated for the first time.
Using module 702, for when the delay agent object is called again, directly being acted on behalf of using the delay preserved Object.
Optionally, referring to Fig. 8, the second generation module 503 can include:
Judge module 5031, for judging whether the delay agent object is in by use state.
Performing module 5032, for when the delay agent object to the delay agent object by use, perform just Beginningization is operated, and generates the destination object with Circular dependency relation based on the delay agent object mode.
In the particular content performed by functional module in the corresponding embodiments of Fig. 5-8 and the embodiment of the method corresponding to it Content correspond, do not repeating herein.
Fig. 9 shows the structural representation of electronic equipment 90 provided in an embodiment of the present invention, and electronic equipment 90 is included at least One processor 901 (such as CPU), at least one input/output interface 904, memory 902, and at least one communication bus 903, for realizing the connection communication between these parts.At least one processor 901 is used to perform what is stored in memory 902 Computer instruction, so that at least one described processor 901 is able to carry out the embodiment of foregoing any data processing method.Storage Device 902 be non-transient memory (non-transitory memory), its can include volatile memory, for example at a high speed with Machine access memory (RAM:Random Access Memory), nonvolatile memory (non-volatile can also be included Memory), for example, at least one magnetic disk storage.(can be wired or wireless by least one input/output interface 904 Communication interface) realize and the communication connection between at least one other equipment or unit.
In some embodiments, memory 902 stores program 9021, the configuration processor 9021 of processor 901, for holding Content in the foregoing any data processing method embodiment of row.
The electronic equipment can exist in a variety of forms, include but is not limited to:
(1) mobile communication equipment:The characteristics of this kind equipment is that possess mobile communication function, and to provide speech, data Communicate as main target.This Terminal Type includes:Smart mobile phone (such as iPhone), multimedia handset, feature mobile phone, and it is low Hold mobile phone etc..
(2) super mobile personal computer equipment:This kind equipment belongs to the category of personal computer, there is calculating and processing work( Can, typically also possess mobile Internet access characteristic.This Terminal Type includes:PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device:This kind equipment can show and play content of multimedia.The kind equipment includes:Audio, Video player (such as iPod), handheld device, e-book, and intelligent toy and portable car-mounted navigation equipment.
(4) particular server:The equipment for providing the service of calculating, the composition of server includes processor, hard disk, internal memory, is Bus of uniting etc., server is similar with general computer architecture, but is due to need to provide highly reliable service, therefore in processing Require higher in terms of ability, stability, reliability, security, scalability, manageability.
(5) other electronic equipments with data interaction function.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment Intrinsic key element.In the absence of more restrictions, the key element limited by sentence " including one ... ", it is not excluded that Also there is other identical element in the process including the key element, method, article or equipment.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.
For device embodiment, because it is substantially similar to embodiment of the method, so the comparison of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
Represent in flow charts or logic and/or step described otherwise above herein, for example, being considered use In the order list for the executable instruction for realizing logic function, it may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system including the system of processor or other can be held from instruction The system of row system, device or equipment instruction fetch and execute instruction) use, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass Defeated program is for instruction execution system, device or equipment or the dress for combining these instruction execution systems, device or equipment and using Put.The more specifically example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wirings Connecting portion (electronic installation), portable computer diskette box (magnetic device), random access memory (RAM), read-only storage (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device, and portable optic disk is read-only deposits Reservoir (CDROM).In addition, can even is that can be in the paper of printing described program thereon or other are suitable for computer-readable medium Medium, because can then enter edlin, interpretation or if necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.
In the above-described embodiment, multiple steps or method can in memory and by suitable instruction be performed with storage The software or firmware that system is performed are realized.If for example, being realized with hardware, with another embodiment, can use Any one of following technology well known in the art or their combination are realized:With for realizing logic work(to data-signal The discrete logic of the logic gates of energy, the application specific integrated circuit with suitable combinational logic gate circuit, programmable gate Array (PGA), field programmable gate array (FPGA) etc..
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, the change or replacement that can be readily occurred in, all should It is included within the scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.

Claims (10)

1. a kind of data processing method, it is characterised in that including:
Build the delay proxy class with type parameter attribute;
Use the delay proxy class generation delay agent object;
Based on the delay agent object, the destination object with Circular dependency relation is generated in the way of delay loading.
2. data processing method according to claim 1, it is characterised in that methods described also includes:
Build the process class interface for generating object.
3. data processing method according to claim 2, it is characterised in that described to be prolonged using the delay proxy class generation Slow agent object, including:
The object of the process class interface is generated in the delay proxy class;
Based on the object of the process class interface, the delay agent object is generated.
4. data processing method according to claim 3, it is characterised in that in pair based on the process class interface As generating after the delay agent object, methods described also includes:
In the case where the object of the delay proxy class is sky, the delay for preserving the delay proxy class generation for the first time is acted on behalf of Object;
When the delay agent object is called again, directly using the delay agent object preserved.
5. data processing method according to claim 1, it is characterised in that described to be based on the delay agent object, with The mode of delay loading generates the destination object with Circular dependency relation, including:
The destination object with Circular dependency relation is generated in the way of anonymous function.
6. data processing method according to claim 1, it is characterised in that described to be based on the delay agent object, with The mode of delay loading generates the destination object with Circular dependency relation, including:
When the delay proxy class is loaded, the delay agent object that the delay proxy class is defined is not initialised.
7. data processing method according to claim 1, it is characterised in that described to be based on the delay agent object, with The mode of delay loading generates the destination object with Circular dependency relation, including:
Judge whether the delay agent object is in by use state;
When the delay agent object quilt in use, performing initialization operation to the delay agent object, and prolonged based on described Slow agent object mode generates the destination object with Circular dependency relation.
8. data processing method according to claim 1, it is characterised in that:
The number of the destination object with Circular dependency relation is two or more;
The number of the delay agent object is identical with the number of the destination object with Circular dependency relation.
9. data processing method according to claim 1, it is characterised in that described to be prolonged using the delay proxy class generation Slow agent object, including:
In the class of the destination object with Circular dependency relation, defined in privately owned mode described in the delay proxy class generation Postpone agent object.
10. a kind of data processing equipment, it is characterised in that including:
First builds module, for building the delay proxy class with type parameter attribute;
First generation module, for using the delay proxy class generation delay agent object;
Second generation module, is closed for based on the delay agent object, being generated in the way of delay loading with Circular dependency The destination object of system.
CN201710129745.1A 2017-03-06 2017-03-06 A kind of data processing method, device and electronic equipment Active CN106940714B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710129745.1A CN106940714B (en) 2017-03-06 2017-03-06 A kind of data processing method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710129745.1A CN106940714B (en) 2017-03-06 2017-03-06 A kind of data processing method, device and electronic equipment

Publications (2)

Publication Number Publication Date
CN106940714A true CN106940714A (en) 2017-07-11
CN106940714B CN106940714B (en) 2019-07-30

Family

ID=59468720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710129745.1A Active CN106940714B (en) 2017-03-06 2017-03-06 A kind of data processing method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN106940714B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984728A (en) * 2018-07-11 2018-12-11 北京奇艺世纪科技有限公司 A kind of proxy class generation method and device
CN109683992A (en) * 2017-10-18 2019-04-26 北京京东尚科信息技术有限公司 Method and apparatus for managing object
CN110673801A (en) * 2019-09-29 2020-01-10 苏州浪潮智能科技有限公司 Method and related device for initializing operation of dependent object
CN110874246A (en) * 2018-08-28 2020-03-10 Tcl集团股份有限公司 Module loading method, system and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101639775A (en) * 2009-09-01 2010-02-03 用友软件股份有限公司 Constructing method of component and device
US20120222030A1 (en) * 2009-08-19 2012-08-30 Nxp B.V. Lazy resource management
CN104360862A (en) * 2014-11-20 2015-02-18 浪潮通用软件有限公司 Xml serialization model realization method based on attribute label and configuration file in Net platform
CN104714813A (en) * 2013-12-13 2015-06-17 航天信息股份有限公司 Android database lazy loading method based on proxy mode

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120222030A1 (en) * 2009-08-19 2012-08-30 Nxp B.V. Lazy resource management
CN101639775A (en) * 2009-09-01 2010-02-03 用友软件股份有限公司 Constructing method of component and device
CN104714813A (en) * 2013-12-13 2015-06-17 航天信息股份有限公司 Android database lazy loading method based on proxy mode
CN104360862A (en) * 2014-11-20 2015-02-18 浪潮通用软件有限公司 Xml serialization model realization method based on attribute label and configuration file in Net platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SPEEDME: "java对象循环依赖问题", 《CSDN博客,HTTP://BLOG.CSDN.NET/SPEEDME/ARTICLE/DETAILS/41145125》 *
李刚: "Hibernate延迟加载剖析与代理模式应用", 《HTTPS://WWW.IBM.COM/DEVELOPERWORKS/CN/JAVA/J-LO-HIBERNATELAZY/》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109683992A (en) * 2017-10-18 2019-04-26 北京京东尚科信息技术有限公司 Method and apparatus for managing object
CN109683992B (en) * 2017-10-18 2022-06-07 北京京东尚科信息技术有限公司 Method and apparatus for managing objects
CN108984728A (en) * 2018-07-11 2018-12-11 北京奇艺世纪科技有限公司 A kind of proxy class generation method and device
CN110874246A (en) * 2018-08-28 2020-03-10 Tcl集团股份有限公司 Module loading method, system and equipment
CN110673801A (en) * 2019-09-29 2020-01-10 苏州浪潮智能科技有限公司 Method and related device for initializing operation of dependent object
CN110673801B (en) * 2019-09-29 2022-11-25 苏州浪潮智能科技有限公司 Method and related device for initializing operation of dependent object

Also Published As

Publication number Publication date
CN106940714B (en) 2019-07-30

Similar Documents

Publication Publication Date Title
CN106940714B (en) A kind of data processing method, device and electronic equipment
US7865780B2 (en) Method for test case generation
CN106886568B (en) One kind divides table method, apparatus and electronic equipment
JP2012234536A (en) Methods for code generation from semantic models and rules
EP3912074B1 (en) Generating a synchronous digital circuit from a source code construct defining a function call
WO2021000575A1 (en) Data interaction method and apparatus, and electronic device
WO2021239074A1 (en) Smart contract code generation method, program, and device
CN108228754A (en) flow generation method and terminal device
CN104615703A (en) RDF data distributed parallel inference method combined with Rete algorithm
CN110515977A (en) Data query method, apparatus, computer equipment and storage medium
Yu et al. Modeling and analysis of mobile cloud computing based on bigraph theory
Jekjantuk et al. Modelling and reasoning in metamodelling enabled ontologies
CN109299913B (en) Employee salary scheme generation method and device
Cui et al. A hierarchical combinatorial testing method for smart phone software in wearable IoT systems
CN109739872A (en) A kind of implementation method, system and the operating method of SQL statement processing
WO2014165464A2 (en) Cryptographic mechanisms to provide information privacy and integrity
CN103561113A (en) Web Service interface generating method and device
CN113691403B (en) Topology node configuration method, related device and computer program product
US8600914B2 (en) Left and right unlinking for a shared knowledge base
Li et al. Policy to cope with deadlocks and livelocks for flexible manufacturing systems using the max′‐controlled new smart siphons
CN115022312A (en) Method and device for realizing multiple intelligent contract engines, electronic equipment and storage medium
CN102880469B (en) A kind of realize the method that ExclusiveArea to OSResource in AUTOSAR maps
Brdjanin et al. On automated generation of associations in conceptual database model
CN110960858A (en) Game resource processing method, device, equipment and storage medium
US11954017B2 (en) Dynamic analysis of rest API testing in microservice architecture

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