CN111240727B - Information updating method and device - Google Patents

Information updating method and device Download PDF

Info

Publication number
CN111240727B
CN111240727B CN202010011393.1A CN202010011393A CN111240727B CN 111240727 B CN111240727 B CN 111240727B CN 202010011393 A CN202010011393 A CN 202010011393A CN 111240727 B CN111240727 B CN 111240727B
Authority
CN
China
Prior art keywords
attribute
attribute information
data table
new
newly added
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
CN202010011393.1A
Other languages
Chinese (zh)
Other versions
CN111240727A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010011393.1A priority Critical patent/CN111240727B/en
Publication of CN111240727A publication Critical patent/CN111240727A/en
Application granted granted Critical
Publication of CN111240727B publication Critical patent/CN111240727B/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/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides an information updating method and device, wherein the method comprises the following steps: generating a new attribute data table; the new attribute data table comprises new parameters; when first attribute information of a preset instance object is read, determining an object type of the instance object; according to the first attribute information, invoking a specified function in the object type to inquire the newly added attribute data table; generating a query result; the query result includes a new parameter corresponding to the first attribute information. The embodiment of the invention can acquire the newly added parameters of the single instance object, thereby avoiding the condition that the attribute values in the instance object need to be updated simultaneously when the instance object is updated thermally, and the system operation overload is possibly caused.

Description

Information updating method and device
Technical Field
The present invention relates to the field of information technologies, and in particular, to an information updating method and an information updating device.
Background
During the running of large network game servers, it is inevitable that a hot update of the server will need to be made. Thermal updating is a common means for service content updating or on-line problem repairing without shutdown maintenance. The method can update and maintain on the premise of not affecting user experience.
Python is also a popular scripting language, and there are many ways to update the Python's language thermally. The essence is to replace codes running in the memory to achieve the purpose of updating business logic. During a hot update, a class of problems is typically encountered: it is necessary to traverse the instance objects already existing in the update memory and modify the structure of the instance objects. Because the instance object that already exists in memory is created before the code is hot updated, it is the old instance object. These old instance objects do not have newly added properties. When new code logic is run, there may be a similar error in the member attributes that are not found.
Disclosure of Invention
In view of the above problems, embodiments of the present invention have been made to provide an information processing method and a corresponding information processing apparatus that overcome or at least partially solve the above problems.
In order to solve the above problems, an embodiment of the present invention discloses an information updating method, including:
generating a new attribute data table; the new attribute data table comprises new parameters;
when first attribute information of a preset instance object is read, determining an object type of the instance object;
according to the first attribute information, invoking a specified function in the object type to inquire the newly added attribute data table;
generating a query result; the query result includes a new parameter corresponding to the first attribute information.
Preferably, the method further comprises:
judging whether the first attribute information exists in the instance object or not;
if not, executing the object type of the determined instance object;
preferably, the method further comprises:
and adding the first attribute information and the newly added parameters corresponding to the first attribute information to the instance object.
Preferably, a class attribute storage function is arranged in the object type; the method further comprises the steps of:
judging whether a new added parameter corresponding to the first attribute information exists in the class attribute storage function;
and if not, executing the first attribute information, and calling a designated function in the object type to inquire the newly added attribute data table.
Preferably, a descriptor function is set in the object type; the newly added attribute data table further comprises second attribute information, and the second attribute information corresponds to the newly added parameter; the step of calling a specified function in the object type to query the newly added attribute data table according to the first attribute information comprises the following steps:
invoking the descriptor function, and determining a target second attribute matched with the first attribute information;
and obtaining a new parameter corresponding to the second attribute of the target.
Preferably, the new attribute data table further includes second attribute information, where the second attribute information corresponds to the new parameter; the step of calling a specified function in the object type to query the newly added attribute data table according to the first attribute information comprises the following steps:
calling a getattr function in the object type, and determining a target second attribute matched with the first attribute information;
and obtaining a new parameter corresponding to the second attribute of the target.
Preferably, the step of adding the first attribute information and the newly added parameter corresponding to the first attribute information to the instance object includes:
and calling a setattr function in the object type, and adding the first attribute information and the newly added parameters corresponding to the first attribute information to the instance object.
Preferably, the new attribute data table further includes second attribute information, where the second attribute information corresponds to the new parameter; the step of calling a specified function in the object type to query the newly added attribute data table according to the first attribute information comprises the following steps:
calling a getattribute function in the object type, and determining a target second attribute matched with the first attribute information;
and obtaining a new parameter corresponding to the second attribute of the target.
Preferably, the new attribute data table includes a further update class identifier, and the new parameter corresponds to the update class identifier; the object type is provided with an initial class identifier;
the specified function is used for inquiring the newly added parameters corresponding to the target update class identifier; the target update identifier is an update class identifier consistent with the initial class identifier.
The embodiment of the invention discloses an information updating device, which comprises:
the data table module is used for generating a newly added attribute data table; the new attribute data table comprises new parameters;
the type module is used for determining the object type of the instance object when the first attribute information of the preset instance object is read;
the query module is used for calling a specified function in the object type according to the first attribute information so as to query the newly added attribute data table;
the generation module is used for generating a query result; the query result includes a new parameter corresponding to the first attribute information.
Preferably, the apparatus further comprises:
the first judging module is used for judging whether the first attribute information exists in the instance object or not;
a type determining module, configured to execute the determining, if the instance object does not have the first attribute information, an object type of the instance object;
preferably, the apparatus further comprises:
and the attribute adding module is used for adding the first attribute information and the newly added parameters corresponding to the first attribute information to the instance object.
Preferably, a class attribute storage function is arranged in the object type; the apparatus further comprises:
the second judging module is used for judging whether the newly added parameters corresponding to the first attribute information exist in the class attribute storage function;
and the calling module is used for calling the query module if the newly added parameters corresponding to the first attribute information do not exist in the class attribute storage function.
Preferably, a descriptor function is set in the object type; the newly added attribute data table further comprises second attribute information, and the second attribute information corresponds to the newly added parameter; the query module comprises:
the descriptor sub-module is used for calling the descriptor function and determining a target second attribute matched with the first attribute information;
the first acquisition sub-module is used for acquiring the newly added parameters corresponding to the second attribute of the target.
Preferably, the new attribute data table further includes second attribute information, where the second attribute information corresponds to the new parameter; the query module comprises:
the first function submodule is used for calling a getattr function in the object type and determining a target second attribute matched with the first attribute information;
and the second acquisition sub-module is used for acquiring the newly added parameters corresponding to the second attribute of the target.
Preferably, the attribute adding module includes:
and the third function sub-module is used for calling a setattr function in the object type and adding the first attribute information and the newly added parameters corresponding to the first attribute information to the instance object.
Preferably, the new attribute data table further includes second attribute information, where the second attribute information corresponds to the new parameter; the query module comprises:
a fourth function sub-module, configured to call a getattribute function in the object type, and determine a target second attribute that matches the first attribute information;
and the third acquisition sub-module is used for acquiring the newly added parameters corresponding to the second attribute of the target.
Preferably, the new attribute data table includes a further update class identifier, and the new parameter corresponds to the update class identifier; the object type is provided with an initial class identifier;
the specified function is used for inquiring the newly added parameters corresponding to the target update class identifier; the target update identifier is an update class identifier consistent with the initial class identifier.
The embodiment of the invention discloses an electronic device, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the computer program realizes the steps of the information updating method when being executed by the processor.
The embodiment of the invention discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program realizes the steps of the information updating method when being executed by a processor.
The embodiment of the invention has the following advantages:
according to the embodiment of the invention, when the first attribute information of the instance object is read, the newly-added data table is queried through the appointed function in the object type corresponding to the instance object, so that the newly-added parameters corresponding to the first attribute information in the newly-added attribute data table are acquired, the newly-added parameters of a single instance object can be acquired, and the condition that the attribute values in the instance object need to be updated simultaneously when the instance object is updated thermally, and the system operation overload is possibly caused is avoided.
Drawings
FIG. 1 is a flowchart showing steps of a first embodiment of an information updating method according to the present invention;
FIG. 2 is a flowchart showing steps of a second embodiment of an information updating method according to the present invention;
FIG. 3 is a flowchart illustrating an exemplary method for updating information according to an embodiment of the present invention;
FIG. 4 is a flowchart showing the steps of a third embodiment of an information updating method of the present invention;
FIG. 5 is a flowchart illustrating another example of an information updating method according to an embodiment of the present invention;
FIG. 6 is a flowchart showing the steps of a fourth embodiment of an information updating method of the present invention;
FIG. 7 is a flowchart illustrating another example of an information updating method according to an embodiment of the present invention;
fig. 8 is a block diagram showing an embodiment of an information updating apparatus of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Referring to fig. 1, a flowchart illustrating steps of a first embodiment of a message update method according to the present invention may specifically include the following steps:
step 101, generating a new attribute data table; the new attribute data table comprises new parameters;
the embodiment of the invention can be applied to a scene of hot update of an instance object. The embodiment of the invention can generate a new attribute data table which contains the attribute value (i.e. the new parameter) of the new attribute of the instance object. The newly added attribute data table is set into the memory as a global variable at the time of hot update. Wherein an instance object is a concrete of object types that represents an object that is actually in memory.
102, determining an object type of a preset instance object when first attribute information of the instance object is read;
wherein an object type is an abstraction of an instance object that describes the concrete logical structure of the instance object. When the first attribute information of the instance object is read, determining the object type of the instance object.
Step 103, according to the first attribute information, calling a specified function in the object type to inquire the newly added attribute data table;
and calling a specified function in the object type to query the newly added attribute data table to acquire the newly added parameters matched with the first attribute information.
104, generating a query result; the query result includes a new parameter corresponding to the first attribute information.
The appointed function queries the newly-added parameters corresponding to the first attribute information in the newly-added attribute data table and returns the newly-added parameters, so that the newly-added parameters in the newly-added attribute data table are obtained by calling the appointed function.
In an optional embodiment of the invention, the new attribute data table includes a class identifier (i.e. class name) that is also updated, and the new parameter corresponds to the updated class identifier; the object type is provided with an initial class identifier;
the specified function is used for inquiring the newly added parameters corresponding to the target update class identifier; the target update identifier is an update class identifier consistent with the initial class identifier.
It should be noted that, step 101 may be generated in advance, and steps 102 to 105 may be executed when the instance object is updated thermally, which is not limited in the embodiment of the present invention.
According to the embodiment of the invention, when the first attribute information of the instance object is read, the newly-added data table is queried through the appointed function in the object type corresponding to the instance object, so that the newly-added parameters corresponding to the first attribute information in the newly-added attribute data table are acquired, the newly-added parameters of a single instance object can be acquired, and the condition that the attribute values in the instance object need to be updated simultaneously when the instance object is updated thermally, and the system operation overload is possibly caused is avoided.
Referring to fig. 2, a flowchart illustrating steps of a second embodiment of a message update method according to the present invention may specifically include the following steps:
step 201, generating a new attribute data table; the new attribute data table comprises new parameters;
step 202, when first attribute information of a preset instance object is read, judging whether the instance object has the first attribute information or not;
when the first attribute information is read for the first time, whether the instance object is provided with the attribute information is judged, for example: the method can read the subject function of the instance object and judge whether the subject function of the instance object has the first attribute information.
Step 203, if not, determining the object type of the instance object; the object type is provided with a class attribute storage function;
the class attribute storage function may be a subject function corresponding to the object type, in which one or more attribute information and parameter values corresponding to the attribute information are recorded.
Step 204, judging whether a new parameter corresponding to the first attribute information exists in the class attribute storage function;
step 205, if not, calling a specified function in the object type according to the first attribute information to query the newly added attribute data table;
if the first attribute information is not set in the class attribute storage function, a designated function in the object type is called to query the newly added attribute data table so as to acquire the newly added parameters corresponding to the first attribute information in the newly added attribute data table.
Step 206, adding the first attribute information and the new added parameters corresponding to the first attribute information to the instance object.
And adding the first attribute information and the corresponding newly added parameters to the instance object, thereby generating a new instance object. When the first attribute information of the new instance object is accessed, the new parameter value corresponding to the first attribute information can be directly read, and the waste of system resources caused by repeated inquiry of the new attribute data table is avoided.
Step 207, generating a query result; the query result includes a new parameter corresponding to the first attribute information.
In an alternative embodiment of the present invention, a descriptor function is set in the object type; the newly added attribute data table further comprises second attribute information, and the second attribute information corresponds to the newly added parameter; the step of calling a specified function in the object type to query the newly added attribute data table according to the first attribute information comprises the following steps: invoking the descriptor function, and determining a target second attribute matched with the first attribute information; and obtaining a new parameter corresponding to the second attribute of the target.
In a specific implementation, the descriptor function may refer to a get function. And acquiring the newly added parameters corresponding to the first attribute information through a get function in the object type.
Embodiments of the present invention are further described below by way of an example:
referring to fig. 3, an exemplary flowchart of an information updating method according to an embodiment of the present invention is shown.
When the object type is updated thermally, an attribute descriptor corresponding to the newly added attribute is set in a subject (class attribute storage function) of the object type. This attribute descriptor belongs to the object type plane. I.e. the object type is only checked if the property is not present in the instance object (if the instance object has said first property information). The special searching logic of the attribute is realized in the attribute descriptor, searches from a default value table (newly added attribute data table) of the attribute updated by heat, and returns a default value (newly added parameter) of the attribute (first attribute information). And simultaneously, setting the attribute and the default value to the instance object to ensure that the later access is not entering the logic.
Referring to fig. 4, a flowchart illustrating steps of a third embodiment of a message update method according to the present invention may specifically include the following steps:
step 301, generating a new attribute data table; the new attribute data table comprises new parameters and second attribute information corresponding to the new parameters;
step 302, when first attribute information of a preset instance object is read, judging whether the instance object has the first attribute information or not;
step 303, if not, determining the object type of the instance object;
step 304, calling a getattr function in the object type, and determining a target second attribute matched with the first attribute information;
and determining second attribute information matched with the first attribute information in the newly added attribute data table through a getattr function, and determining the attribute information as target second attribute information.
Step 305, obtaining a new parameter corresponding to the second attribute of the target;
and acquiring the new parameters corresponding to the first attribute information by acquiring the new parameters corresponding to the target second attribute information in the new attribute data table.
Because the gtattr function is called only when the first attribute information of the instance object cannot be read, and the corresponding newly added parameters are acquired, the condition that the novel attribute data table is required to be queried when the first attribute information is read each time is avoided, the access efficiency of the instance object is improved, and further, the hot update efficiency of the instance object is improved.
Step 306, adding the first attribute information and the new added parameters corresponding to the first attribute information to the instance object;
step 307, generating a query result; the query result includes a new parameter corresponding to the first attribute information.
In an optional embodiment of the invention, the step of adding the first attribute information and the new parameter corresponding to the first attribute information to the instance object includes:
and calling a setattr function in the object type, and adding the first attribute information and the newly added parameters corresponding to the first attribute information to the instance object.
The first attribute information and the corresponding newly added parameters are added to the instance object through the setattr function, so that the setattr function is executed only when the access of the first attribute information is not hit (the newly added parameters corresponding to the first attribute information cannot be acquired), and after the setattr function is executed, the getattr function does not need to be executed again when the first attribute information is read, and therefore the access efficiency of the instance object is improved.
Embodiments of the present invention are further described below by way of an example:
referring to fig. 5, an exemplary flowchart of an information updating method according to an embodiment of the present invention is shown.
The object type overrides the getattr function. The look-up logic for the attributes (querying the newly added attribute data table) is implemented in the reloaded function. The attribute and the finger corresponding to the attribute are added to the instance object through the setattr function, and the mode is only executed when the first time of attribute access is not hit (the first attribute information does not exist in the instance object), and then the access of the attribute is not executed by the getattr function for searching.
Referring to fig. 6, a flowchart illustrating steps of a fourth embodiment of a message update method according to the present invention may specifically include the following steps:
step 401, generating a new attribute data table; the new attribute data table comprises new parameters and second attribute information, and the second attribute information corresponds to the new parameters;
step 402, determining an object type of a preset instance object when first attribute information of the instance object is read;
step 403, calling a getattribute function in the object type, and determining a target second attribute matched with the first attribute information;
step 404, obtaining a new parameter corresponding to the second attribute of the target;
in a specific implementation, the new attribute data table is maintained in the getattribute function, and the query logic is realized by making the object type reload the getattribute function, and the new added parameters corresponding to the first attribute information are obtained.
Step 405, generating a query result; the query result includes a new parameter corresponding to the first attribute information.
Embodiments of the present invention are further described below by way of an example:
referring to fig. 7, an exemplary flowchart of an information updating method according to an embodiment of the present invention is shown.
The object type reloads the getattribute function, maintains mapping tables of all attributes and values in the reloaded function, and realizes query logic to obtain attribute information and newly added parameters in an attribute default value table (newly added attribute data table).
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 8, a block diagram of an embodiment of an information updating apparatus according to the present invention is shown, and may specifically include the following modules:
a data table module 501, configured to generate a new attribute data table; the new attribute data table comprises new parameters;
a type module 502, configured to determine an object type of a preset instance object when first attribute information of the instance object is read;
a query module 503, configured to call a specified function in the object type according to the first attribute information to query the newly added attribute data table;
a generating module 504, configured to generate a query result; the query result includes a new parameter corresponding to the first attribute information.
In an alternative embodiment of the invention, the apparatus further comprises:
the first judging module is used for judging whether the first attribute information exists in the instance object or not;
a type determining module, configured to execute the determining, if the instance object does not have the first attribute information, an object type of the instance object;
in an alternative embodiment of the invention, the apparatus further comprises:
and the attribute adding module is used for adding the first attribute information and the newly added parameters corresponding to the first attribute information to the instance object.
In an alternative embodiment of the present invention, a class attribute storage function is provided in the object type; the apparatus further comprises:
the second judging module is used for judging whether the newly added parameters corresponding to the first attribute information exist in the class attribute storage function;
and a calling module, configured to call the query module 503 if no new parameter corresponding to the first attribute information exists in the class attribute storage function.
In an alternative embodiment of the invention, a descriptor function is provided in the object type; the newly added attribute data table further comprises second attribute information, and the second attribute information corresponds to the newly added parameter; the query module 503 includes:
the descriptor sub-module is used for calling the descriptor function and determining a target second attribute matched with the first attribute information;
the first acquisition sub-module is used for acquiring the newly added parameters corresponding to the second attribute of the target.
In an optional embodiment of the present invention, the new attribute data table further includes second attribute information, where the second attribute information corresponds to the new parameter; the query module 503 includes:
the first function submodule is used for calling a getattr function in the object type and determining a target second attribute matched with the first attribute information;
and the second acquisition sub-module is used for acquiring the newly added parameters corresponding to the second attribute of the target.
In an alternative embodiment of the present invention, the attribute adding module includes:
and the third function sub-module is used for calling a setattr function in the object type and adding the first attribute information and the newly added parameters corresponding to the first attribute information to the instance object.
In an optional embodiment of the present invention, the new attribute data table further includes second attribute information, where the second attribute information corresponds to the new parameter; the query module 503 includes:
a fourth function sub-module, configured to call a getattribute function in the object type, and determine a target second attribute that matches the first attribute information;
and the third acquisition sub-module is used for acquiring the newly added parameters corresponding to the second attribute of the target.
In an optional embodiment of the present invention, the new attribute data table includes a further update class identifier, and the new parameter corresponds to the update class identifier; the object type is provided with an initial class identifier;
the specified function is used for inquiring the newly added parameters corresponding to the target update class identifier; the target update identifier is an update class identifier consistent with the initial class identifier.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The embodiment of the invention also discloses an electronic device which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the computer program realizes the steps of the information updating method when being executed by the processor.
The embodiment of the invention also discloses a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the information updating method when being executed by a processor.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that 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 invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, 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 apparatus 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 apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus 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 in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail an information updating method, an information updating apparatus, an electronic device and a storage medium, and specific examples have been applied to illustrate the principles and embodiments of the present invention, and the above description of the examples is only for aiding in understanding the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (12)

1. An information updating method, comprising:
generating a new attribute data table; the new attribute data table comprises new parameters;
when first attribute information of a preset instance object is read, determining an object type of the instance object;
according to the first attribute information, invoking a specified function in the object type to inquire the newly added attribute data table;
generating a query result; the query result includes a new parameter corresponding to the first attribute information.
2. The method of claim 1, the method further comprising:
judging whether the first attribute information exists in the instance object or not;
if not, executing the determination of the object type of the instance object.
3. The method according to claim 2, wherein the method further comprises:
and adding the first attribute information and the newly added parameters corresponding to the first attribute information to the instance object.
4. A method according to claim 3, wherein class attribute storage functions are provided in the object types; the method further comprises the steps of:
judging whether a new added parameter corresponding to the first attribute information exists in the class attribute storage function;
and if not, executing the first attribute information, and calling a designated function in the object type to inquire the newly added attribute data table.
5. The method of claim 4, wherein the object type has a descriptor function disposed therein; the newly added attribute data table further comprises second attribute information, and the second attribute information corresponds to the newly added parameter; the step of calling a specified function in the object type to query the newly added attribute data table according to the first attribute information comprises the following steps:
invoking the descriptor function, and determining a target second attribute matched with the first attribute information;
and obtaining a new parameter corresponding to the second attribute of the target.
6. The method of claim 3, wherein the new attribute data table includes further includes second attribute information corresponding to the new parameters; the step of calling a specified function in the object type to query the newly added attribute data table according to the first attribute information comprises the following steps:
calling a getattr function in the object type, and determining a target second attribute matched with the first attribute information;
and obtaining a new parameter corresponding to the second attribute of the target.
7. A method according to claim 3, wherein the step of adding the first attribute information, and a new parameter corresponding to the first attribute information, to the instance object comprises:
and calling a setattr function in the object type, and adding the first attribute information and the newly added parameters corresponding to the first attribute information to the instance object.
8. The method of claim 1, wherein the new attribute data table includes further includes second attribute information, the second attribute information corresponding to the new parameters; the step of calling a specified function in the object type to query the newly added attribute data table according to the first attribute information comprises the following steps:
calling a getattribute function in the object type, and determining a target second attribute matched with the first attribute information;
and obtaining a new parameter corresponding to the second attribute of the target.
9. The method of any one of claims 1-8, wherein the newly added attribute data table includes a further updated class identifier, the newly added parameter corresponding to the updated class identifier; the object type is provided with an initial class identifier;
the specified function is used for inquiring the newly added parameters corresponding to the target update class identifier; the target update identifier is an update class identifier consistent with the initial class identifier.
10. An information updating apparatus, comprising:
the data table module is used for generating a newly added attribute data table; the new attribute data table comprises new parameters;
the type module is used for determining the object type of the instance object when the first attribute information of the preset instance object is read;
the query module is used for calling a specified function in the object type according to the first attribute information so as to query the newly added attribute data table;
the generation module is used for generating a query result; the query result includes a new parameter corresponding to the first attribute information.
11. An electronic device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, which when executed by the processor carries out the steps of the information updating method according to any of claims 1 to 9.
12. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the information updating method according to any of claims 1 to 9.
CN202010011393.1A 2020-01-06 2020-01-06 Information updating method and device Active CN111240727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010011393.1A CN111240727B (en) 2020-01-06 2020-01-06 Information updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010011393.1A CN111240727B (en) 2020-01-06 2020-01-06 Information updating method and device

Publications (2)

Publication Number Publication Date
CN111240727A CN111240727A (en) 2020-06-05
CN111240727B true CN111240727B (en) 2023-05-05

Family

ID=70874293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010011393.1A Active CN111240727B (en) 2020-01-06 2020-01-06 Information updating method and device

Country Status (1)

Country Link
CN (1) CN111240727B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271150A (en) * 2018-07-18 2019-01-25 聚好看科技股份有限公司 A kind of instance objects treating method and apparatus based on JAVA
CN109582382A (en) * 2018-10-15 2019-04-05 平安科技(深圳)有限公司 Loading method, device, storage medium and the terminal device of configuration information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2524075A (en) * 2014-03-14 2015-09-16 Ibm Advanced result cache refill

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271150A (en) * 2018-07-18 2019-01-25 聚好看科技股份有限公司 A kind of instance objects treating method and apparatus based on JAVA
CN109582382A (en) * 2018-10-15 2019-04-05 平安科技(深圳)有限公司 Loading method, device, storage medium and the terminal device of configuration information

Also Published As

Publication number Publication date
CN111240727A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN108737467B (en) Server log viewing method, device and system
JP2021504832A (en) Model training system and method and storage medium
US9953639B2 (en) Voice recognition system and construction method thereof
US20070050331A1 (en) Priority based LDAP service publication mechanism
CN110413595B (en) Data migration method applied to distributed database and related device
US20160179840A1 (en) Cloud bursting a database
CN111708992B (en) Report data access method and device, electronic equipment and storage medium
US20170339252A1 (en) Generating a response to a client device in an internet of things domain
CN114900546B (en) Data processing method, device and equipment and readable storage medium
CN108154024B (en) Data retrieval method and device and electronic equipment
CN110795431B (en) Environment monitoring data processing method, device, equipment and storage medium
CN107239568B (en) Distributed index implementation method and device
CN112579877B (en) Control method, device, storage medium and equipment of information source system
CN111240727B (en) Information updating method and device
US20080208804A1 (en) Use of Search Templates to Identify Slow Information Server Search Patterns
CN109960695B (en) Management method and device for database in cloud computing system
CN115836511A (en) Equipment management method and device in Internet of things, computer equipment and storage medium
US20220405244A1 (en) Batch deletion method and apparatus for cache contents, device and readable storage medium
CN113411364A (en) Resource acquisition method and device and server
CN111814171B (en) Cloud resource access control method based on attributes and graphs
CN114745376B (en) ZooKeeper cluster operation and maintenance method and device, electronic equipment and storage medium
CN115017166A (en) Vertical data construction method and device, electronic equipment and storage medium
CN116305288B (en) Method, device, equipment and storage medium for isolating database resources
CN110602198B (en) Client network request link configuration method and system
CN111464580B (en) Method and device for selecting main server

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