CN109271150B - Instance object processing method and device based on JAVA - Google Patents

Instance object processing method and device based on JAVA Download PDF

Info

Publication number
CN109271150B
CN109271150B CN201810790716.4A CN201810790716A CN109271150B CN 109271150 B CN109271150 B CN 109271150B CN 201810790716 A CN201810790716 A CN 201810790716A CN 109271150 B CN109271150 B CN 109271150B
Authority
CN
China
Prior art keywords
instance object
instance
annotation
module
preset reference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810790716.4A
Other languages
Chinese (zh)
Other versions
CN109271150A (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.)
Juhaokan Technology Co Ltd
Original Assignee
Juhaokan 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 Juhaokan Technology Co Ltd filed Critical Juhaokan Technology Co Ltd
Priority to CN201810790716.4A priority Critical patent/CN109271150B/en
Publication of CN109271150A publication Critical patent/CN109271150A/en
Application granted granted Critical
Publication of CN109271150B publication Critical patent/CN109271150B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Library & Information Science (AREA)
  • Stored Programmes (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The embodiment of the invention provides a JAVA-based instance object processing method and a JAVA-based instance object processing device, wherein the method comprises the following steps: receiving a building request for building a first instance object; the first instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation; extracting an annotation corresponding to the first instance object; building the first instance object from the annotation; performing tangent plane processing on the annotation to acquire characteristic parameters for creating the first instance object; and storing the characteristic parameters into a preset reference object relation table. The embodiment of the invention completes the new creation of the instance object under the condition of not increasing the code amount, and simultaneously improves the expandability and the transportability.

Description

Instance object processing method and device based on JAVA
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a JAVA-based instance object processing method and a JAVA-based instance object processing apparatus.
Background
The technological progress makes people's life more and more intelligent, and for example, the TV set is taken as, and traditional TV set function is limited, and present intelligent TV set's function is rich and varied, and this mainly benefits from the operating system of intelligent TV set.
The operating systems of the existing smart televisions are generally android, and the programming language of the android includes JAVA. In JAVA, when there are multiple instance objects with reference relationship, if it is necessary to delete or add instance objects, the general idea is to directly perform a cut on a method, but this has the disadvantage that the processing logic of the cut is too complex, and special processing is required for each method.
For example, calling a deletion interface of an instance object requires querying whether the instance object is referenced by other instance objects, so that a reference relationship needs to be queried before executing deletion logic of each instance object; each time a new instance object is added, logic for querying the reference relationship needs to be added to the other instance object interfaces that are referenced. This results in that the user may need to perform many round trips to delete an instance object during the usage process, which results in low work efficiency and poor user experience.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present invention provide a JAVA-based instance object processing method and a corresponding JAVA-based instance object processing apparatus.
In order to solve the above problem, an embodiment of the present invention discloses a JAVA-based instance object processing method, including:
receiving a building request for building a first instance object; the first instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation;
extracting an annotation corresponding to the first instance object;
building the first instance object from the annotation;
performing tangent plane processing on the annotation to acquire characteristic parameters for creating the first instance object;
and storing the characteristic parameters into a preset reference object relation table.
Preferably, the annotation is stored in a preset reference instance object table, and the annotation includes an enumerated value of an instance object; the build request includes an enumerated value of the first instance object;
the step of extracting the annotation corresponding to the first instance object comprises:
finding out a target enumeration value matched with the enumeration value of the first instance object from the preset reference instance object table;
determining a target annotation comprising the target enumeration value;
and extracting the target annotation, and taking the target annotation as an annotation corresponding to the first instance object.
Preferably, the characteristic parameters are stored in a preset reference instance object relationship table, and the characteristic parameters include a constraint type of the first instance object, an enumerated value of the first instance object, and an enumerated value of an instance object referenced by the first instance object.
Preferably, the step of obtaining the characteristic parameters for creating the first instance object includes:
and searching a characteristic parameter associated with the enumeration value of the first instance object from a preset reference instance object relation table.
Preferably, the method further comprises the following steps:
receiving an add request for adding a second instance object; the add request includes an enumerated value of the second instance object, the second instance object being an instance object referenced by the first instance object;
finding out an enumeration value of the instance object referenced by the first instance object from a preset reference object relation table;
deleting enumerated values of the instance objects referenced by the first instance object;
and adding the enumeration value of the instance object referenced by the first instance object and the enumeration value of the second instance object into the preset reference object relation table.
The embodiment of the invention also discloses a JAVA-based instance object processing method, which comprises the following steps:
receiving a deletion request for deleting the third instance object;
querying whether an enumerated value of the instance object referenced by the third instance object is contained in a preset reference object relation table;
if not, deleting the characteristic parameters associated with the third instance object from the preset reference object relation table, and deleting the third instance object at the same time; and if so, ignoring the deletion request.
Correspondingly, the embodiment of the invention discloses a JAVA-based instance object processing device, which comprises:
the first receiving module is used for receiving an establishment request for establishing a first instance object; the first instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation;
the extraction module is used for extracting the annotation corresponding to the first instance object;
the establishing module is used for establishing the first instance object according to the annotation;
the obtaining module is used for performing section processing on the annotation and obtaining the characteristic parameters for creating the first instance object;
and the storage module is used for storing the characteristic parameters into a preset reference object relation table.
Preferably, the annotation is stored in a preset reference instance object table, and the annotation includes an enumerated value of an instance object; the build request includes an enumerated value of the first instance object;
the extraction module comprises:
an enumeration value lookup submodule, configured to find a target enumeration value matching the enumeration value of the first instance object from the preset reference instance object table;
an annotation determination sub-module for determining a target annotation comprising the target enumeration value;
and the annotation extraction sub-module is used for extracting the target annotation and taking the target annotation as the annotation corresponding to the first instance object.
Preferably, the characteristic parameters are stored in a preset reference instance object relationship table, and the characteristic parameters include a constraint type of the first instance object, an enumerated value of the first instance object, and an enumerated value of an instance object referenced by the first instance object.
Preferably, the obtaining module includes:
and the characteristic parameter searching submodule is used for searching the characteristic parameter related to the enumeration value of the first instance object from a preset reference instance object relation table.
Preferably, the method further comprises the following steps:
the first receiving module is also used for receiving an adding request for adding the second instance object; the add request includes an enumerated value of the second instance object, the second instance object being an instance object referenced by the first instance object;
a first enumeration value searching module, configured to search, from a preset reference object relationship table, an enumeration value of an instance object referenced by the first instance object;
a first deletion module to delete enumerated values of the instance objects referenced by the first instance object;
an adding module, configured to add the enumeration value of the instance object referenced by the first instance object and the enumeration value of the second instance object to the preset reference object relationship table.
Correspondingly, the embodiment of the invention also discloses a JAVA-based instance object processing device, which comprises:
a second receiving module, configured to receive a deletion request for deleting the third instance object;
a second enumerated value searching module, configured to query, from a preset reference object relationship table, whether an enumerated value of an instance object referenced by the third instance object is included;
and the second deleting module is used for deleting the characteristic parameters associated with the third instance object from the preset reference object relation table and deleting the third instance object at the same time.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, a first instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation; when an establishing request for establishing a new first instance object is received, firstly extracting an annotation corresponding to the first instance object, then establishing the first instance object according to the annotation, then performing tangent plane processing on the annotation to obtain a characteristic parameter for establishing the first instance object, and finally storing the characteristic parameter into a preset reference object relation table. Therefore, under the condition that the code amount is not increased, the new establishment of the instance object is completed, meanwhile, the instance object referred by the newly established instance object and the reference relationship of the instance object and the instance object are also saved, the invasion to the service code is reduced, the reference relationship between the newly increased instance object and other instance objects can be established by adding the JAVA annotation, other logic codes are not needed, and the expandability is improved; the reference relation of each instance object in the product is clarified, the core code is directly copied, and the core code can be transplanted to other products by adding JAVA annotation, so that the portability is improved.
In addition, when a deletion request for deleting a third instance object is received, whether an enumeration value of the instance object referenced by the third instance object is contained in a preset reference object relation table is inquired, if not, a characteristic parameter associated with the third instance object is deleted from the preset reference object relation table, and the third instance object is deleted at the same time; and if so, ignoring the deletion request. Therefore, the deletion operation of the instance object can be completed based on the reference relation of each instance object, the operation of a user is simplified, and the working efficiency is improved.
Drawings
FIG. 1 is a flowchart illustrating the steps of an embodiment of a JAVA-based instance object processing method of the present invention;
FIG. 2 is a diagram illustrating names of modules and reference relationships between modules according to the present invention;
FIG. 3 is a flowchart illustrating the steps of another embodiment of a JAVA-based instance object processing method of the present invention;
FIG. 4 is a block diagram of an embodiment of a JAVA-based instance object processing apparatus according to the present invention;
fig. 5 is a block diagram illustrating the structure of another embodiment of a JAVA based instance object processing apparatus according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a JAVA based instance object processing method of the present invention is shown.
Before describing the process flow of the present application in detail, the preparation work of the present application will be described.
In the present application, three tables are preset, which are: a reference instance object table (trace _ module) for storing the enumeration value of each instance object and the corresponding instance object data; a reference instance object relationship table (trace _ module _ relationship) for storing reference relationships of instance objects; a reference object relationship table (trace _ object _ relationship) for storing the entity reference relationship of the specific instance object.
Compared with the JAVA underlying code, an example object corresponds to a module, and there are 16 modules in the present application, and referring to fig. 2, names of the modules and reference relationships among the modules are shown. The detailed information (which may also be referred to as annotations) of each module is recorded in the reference instance object table, as shown in table 1:
Figure GDA0003217153960000061
TABLE 1
The reference relationships among the modules are all recorded in the reference instance object relationship table, as shown in table 2:
Figure GDA0003217153960000062
Figure GDA0003217153960000071
TABLE 2
The contents in tables 1 and 2 are filled in advance. The three items of data recorded in table 2 may also be referred to as "feature parameters," and the feature parameters include the constraint type of the instance object, the enumerated value of the instance object, and the enumerated value of the instance object referenced by the instance object. Specifically, "ID" and "module _ ID" are both IDs of the same module, and "ID" is a constraint type of the module, and may be a "primary key" (invisible to the user), while "module _ ID" is an ID (visible to the user) displayed in the visual interface, that is, an enumerated value, for example, "ID" of a module is "65535", and an enumerated value (module _ ID) of the module is "column", and "relative _ module _ ID" is a module referred to by the module, for example, "topic", which means that "topic" is a module referred to by "column".
The advantage of table 1 and table 2 is that it is easy to expand, when adding a new module, it is only necessary to add a Java annotation, that is, add an enumeration value in trace _ module, and no other logic code is needed, thereby reducing the code amount.
The contents in the reference object relationship table are what the application needs to fill out, as shown in table 3:
Figure GDA0003217153960000072
TABLE 3
It should be noted that the names of the 3 tables in the present application are not limited to the names described above, and may be modified according to actual needs, and the present application does not limit the names.
The method specifically comprises the following steps:
step 101, receiving a request for establishing a new first instance object; the first instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation;
specifically, a user initiates a request for establishing a new first instance object through a terminal, where the request includes an enumerated value of the first instance object, and thus, the enumerated value may be used to refer to an instance object table to search for a corresponding annotation.
The terminal has a visual interface, and can have the following characteristics:
(1) on a hardware architecture, a device has a central processing unit, a memory, an input unit and an output unit, that is, the device is often a microcomputer device having a communication function. In addition, various input modes such as a keyboard, a mouse, a touch screen, a microphone, a camera and the like can be provided, and input can be adjusted as required. Meanwhile, the equipment often has a plurality of output modes, such as a telephone receiver, a display screen and the like, and can be adjusted according to needs;
(2) on a software system, the device must have an operating system, such as Windows Mobile, Symbian, Palm, Android, iOS, and the like. Meanwhile, the operating systems are more and more open, and personalized application programs developed based on the open operating system platforms are infinite, such as a communication book, a schedule, a notebook, a calculator, various games and the like, so that the requirements of personalized users are met to a great extent;
(3) in terms of communication capacity, the device has flexible access mode and high-bandwidth communication performance, and can automatically adjust the selected communication mode according to the selected service and the environment, thereby being convenient for users to use. The device can support GSM (Global System for Mobile Communication), WCDMA (Wideband Code Division Multiple Access), CDMA2000(Code Division Multiple Access), TDSCDMA (Time Division-Synchronous Code Division Multiple Access), Wi-Fi (WIreless-Fidelity), WiMAX (world Interoperability for Microwave Access), etc., thereby adapting to various systems of networks, not only supporting voice service, but also supporting various WIreless data services;
(4) in the aspect of function use, the equipment focuses more on humanization, individuation and multi-functionalization. With the development of computer technology, devices enter a human-centered mode from a device-centered mode, and the embedded computing, control technology, artificial intelligence technology, biometric authentication technology and the like are integrated, so that the human-oriented purpose is fully embodied. Due to the development of software technology, the equipment can be adjusted and set according to individual requirements, and is more personalized. Meanwhile, the device integrates a plurality of software and hardware, and the function is more and more powerful.
In addition, as described above, in the embodiment of the present invention, there are 16 modules in total, and all 16 modules have been generated and stored in the instance object collection, so that a new instance object may be generated as one module as any one of the 16 modules, or may be selected from the 16 modules and placed at a position where a user wants to place.
It should be noted that the number of modules may also be set according to actual requirements, and is not only 16, and the number of modules (example objects) is not limited in this application.
102, extracting an annotation corresponding to the first instance object;
in a preferred embodiment of the present invention, the step of extracting the annotation corresponding to the first instance object includes:
finding out a target enumeration value matched with the enumeration value of the first instance object from the preset reference instance object table;
determining a target annotation comprising the target enumeration value;
and extracting the target annotation, and taking the target annotation as an annotation corresponding to the first instance object.
Because a module is newly created just like any one of the instance object collection, it is sufficient to know which instance object the user wants to newly create at the time of new creation. For example, if a user wants to create a "column", an enumerated value, i.e., "column", is extracted from the new creation request, then a "column" module is found from the instance object collection, and a comment, i.e., detailed information, of the module is extracted from the reference instance object table of the module.
Step 103, establishing the first instance object according to the annotation;
after the annotation (details) of the first instance object is extracted, the first instance object may be created according to the annotation (details). That is, when the execution of step 103 is complete, the first instance object has been created.
Step 104, performing section processing on the annotation to acquire characteristic parameters for creating the first instance object;
after the first instance object is established, the feature parameters adopted in the process of establishing the first instance object can be obtained, wherein the feature parameters comprise the constraint type of the first instance object, the enumerated value of the first instance object, and the enumerated value of the instance object referenced by the first instance object. And the feature parameter is obtained, the feature parameter associated with the enumerated value of the first instance object can be searched from a preset reference instance object relation table (namely table 2).
And 105, storing the characteristic parameters into a preset reference object relation table.
After the steps 101 to 104, it is known which instance object is newly created, which instance object is referred to by the newly created instance object, and the reference relationship between the two. Of course, an instance object may include a plurality of referenced instance objects, for example, a "column" may refer to only one "topic", or may refer to a plurality of "topics", and if a plurality of instance objects are referenced, the relationship between an instance object and a plurality of referenced instance objects is recorded in a preset reference object relationship table, that is, table 3. Thus, under the condition of not increasing the code amount, the new creation of the instance object is completed, and simultaneously, the instance object referred by the newly created instance object and the reference relationship of the instance object and the instance object are also saved.
It should be noted that, in practical applications, when some instance objects are newly created, the instance objects have reference instance objects, and then, in addition to the new creation of the instance objects, the instance objects referenced by the instance objects are newly created, for example, when a user creates a "column", a "column" and a "topic" referenced by the "column" are created at the same time, and when a "topic" is created, a "topic" is created. That is, when the first instance object is created, the characteristic parameters include the referenced instance object, and then the first instance object and the instance object referenced by the first instance object are created at the same time when the first instance object is created.
In a preferred embodiment of the present invention, the method further comprises:
receiving an add request for adding a second instance object; the add request includes an enumerated value of the second instance object, the second instance object being an instance object referenced by the first instance object;
finding out an enumeration value of the instance object referenced by the first instance object from a preset reference object relation table;
deleting enumerated values of the instance objects referenced by the first instance object;
and adding the enumeration value of the instance object referenced by the first instance object and the enumeration value of the second instance object into the preset reference object relation table.
In particular, the second instance object may be an instance object referenced by the first instance object. When the second instance object is newly created, the data of the instance object referenced by the first instance object in table 3 needs to be deleted first, and then the data of the second instance object needs to be inserted. For example, if the first instance object "column" and the "topic a" referred by the "column" already exist, and the "topic B" is to be newly created, the data of the "topic a" in table 3 needs to be deleted first, and then the data of the "topic a" and the "topic B" are added to table 3 together; if the theme A is modified into the theme B, the data of the theme A in the table 3 is deleted, and the data of the theme B is added.
In the embodiment of the invention, a first instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation; when an establishing request for establishing a new first instance object is received, firstly extracting an annotation corresponding to the first instance object, then establishing the first instance object according to the annotation, then performing tangent plane processing on the annotation to obtain a characteristic parameter for establishing the first instance object, and finally storing the characteristic parameter into a preset reference object relation table. Therefore, under the condition that the code amount is not increased, the new establishment of the instance object is completed, meanwhile, the instance object referred by the newly established instance object and the reference relationship of the instance object and the instance object are also saved, the invasion to the service code is reduced, the reference relationship between the newly increased instance object and other instance objects can be established by adding the JAVA annotation, other logic codes are not needed, and the expandability is improved; the reference relation of each instance object in the product is clarified, the core code is directly copied, and the core code can be transplanted to other products by adding JAVA annotation, so that the portability is improved.
Referring to fig. 3, a flowchart illustrating steps of another embodiment of a JAVA-based instance object processing method according to the present invention is shown, which may specifically include the following steps:
step 201, receiving a deletion request for deleting the third instance object;
step 202, querying whether an enumeration value of an instance object referenced by the third instance object is contained in a preset reference object relation table;
step 203, if not, deleting the characteristic parameter associated with the third instance object from the preset reference object relation table, and deleting the third instance object at the same time; and if so, ignoring the deletion request.
Specifically, when a user wants to delete an instance object, the user needs to first query whether the instance object is referenced from the preset reference object relationship table (i.e., table 3), if so, the deletion operation is interrupted and the deletion request is ignored, and if not, the related data of the instance object can be deleted from the preset reference object relationship table, and the instance object is deleted. For example, if the user wants to delete "topic B", first obtain the instance object and id to be deleted from the delete request, then query whether "topic B" is referenced by other instance objects from trace _ object _ relation, if yes, directly return failure, interrupt operation, delete "topic B" will not be executed; if not, the execution is continued, and after the execution is successful, the related data in the trace _ object _ relationship table, such as the reference relationship of the contents in the topic B and the topic B, is deleted.
In the embodiment of the present invention, when a deletion request for deleting a third instance object is received, querying from a preset reference object relationship table whether an enumerated value of an instance object referenced by the third instance object is included, if not, deleting a feature parameter associated with the third instance object from the preset reference object relationship table, and deleting the third instance object at the same time; and if so, ignoring the deletion request. Therefore, the deletion operation of the instance object can be completed based on the reference relation of each instance object, the operation of a user is simplified, and the working efficiency is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram illustrating a structure of an embodiment of a JAVA-based instance object processing apparatus according to the present invention may specifically include:
a first receiving module 401, configured to receive a request for creating a new first instance object; the first instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation;
an extracting module 402, configured to extract an annotation corresponding to the first instance object;
an establishing module 403, configured to establish the first instance object according to the annotation;
an obtaining module 404, configured to perform tangent plane processing on the annotation, and obtain a feature parameter for creating the first instance object;
a storage module 405, configured to store the feature parameter in a preset reference object relationship table.
In a preferred embodiment of the present invention, the annotation is stored in a preset reference instance object table, and the annotation includes an enumerated value of an instance object; the build request includes an enumerated value of the first instance object;
the extraction module comprises:
an enumeration value lookup submodule, configured to find a target enumeration value matching the enumeration value of the first instance object from the preset reference instance object table;
an annotation determination sub-module for determining a target annotation comprising the target enumeration value;
and the annotation extraction sub-module is used for extracting the target annotation and taking the target annotation as the annotation corresponding to the first instance object.
In a preferred embodiment of the present invention, the characteristic parameters are stored in a preset reference instance object relationship table, and the characteristic parameters include a constraint type of the first instance object, an enumerated value of the first instance object, and an enumerated value of an instance object referenced by the first instance object.
In a preferred embodiment of the present invention, the obtaining module includes:
and the characteristic parameter searching submodule is used for searching the characteristic parameter related to the enumeration value of the first instance object from a preset reference instance object relation table.
In a preferred embodiment of the present invention, the method further comprises:
the first receiving module is also used for receiving an adding request for adding the second instance object; the add request includes an enumerated value of the second instance object, the second instance object being an instance object referenced by the first instance object;
a first enumeration value searching module, configured to search, from a preset reference object relationship table, an enumeration value of an instance object referenced by the first instance object;
a first deletion module to delete enumerated values of the instance objects referenced by the first instance object;
an adding module, configured to add the enumeration value of the instance object referenced by the first instance object and the enumeration value of the second instance object to the preset reference object relationship table.
Referring to fig. 5, a block diagram illustrating a structure of another embodiment of a JAVA-based instance object processing apparatus according to the present invention may specifically include:
a second receiving module 501, configured to receive a deletion request for deleting the third instance object;
a second enumerated value lookup module 502, configured to query, from a preset reference object relationship table, whether an enumerated value of an instance object referenced by the third instance object is included;
a second deleting module 503, configured to delete the feature parameter associated with the third instance object from the preset reference object relationship table, and delete the third instance object at the same time.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The JAVA-based instance object processing method and the JAVA-based instance object processing apparatus provided by the present invention are described in detail above, and specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the description of the above embodiments is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. A JAVA-based instance object processing method is characterized by comprising the following steps:
receiving a building request for building a first instance object; the first instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation;
extracting an annotation corresponding to the first instance object;
building the first instance object from the annotation;
performing tangent plane processing on the annotation to acquire characteristic parameters for creating the first instance object;
and storing the characteristic parameters into a preset reference object relation table.
2. The method of claim 1, wherein the annotation is stored in a pre-set table of reference instance objects, the annotation comprising an enumerated value of an instance object; the build request includes an enumerated value of the first instance object;
the step of extracting the annotation corresponding to the first instance object comprises:
finding out a target enumeration value matched with the enumeration value of the first instance object from the preset reference instance object table;
determining a target annotation comprising the target enumeration value;
and extracting the target annotation, and taking the target annotation as an annotation corresponding to the first instance object.
3. The method according to claim 1, wherein the characteristic parameters are stored in a preset reference instance object relationship table, and the characteristic parameters comprise a constraint type of the first instance object, an enumerated value of the first instance object, and an enumerated value of an instance object referenced by the first instance object.
4. The method according to claim 1 or 3, wherein the step of obtaining the characteristic parameters for creating the first instance object comprises:
and searching a characteristic parameter associated with the enumeration value of the first instance object from a preset reference instance object relation table.
5. The method of claim 1 or 3, further comprising:
receiving an add request for adding a second instance object; the add request includes an enumerated value of the second instance object, the second instance object being an instance object referenced by the first instance object;
finding out an enumeration value of the instance object referenced by the first instance object from a preset reference object relation table;
deleting enumerated values of the instance objects referenced by the first instance object;
and adding the enumeration value of the instance object referenced by the first instance object and the enumeration value of the second instance object into the preset reference object relation table.
6. A JAVA-based instance object processing method is characterized by comprising the following steps:
receiving a deletion request for deleting the third instance object; the delete request includes the third instance object and an ID;
querying whether an enumerated value of the instance object referenced by the third instance object is contained in a preset reference object relation table;
if not, deleting the characteristic parameters associated with the third instance object from the preset reference object relation table, and deleting the third instance object at the same time; if yes, ignoring the deletion request;
the feature parameters are obtained by performing tangent plane processing on the annotation corresponding to the third instance object; the third instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation.
7. A JAVA based instance object processing apparatus, comprising:
the first receiving module is used for receiving an establishment request for establishing a first instance object; the first instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation;
the extraction module is used for extracting the annotation corresponding to the first instance object;
the establishing module is used for establishing the first instance object according to the annotation;
the obtaining module is used for performing section processing on the annotation and obtaining the characteristic parameters for creating the first instance object;
and the storage module is used for storing the characteristic parameters into a preset reference object relation table.
8. The apparatus of claim 7, wherein the annotation is stored in a preset reference instance object table, the annotation comprising an enumerated value of an instance object; the build request includes an enumerated value of the first instance object;
the extraction module comprises:
an enumeration value lookup submodule, configured to find a target enumeration value matching the enumeration value of the first instance object from the preset reference instance object table;
an annotation determination sub-module for determining a target annotation comprising the target enumeration value;
and the annotation extraction sub-module is used for extracting the target annotation and taking the target annotation as the annotation corresponding to the first instance object.
9. The apparatus according to claim 7, wherein the feature parameters are stored in a preset reference instance object relationship table, and the feature parameters include a constraint type of the first instance object, an enumerated value of the first instance object, and an enumerated value of an instance object referenced by the first instance object.
10. The apparatus of claim 7 or 9, wherein the obtaining module comprises:
and the characteristic parameter searching submodule is used for searching the characteristic parameter related to the enumeration value of the first instance object from a preset reference instance object relation table.
11. The apparatus of claim 7 or 9, further comprising:
the first receiving module is also used for receiving an adding request for adding the second instance object; the add request includes an enumerated value of the second instance object, the second instance object being an instance object referenced by the first instance object;
a first enumeration value searching module, configured to search, from a preset reference object relationship table, an enumeration value of an instance object referenced by the first instance object;
a first deletion module to delete enumerated values of the instance objects referenced by the first instance object;
an adding module, configured to add the enumeration value of the instance object referenced by the first instance object and the enumeration value of the second instance object to the preset reference object relationship table.
12. A JAVA based instance object processing apparatus, comprising:
a second receiving module, configured to receive a deletion request for deleting the third instance object; the delete request includes the third instance object and an ID;
a second enumerated value searching module, configured to query, from a preset reference object relationship table, whether an enumerated value of an instance object referenced by the third instance object is included;
a second deleting module, configured to delete the feature parameter associated with the third instance object from the preset reference object relationship table, and delete the third instance object at the same time;
the feature parameters are obtained by performing tangent plane processing on the annotation corresponding to the third instance object; the third instance object is any instance object in a preset instance object set, and each instance object in the preset instance object set has a corresponding annotation.
CN201810790716.4A 2018-07-18 2018-07-18 Instance object processing method and device based on JAVA Active CN109271150B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810790716.4A CN109271150B (en) 2018-07-18 2018-07-18 Instance object processing method and device based on JAVA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810790716.4A CN109271150B (en) 2018-07-18 2018-07-18 Instance object processing method and device based on JAVA

Publications (2)

Publication Number Publication Date
CN109271150A CN109271150A (en) 2019-01-25
CN109271150B true CN109271150B (en) 2022-02-08

Family

ID=65153028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810790716.4A Active CN109271150B (en) 2018-07-18 2018-07-18 Instance object processing method and device based on JAVA

Country Status (1)

Country Link
CN (1) CN109271150B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111240727B (en) * 2020-01-06 2023-05-05 网易(杭州)网络有限公司 Information updating method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101393528A (en) * 2008-10-30 2009-03-25 上海交通大学 Method and system for determining instance object conversion order in dynamic update of software

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771557A (en) * 2008-12-15 2010-07-07 华为终端有限公司 Method for managing object instance and alias and equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101393528A (en) * 2008-10-30 2009-03-25 上海交通大学 Method and system for determining instance object conversion order in dynamic update of software

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Java垃圾回收机制以及内存泄漏";yanwushu;《CSDN博客 公开网址:https://blog.csdn.net/yanwushu/article/details/39455129》;20140921;第1-6页 *

Also Published As

Publication number Publication date
CN109271150A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
CN101916166B (en) Method for starting application program and mobile terminal
US9396572B2 (en) Image correlation method and electronic device thereof
CN102024064B (en) Rapid searching method and mobile communication terminal
US9734233B2 (en) Menu configuration method and system of smart device
WO2016082598A1 (en) Method, apparatus, and device for rapidly searching for application program
CN111490927B (en) Method, device and equipment for displaying message
US20090003797A1 (en) Method, Apparatus and Computer Program Product for Providing Content Tagging
CN109144285B (en) Input method and device
CN106095248A (en) A kind of application program based on mobile terminal is searched and is started method and system
CN104881451A (en) Image searching method and image searching device
CN105573587B (en) A kind of method and device of management of icons
JP2012242854A (en) Information processing apparatus, control method therefor, and computer program
CN107015979B (en) Data processing method and device and intelligent terminal
CN104216971A (en) Method and device for indexing applications
KR101919257B1 (en) Application program switch method, apparatus and electronic terminal
WO2016188261A1 (en) Method and apparatus for switching multiple folders, and computer storage medium
CN105354318A (en) File searching method and device
KR20120085023A (en) Terminal having searching function using multiple data saved in clipboard and searching service providing method using the same
CN109271150B (en) Instance object processing method and device based on JAVA
CN105163141B (en) The mode and device of video recommendations
CN113849092A (en) Content sharing method and device and electronic equipment
CN112286421A (en) Playlist processing method and device and electronic equipment
CN112182446A (en) Page display method and device, terminal equipment and computer readable storage medium
CN113128181B (en) Information processing method and device
CN111142741B (en) File sorting method, terminal and computer readable 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
GR01 Patent grant
GR01 Patent grant