CN112749173A - Method and device for updating object - Google Patents

Method and device for updating object Download PDF

Info

Publication number
CN112749173A
CN112749173A CN201911039331.5A CN201911039331A CN112749173A CN 112749173 A CN112749173 A CN 112749173A CN 201911039331 A CN201911039331 A CN 201911039331A CN 112749173 A CN112749173 A CN 112749173A
Authority
CN
China
Prior art keywords
attribute type
preset
attribute
database table
target object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911039331.5A
Other languages
Chinese (zh)
Inventor
李泽贤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201911039331.5A priority Critical patent/CN112749173A/en
Publication of CN112749173A publication Critical patent/CN112749173A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for updating an object. Wherein, the method comprises the following steps: detecting whether the attribute type of the target object is increased or not based on a preset database table and object information of the preset object under a preset platform, wherein the preset database table is provided with a plurality of redundant columns, and each row of data of the preset database table forms one target object; under the condition that the attribute type of the target object is detected to be increased, acquiring the increased attribute type; updating a mapping record table based on the added attribute types, wherein the mapping record table stores the mapping relation between each attribute type of the target object and a corresponding column in a preset database table; and mapping the attribute value corresponding to the added attribute type to a preset database table based on the mapping record table. The invention solves the technical problem of complex operation caused by that the updating of the attribute type can be realized only by changing the program code when the attribute type of the object is increased in the prior art.

Description

Method and device for updating object
Technical Field
The invention relates to the field of internet, in particular to a method and a device for updating an object.
Background
At present, the society of scientific and technical information and the era of data analysis are involved, and in the aspect of network marketing, people can know the requirements of customers by analyzing the access behaviors of users through the internet, and then recommend products to the customers according to the requirements of the customers, and the like, so that the purpose of improving the customer experience is achieved. People can acquire access records of users through platforms (such as WeChat, microblog and the like) on some networks and analyze the access records.
Taking the wechat as an example, each user paying attention to a certain wechat public number is a fan, and then the attribute data of the same fan under a plurality of wechat public numbers are associated to obtain the client attribute, wherein the client attribute may include but is not limited to the content shown in table 1.
TABLE 1
Nickname Sex State of the country Province of labor City
Xiaoxian (Chinese character) For male China Guangdong (Chinese character of Guangdong) Shenzhen (Shenzhen medicine)
In the prior art, when extracting the fan attributes, the extracted fan attributes are generally covered on the corresponding data of the client, for example, when generating the client attributes, all the fan data are extracted to the nickname, the gender, the country, the province and the upper surface of the city corresponding to the client. If the second fan is also identified as the same client, the fan attributes identified later will cover the old attribute data of the client when extracting, for example, the first fan and the second fan are the same client, the fan attributes of the first fan include nickname, gender and country, and the fan attributes of the second fan include nickname, gender, province and city, when extracting the fan attributes of the second fan, the attribute data corresponding to the fan attributes of the second fan will cover the attribute data corresponding to the fan attributes of the first fan, that is, after extracting the fan attributes of the second fan, the attribute data corresponding to the fan attributes of the client, country, is blank.
In addition, in the prior art, when the attributes are extracted, only the fan attributes corresponding to the client attributes can be extracted, the analyzed client attributes are not dynamically read during program running, and if a certain attribute in the fan is not corresponding to the existing attribute of the client, for example, the attribute of the constellation does not appear in the client attributes, the attribute of the constellation cannot be extracted. If data extraction is required for this property of the constellation, the program code needs to be modified.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for updating an object, which are used for at least solving the technical problem of complex operation caused by the fact that when the attribute type of the object is increased, a program code needs to be changed to update the attribute type in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a method of updating an object, including: detecting whether the attribute type of the target object is increased or not based on a preset database table and object information of the preset object under a preset platform, wherein the preset database table is provided with a plurality of redundant columns, and each row of data of the preset database table forms one target object; under the condition that the attribute type of the target object is detected to be increased, acquiring the increased attribute type; updating a mapping record table based on the added attribute types, wherein the mapping record table stores the mapping relation between each attribute type of the target object and a corresponding column in a preset database table; and mapping the attribute value corresponding to the added attribute type to a preset database table based on the mapping record table.
Further, the method for updating the object further comprises the following steps: acquiring object information of a preset object under a preset platform before detecting whether the attribute type of the target object is increased or not based on a preset database table; detecting whether a preset object is matched with a target object based on the object information; and under the condition that the first attribute types are matched with the preset object, acquiring a plurality of first attribute types of the preset object under a preset platform.
Further, the method for updating the object further comprises the following steps: detecting whether each first attribute type is matched with the attribute type of a target object in a preset database; and when the first attribute type which is not matched with the attribute type is detected, determining that the attribute type of the target object is increased to obtain a second attribute type, wherein the second attribute type is the first attribute type which is not matched with the attribute type.
Further, the method for updating the object further comprises the following steps: the second attribute type is determined to be an added attribute type.
Further, the method for updating the object further comprises the following steps: acquiring a target data type corresponding to the added attribute type; acquiring a target field identifier corresponding to a redundant column of which a preset database table meets a preset condition; associating the added attribute types with the target field identification to obtain a mapping record; the mapping record table is updated based on the mapping record.
Further, the method for updating the object further comprises the following steps: acquiring a candidate field with a data type in a preset database table as a target data type and an occupied state as an idle state; and determining the field identification of the candidate field as the target field identification.
Further, the method for updating the object further comprises the following steps: under the condition that a plurality of candidate fields exist, sorting the candidate fields based on the field identification to obtain a sorting result; and determining that the field identifier of the candidate field at the first position is the target field identifier according to the sorting result.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for updating an object, including: the detection module is used for detecting whether the attribute type of the target object is increased or not based on a preset database table and object information of the preset object under a preset platform, wherein the preset database table is provided with a plurality of redundant columns, and each row of data of the preset database table forms one target object; the acquisition module is used for acquiring the increased attribute type under the condition that the attribute type of the target object is detected to be increased; the updating module is used for updating a mapping record table based on the added attribute types, wherein the mapping record table stores the mapping relation between each attribute type of the target object and a corresponding column in a preset database table; and the mapping module is used for mapping the attribute values corresponding to the added attribute types to a preset database table based on the mapping record table.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium including a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the method for updating an object described above.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including at least one processor, and at least one memory connected to the processor, a bus; the processor and the memory complete mutual communication through a bus; the processor is used for calling the program instructions in the memory to execute the method for updating the object.
In the embodiment of the invention, a method of mapping and recording fan attributes and client attributes is adopted, whether the attribute type of a target object is increased or not is detected based on a preset database table and object information of the preset object under a preset platform, the increased attribute type is obtained under the condition that the attribute type of the target object is increased, then a mapping record table is updated based on the increased attribute type, and finally an attribute value corresponding to the increased attribute type is mapped into the preset database table based on the mapping record table.
As can be seen from the above, in the above process, when the attribute type of the target object is increased, the extraction of the value corresponding to the increased attribute type can be realized without modifying the program code, thereby reducing the complexity of the system operation. In addition, in the process, when the attribute types in the preset database table are increased, only the attribute mapping is needed through the mapping record table, so that the complexity of database data migration is reduced.
Therefore, the scheme provided by the application achieves the aim of updating the attribute type without modifying the program code, thereby achieving the technical effect of reducing the complexity of database operation, and further solving the technical problem of complex operation caused by the fact that the attribute type can be updated only by changing the program code when the attribute type of the object is increased in the prior art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of a method of updating an object according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an apparatus for updating an object according to an embodiment of the present invention; and
FIG. 3 is a schematic diagram of a computing device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a method of updating an object, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 1 is a flowchart of a method for updating an object according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, whether the attribute type of the target object is increased or not is detected based on a preset database table and object information of the preset object under a preset platform, wherein the preset database table is provided with a plurality of redundant columns, and each row of data of the preset database table forms one target object.
In step S102, the preset database table may be a table in a database, where each column in the preset database table corresponds to a data type, for example, a string type, a numeric type, or the like. Optionally, other columns in the preset database table except for the columns already having the attribute type are redundant columns, for example, in table 2, the 1 st to 5 th columns all have corresponding attribute types, and the 6 th column has no corresponding attribute type, and the 6 th column is a redundant column. In addition, each redundant column has a corresponding data type, for example, the data type of column 6 is numeric type, and the data type of column 7 is string type. In the preset database table, the other columns except the redundant column are provided with corresponding data types, and the data type of each redundant column can be set by itself.
TABLE 2
1 2 3 4 5 6 7
Nickname Sex State of the country Province of labor City
Xiaoxian (Chinese character) For male China Guangdong (Chinese character of Guangdong) Shenzhen (Shenzhen medicine)
In addition, in step S102, the target object is an object composed of attribute data of the same fan under multiple preset platforms, where data of each line of the preset database table is composed as one target object. The preset platform can be an instant communication platform, a shopping platform and the like. The preset object may be a fan concerning a preset platform, for example, a fan concerning a WeChat public number. The object information of the preset object may include, but is not limited to, an object identification (e.g., a nickname, a micro signal, an avatar, an associated phone number, etc.), an object browsing record (e.g., a record of browsing an article under a micro signal public number), a degree of attention (e.g., a degree of attention under a microblog scene), a spaghetti amount, and the like.
Optionally, the attribute type of each fan under each preset platform may be compared with the attribute type of the target object, and if the attribute type of the target object does not include a certain attribute type of the fan corresponding to the target object under a certain preset platform, it may be determined that the attribute type of the target object is increased. For example, if fan a is a fan corresponding to the target object in table 2, and fan a has the attribute of the constellation under the wechat public number, it may be determined that the attribute type of the target object is increased.
Step S104, in the case of detecting the attribute type of the target object to be increased, acquiring the increased attribute type.
Still taking table 2 as an example, the fan a is the fan corresponding to the target object in table 2, and the fan a also has the attribute of "constellation" under the wechat public number, it can be determined that the attribute type of the target object is increased, and the increased attribute type "constellation" is extracted.
And step S106, updating a mapping record table based on the added attribute types, wherein the mapping record table stores the mapping relation between each attribute type of the target object and the corresponding column in the preset database table.
Optionally, table 3 shows an alternative mapping record table, where a first column of the table represents the attribute type of the target object, and a second column is a column of the attribute type in the preset database table, for example, a "nickname" is an attribute type in the first column in the preset database table. In addition, in the case that it is determined that the attribute type of the target object is increased, the increased attribute type and the column index corresponding to the column in the preset database table are filled in the mapping record table, for example, in table 3, "constellation" is the newly increased attribute type, and the column index in the preset database table is 7.
TABLE 3
Nickname 1
Sex 2
State of the country 3
Province of labor 4
City 5
Constellation 7
It should be noted that the mapping record table may be a table in the preset database. In addition, table 3 above is only an example of the mapping record table, and the mapping record table is not limited to the form shown in table 3 in practical application, and may be in other forms.
And step S108, mapping the attribute value corresponding to the added attribute type to a preset database table based on the mapping record table.
Optionally, after the mapping record table is updated, the position of the added attribute type in the preset database table may be determined through the updated mapping record table, and then the attribute value corresponding to the added attribute type is extracted from the fan data, for example, the attribute value corresponding to the "constellation" is extracted from the fan data, and the attribute value is mapped to the preset database table, so that the preset database table may be as shown in table 4.
TABLE 4
1 2 3 4 5 6 7
Nickname Sex State of the country Province of labor City Constellation
Xiaoxian (Chinese character) For male China Guangdong (Chinese character of Guangdong) Shenzhen (Shenzhen medicine) Aries seat
Based on the schemes defined in steps S102 to S108, it can be known that, by using a manner of mapping and recording the fan attributes and the client attributes, whether the attribute types of the target object are increased is detected based on the preset database table and the object information of the preset object under the preset platform, when the attribute types of the target object are detected to be increased, the increased attribute types are obtained, then the mapping record table is updated based on the increased attribute types, and finally the attribute values corresponding to the increased attribute types are mapped into the preset database table based on the mapping record table.
It is easy to note that, in the above process, when the attribute type of the target object is increased, the extraction of the value corresponding to the increased attribute type can be realized without modifying the program code, thereby reducing the complexity of the system operation. In addition, in the process, when the attribute types in the preset database table are increased, only the attribute mapping is needed through the mapping record table, so that the complexity of database data migration is reduced.
Therefore, the scheme provided by the application achieves the aim of updating the attribute type without modifying the program code, thereby achieving the technical effect of reducing the complexity of database operation, and further solving the technical problem of complex operation caused by the fact that the attribute type can be updated only by changing the program code when the attribute type of the object is increased in the prior art.
In an alternative embodiment, before detecting whether the attribute type of the target object is increased based on the preset database table, it is required to determine whether the preset object and the target object belong to the same object under the preset platform. Specifically, object information of a preset object under a preset platform is firstly acquired, and then whether the preset object is matched with a target object is detected based on the object information, wherein under the condition that the preset object is matched with the target object, a plurality of first attribute types of the preset object under the preset platform are acquired.
Optionally, whether the object identifier of the preset object is matched with the object identifier of the target object may be determined by comparing the object identifier of the preset object with the object identifier of the target object, for example, whether a phone number associated with a micro signal of the preset object is consistent with a phone number associated with a micro signal of the target object, and if so, determining that the target object in the preset database table corresponds to the related information of the preset object. Further, in the case that the first attribute type and the second attribute type are determined to be matched, whether the first attribute type corresponding to the preset object is matched with the attribute type of the target object or not may be further compared.
Further, in the process of detecting whether the attribute type of the target object is increased based on the preset database table and the object information of the preset object under the preset platform, firstly, whether each first attribute type is matched with the attribute type of the target object in the preset database is detected, when the first attribute type which is not matched with the attribute type is detected, the attribute type of the target object is determined to be increased, a second attribute type is obtained, and the second attribute type is determined to be the increased attribute type. Wherein the second attribute type is the first attribute type that does not match the attribute type, for example, the attribute type of the target object includes: nickname, gender, country, province, city, the first attribute type of the preset object includes: the nickname, the gender, the country, the vermicelli amount and the attention degree are respectively compared with each first attribute type and each attribute type of the target object, for example, the first attribute type nickname is compared with all attribute types of the target object, if the comparison result indicates that the attribute type of the target object comprises the nickname attribute, the first attribute type gender is continuously detected until the attribute of the vermicelli amount does not exist in all attribute types of the target object, the vermicelli amount is determined to be the second attribute type, and the vermicelli amount is the added attribute type.
Further, after the added attribute type is determined, the mapping record table is updated based on the added attribute type. Specifically, the method includes the steps of firstly obtaining a target data type corresponding to an added attribute type, obtaining a target field identifier corresponding to a redundant column of a preset database table meeting a preset condition, then associating the added attribute type with the target field identifier to obtain a mapping record, and finally updating the mapping record table based on the mapping record. For example, for the attribute type of "vermicelli amount", the corresponding target data type is numerical type. And then detecting a redundant column of which the data type is a numerical type in the preset database table, for example, if the data type of the 8 th column of the preset database table is detected to be a numerical type, setting the attribute type of the column as the fan amount, and recording the mapping record of the fan amount and the 8 th column of the preset database table in the mapping record table.
It should be noted that, in the above process, the target field identifier may be, but is not limited to, a column number corresponding to the redundant column, for example, in the above example, the target field identifier is 8.
Optionally, before associating the added attribute type with the target field identifier, the target field identifier needs to be determined first. Specifically, the method includes the steps of firstly obtaining a candidate field with a data type in a preset database table as a target data type and an occupied state as an idle state, and then determining a field identifier of the candidate field as a target field identifier. For example, if the target data type is a numeric type, and the data types of the 7 th, 8 th, and 9 th columns of the redundant columns in the preset database table are numeric types, then the 7 th, 8 th, and 9 th columns may be determined to be the first fields. However, since the 7 th column is already occupied by the "attention" and the 8 th column is in an idle state, the identifier corresponding to the 8 th column is used as the target field identifier. In addition, the second field in the preset database table can be obtained first, then the first field with the data type being the target data type is obtained from the second field, and the field identification of the first field is determined as the target field identification. In addition, the second field and the first field with the data type as the target data type may be obtained from a preset database table, and then, the field identifications of the candidate fields which are in the idle state and have the data type as the target data type are determined as the target field identifications, for example, the field identifications of the second field are 7 and 9, the field identifications of the field with the data type as the target data type are 8 and 9, and then the field identification 9 is determined as the target field identification.
In addition, under the condition that a plurality of candidate fields exist, the candidate fields can be sorted based on the field identifications to obtain a sorting result, and the field identification of the candidate field at the first position is determined to be the target field identification according to the sorting result. For example, the data types of the 7 th, 8 th and 9 th columns of the redundant column are numerical type, the 7 th column is already occupied by the "attention", and the 8 th and 9 th columns are in an idle state, and both can be used as the "vermicelli amount". Since the 8 th column is located before the 9 th column, the identifier corresponding to the 8 th column is used as the target field identifier.
As can be seen from the above, the method provided by the present application implements mapping of the attribute types in the preset database table through the mapping record table, and therefore, when the attribute types are increased, the attribute types can be increased and the attributes can be extracted without re-modifying the code or restarting the server, thereby reducing the complexity of database data migration.
Example 2
According to an embodiment of the present invention, an embodiment of an apparatus for updating an object is further provided, where fig. 2 is a schematic diagram of an apparatus for updating an object according to an embodiment of the present invention, and as shown in fig. 2, the apparatus includes: a detection module 201, an acquisition module 203, an update module 205, and a mapping module 207.
The detection module 201 is configured to detect whether an attribute type of a target object is increased based on a preset database table and object information of the preset object under a preset platform, where the preset database table has a plurality of redundant columns, and each row of data of the preset database table forms one target object; an obtaining module 203, configured to, in a case that an increase in an attribute type of a target object is detected, obtain the increased attribute type; an updating module 205, configured to update a mapping record table based on the added attribute types, where a mapping relationship between each attribute type of the target object and a corresponding column in the preset database table is stored in the mapping record table; and the mapping module 207 is configured to map the attribute value corresponding to the added attribute type into a preset database table based on the mapping record table.
In an alternative embodiment, the apparatus for updating an object further comprises: the device comprises a first acquisition module, a first detection module and a second acquisition module. The first acquisition module is used for acquiring object information of a preset object under a preset platform before detecting the attribute type of the target object based on a preset database table; the first detection module is used for detecting whether a preset object is matched with a target object or not based on the object information; and the second acquisition module is used for acquiring a plurality of first attribute types of the preset object under the preset platform under the condition that the first attribute types are matched with the second attribute types.
In an alternative embodiment, the detection module comprises: the device comprises a second detection module and a first determination module. The second detection module is used for detecting whether each first attribute type is matched with the attribute type of the target object in the preset database; the first determining module is used for determining that the attribute type of the target object is increased to obtain a second attribute type when the first attribute type which does not match with the attribute type is detected, wherein the second attribute type is the first attribute type which does not match with the attribute type.
In an alternative embodiment, the apparatus for updating an object further comprises: a second determining module to determine the second attribute type as an added attribute type.
In an alternative embodiment, the update module includes: the device comprises a third acquisition module, a fourth acquisition module, a correlation module and a first updating module. The third obtaining module is used for obtaining the target data type corresponding to the added attribute type; the fourth acquisition module is used for acquiring the target field identifier corresponding to the redundant column of which the preset database table meets the preset condition; the association module is used for associating the added attribute types with the target field identification to obtain a mapping record; and the first updating module is used for updating the mapping record table based on the mapping record.
In an alternative embodiment, the fourth obtaining module includes: the device comprises a fifth obtaining module, a sixth obtaining module and a third determining module. The fifth acquisition module is used for acquiring a candidate field of which the data type in the preset database table is the target data type and the occupation state is the idle state; and the third determining module is used for determining that the field identifier of the candidate field is the target field identifier.
In an alternative embodiment, the apparatus for updating an object further comprises: the device comprises a sorting module and a fourth determining module. The sorting module is used for sorting the candidate fields based on the field identification under the condition that the candidate fields exist to obtain a sorting result; and the fourth determining module is used for determining the field identifier of the candidate field at the first position as the target field identifier according to the sorting result.
The device to be updated includes a processor and a memory, the detection module, the acquisition module, the update module, the mapping module, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the extraction of the numerical value corresponding to the added attribute type can be realized without modifying program codes by adjusting kernel parameters, so that the complexity of system operation is reduced.
Example 3
An embodiment of the present invention provides a storage medium on which a program is stored, which when executed by a processor implements the method of updating an object in the above-described embodiments.
Example 4
The embodiment of the invention provides a processor, which is used for running a program, wherein the method for updating an object in the embodiment is executed when the program runs.
Example 5
An embodiment of the present invention provides a computing device, such as the schematic diagram of the computing device shown in fig. 3, and as can be seen from fig. 3, the computing device 30 includes a bus 301, at least one processor 302, and at least one memory 303 connected to the bus; the processor and the memory complete mutual communication through a bus; the processor is used for calling the program instructions in the memory to execute the method for updating the object. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: detecting whether the attribute type of the target object is increased or not based on a preset database table and object information of the preset object under a preset platform, wherein the preset database table is provided with a plurality of redundant columns, and each row of data of the preset database table forms one target object; under the condition that the attribute type of the target object is detected to be increased, acquiring the increased attribute type; updating a mapping record table based on the added attribute types, wherein the mapping record table stores the mapping relation between each attribute type of the target object and a corresponding column in a preset database table; and mapping the attribute value corresponding to the added attribute type to a preset database table based on the mapping record table.
The computer program product described above is further adapted to perform a program for initializing the following method steps when executed on a data processing device: before detecting the attribute type of a target object based on a preset database table, acquiring object information of a preset object under a preset platform; detecting whether a preset object is matched with a target object based on the object information; and under the condition that the first attribute types are matched with the preset object, acquiring a plurality of first attribute types of the preset object under a preset platform.
The computer program product described above is further adapted to perform a program for initializing the following method steps when executed on a data processing device: detecting whether each first attribute type is matched with the attribute type of a target object in a preset database; and when the first attribute type which is not matched with the attribute type is detected, determining that the attribute type of the target object is increased to obtain a second attribute type, wherein the second attribute type is the first attribute type which is not matched with the attribute type.
The computer program product described above is further adapted to perform a program for initializing the following method steps when executed on a data processing device: the second attribute type is determined to be an added attribute type.
The computer program product described above is further adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring a target data type corresponding to the added attribute type; acquiring a target field identifier corresponding to a redundant column of which a preset database table meets a preset condition; associating the added attribute types with the target field identification to obtain a mapping record; the mapping record table is updated based on the mapping record.
The computer program product described above is further adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring a candidate field with a data type in a preset database table as a target data type and an occupied state as an idle state; and determining the field identification of the candidate field as the target field identification.
The computer program product described above is further adapted to perform a program for initializing the following method steps when executed on a data processing device: under the condition that a plurality of candidate fields exist, sorting the candidate fields based on the field identification to obtain a sorting result; and determining that the field identifier of the candidate field at the first position is the target field identifier according to the sorting result.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. 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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of updating an object, comprising:
detecting whether the attribute type of a target object is increased or not based on a preset database table and object information of the preset object under a preset platform, wherein the preset database table is provided with a plurality of redundant columns, and each row of data of the preset database table forms a target object;
under the condition that the attribute type of the target object is detected to be increased, acquiring the increased attribute type;
updating a mapping record table based on the added attribute types, wherein the mapping record table stores the mapping relation between each attribute type of the target object and a corresponding column in the preset database table;
and mapping the attribute value corresponding to the added attribute type to the preset database table based on the mapping record table.
2. The method according to claim 1, wherein before detecting whether the attribute type of the target object is increased based on the preset database table and the object information of the preset object under the preset platform, the method further comprises:
acquiring object information of a preset object under the preset platform;
detecting whether the preset object is matched with the target object based on the object information;
and under the condition that the two are matched, acquiring a plurality of first attribute types of the preset object under the preset platform.
3. The method of claim 2, wherein detecting whether the attribute type of the target object is increased based on a preset database table and object information of a preset object under a preset platform comprises:
detecting whether each first attribute type is matched with the attribute type of the target object in the preset database;
when a first attribute type which is not matched with the attribute type of the target object is detected, determining that the attribute type of the target object is increased to obtain a second attribute type, wherein the second attribute type is the first attribute type which is not matched with the attribute type of the target object.
4. The method of claim 3, further comprising: determining the second attribute type to be the added attribute type.
5. The method of claim 1, wherein updating a mapping record table based on the added attribute type comprises:
acquiring a target data type corresponding to the added attribute type;
acquiring a target field identifier corresponding to a redundant column of which the preset database table meets a preset condition;
associating the added attribute type with the target field identifier to obtain a mapping record;
updating the mapping record table based on the mapping record.
6. The method of claim 5, wherein obtaining the target field identifier corresponding to the redundant column of the preset database table that meets the preset condition comprises:
acquiring a candidate field of which the data type in the preset database table is the target data type and the occupation state is an idle state;
and determining the field identification of the candidate field as the target field identification.
7. The method of claim 6, further comprising:
under the condition that a plurality of candidate fields exist, sorting the candidate fields based on field identification to obtain a sorting result;
and determining the field identifier of the candidate field at the first position as the target field identifier according to the sorting result.
8. An apparatus for updating an object, comprising:
the detection module is used for detecting whether the attribute type of the target object is increased or not based on a preset database table and object information of the preset object under a preset platform, wherein the preset database table is provided with a plurality of redundant columns, and each row of data of the preset database table forms a target object;
the acquisition module is used for acquiring the added attribute type under the condition that the attribute type of the target object is detected to be added;
an updating module, configured to update a mapping record table based on the added attribute types, where a mapping relationship between each attribute type of the target object and a corresponding column in the preset database table is stored in the mapping record table;
and the mapping module is used for mapping the attribute value corresponding to the added attribute type to the preset database table based on the mapping record table.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the method for updating an object according to any one of claims 1 to 7.
10. An electronic device comprising at least one processor, and at least one memory, bus connected to the processor;
the processor and the memory complete mutual communication through the bus;
the processor is configured to call program instructions in the memory to perform the method of updating an object of any of claims 1 to 7.
CN201911039331.5A 2019-10-29 2019-10-29 Method and device for updating object Pending CN112749173A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911039331.5A CN112749173A (en) 2019-10-29 2019-10-29 Method and device for updating object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911039331.5A CN112749173A (en) 2019-10-29 2019-10-29 Method and device for updating object

Publications (1)

Publication Number Publication Date
CN112749173A true CN112749173A (en) 2021-05-04

Family

ID=75641620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911039331.5A Pending CN112749173A (en) 2019-10-29 2019-10-29 Method and device for updating object

Country Status (1)

Country Link
CN (1) CN112749173A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113220528A (en) * 2021-05-13 2021-08-06 网宿科技股份有限公司 Resource object management method, electronic device and storage medium
CN114331745A (en) * 2021-12-24 2022-04-12 易保网络技术(上海)有限公司 Data processing method, system, program product, medium, and electronic device
CN114553954A (en) * 2022-04-21 2022-05-27 北京时代亿信科技股份有限公司 Information pushing method and device, nonvolatile storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1253342A (en) * 1998-11-05 2000-05-17 深圳市华为技术有限公司 Dynamic field implementation method for database table in customer service center
US20100262631A1 (en) * 2009-04-14 2010-10-14 Sun Microsystems, Inc. Mapping Information Stored In a LDAP Tree Structure to a Relational Database Structure
CN104063409A (en) * 2013-04-11 2014-09-24 腾讯科技(深圳)有限公司 Field adding method and system of database
CN109299332A (en) * 2018-11-02 2019-02-01 芜湖智久机器人有限公司 A kind of method, apparatus and storage medium by class and Database Mapping
CN110069487A (en) * 2017-09-28 2019-07-30 北京国双科技有限公司 A kind of data processing method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1253342A (en) * 1998-11-05 2000-05-17 深圳市华为技术有限公司 Dynamic field implementation method for database table in customer service center
US20100262631A1 (en) * 2009-04-14 2010-10-14 Sun Microsystems, Inc. Mapping Information Stored In a LDAP Tree Structure to a Relational Database Structure
CN104063409A (en) * 2013-04-11 2014-09-24 腾讯科技(深圳)有限公司 Field adding method and system of database
CN110069487A (en) * 2017-09-28 2019-07-30 北京国双科技有限公司 A kind of data processing method, apparatus and system
CN109299332A (en) * 2018-11-02 2019-02-01 芜湖智久机器人有限公司 A kind of method, apparatus and storage medium by class and Database Mapping

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113220528A (en) * 2021-05-13 2021-08-06 网宿科技股份有限公司 Resource object management method, electronic device and storage medium
CN114331745A (en) * 2021-12-24 2022-04-12 易保网络技术(上海)有限公司 Data processing method, system, program product, medium, and electronic device
CN114553954A (en) * 2022-04-21 2022-05-27 北京时代亿信科技股份有限公司 Information pushing method and device, nonvolatile storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN105335409B (en) A kind of determination method, equipment and the network server of target user
CN112749173A (en) Method and device for updating object
CN109492180A (en) Resource recommendation method, device, computer equipment and computer readable storage medium
CN104394118A (en) User identity identification method and system
CN110046196A (en) Identify correlating method and device, electronic equipment
CN107515915A (en) User based on user behavior data identifies correlating method
CN106708886B (en) Display method and device for in-site search words
KR102110642B1 (en) Password protection question setting method and device
CN110033302A (en) The recognition methods of malice account and device
US12002052B2 (en) Feature subspace isolation and disentanglement in merchant embeddings
TWI670620B (en) Calibration method and device
CN109978580A (en) Object recommendation method, apparatus and computer readable storage medium
CN112182391A (en) User portrait drawing method and device
JP2019512143A (en) Data processing method and apparatus
CN111767420A (en) Method and device for generating clothing matching data
CN106933905B (en) Method and device for monitoring webpage access data
CN112307297A (en) User identification unification method and system based on priority rule
CN106997350A (en) A kind of method and device of data processing
WO2019141143A1 (en) Method and apparatus for mining relationship between articles and recommending article, computation device and storage medium
CN106933903B (en) Storage method and device applied to distributed storage
CN108804561B (en) Data synchronization method and device
CN114066533A (en) Product recommendation method and device, electronic equipment and storage medium
CN105550240B (en) A kind of method and device of recommendation
CN112487251A (en) User ID data association method and device
CN110781375A (en) User state identification determining method and device

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