Modeling method, device, electronic device and computer readable storage medium

By creating book tables and product attribute tables in the book trade system and establishing mapping relationships, the complexity of book metadata and product data management is solved, and efficient management is achieved.

CN114297203BActive Publication Date: 2025-03-14CNPIEC DIGITAL TECH (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111671747.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-03-14
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In the book trade, it is difficult to take into account the complexity of managing book metadata and commodity data, resulting in inefficient management.

Method used

By creating a book table and a product attribute table, inserting a book field into the product attribute table, and establishing a mapping relationship between the product attribute field and the book field to achieve collaborative management.

Benefits of technology

This method effectively reduces the complexity of book management, realizes the balanced management of book metadata and product data, and improves management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297203B_ABST
    Figure CN114297203B_ABST
Patent Text Reader

Abstract

The present application relates to a modeling method, device, electronic device and computer-readable storage medium, and relates to the field of database technology. The method includes: creating a book table and a product attribute table, then obtaining at least one book field from the book table, then inserting at least one book field into the product attribute table, and then creating a mapping relationship between at least one product attribute field and at least one book field based on the product attribute table and the book table with the inserted field. Among them, multiple book fields are created in the book table, and multiple product attribute fields are created in the product attribute table. The modeling method, device, electronic device and computer-readable storage medium provided by the present application can take into account both book metadata and product data to reduce the complexity of book management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database technology, and in particular to a modeling method, device, electronic device and computer-readable storage medium. Background Art

[0002] With the development of information technology, e-commerce has developed rapidly, and book trade has also developed accordingly. At present, companies engaged in book trade can conduct book trade through B2C (Business-to-Consumer) e-commerce platforms and B2B (Business-to-Business) e-commerce platforms.

[0003] However, when these companies engage in book trade, both standard book metadata and commodity data of books as commodities need to be managed. Therefore, in order to reduce the complexity of book management, how to balance book metadata and commodity data becomes a key issue. Summary of the invention

[0004] The purpose of this application is to provide a modeling method, device, electronic device and computer-readable storage medium to solve the above technical problems.

[0005] The above invention objectives of the present application are achieved through the following technical solutions:

[0006] In a first aspect, a modeling method is provided, comprising:

[0007] Create a book table and a commodity attribute table, wherein the book table has multiple book fields, and the commodity attribute table has multiple commodity attribute fields;

[0008] Acquire at least one book field from the book table;

[0009] Inserting the at least one book field into the commodity attribute table;

[0010] Based on the commodity attribute table of the inserted field and the book table, a mapping relationship between at least one commodity attribute field and at least one book field is created.

[0011] In a possible implementation, the step of creating a book table and a commodity attribute table includes:

[0012] Creating the book table by way of paradigm modeling;

[0013] Creating the commodity attribute table by EAV modeling;

[0014] The step of inserting the at least one book field into the commodity attribute table includes:

[0015] The at least one book field is inserted as row data of the commodity attribute table.

[0016] In another possible implementation, the creating a mapping relationship between at least one product attribute field and at least one book field based on the product attribute table of the inserted field and the book table includes:

[0017] Based on the commodity attribute table of the inserted field and the book table, a mapping table is created, wherein at least two mapping table fields are created in the mapping table;

[0018] A mapping relationship between at least one book field and at least one product attribute field is inserted into the mapping table.

[0019] In another possible implementation, the method further includes:

[0020] When there is book data to be inserted, inserting the book data to be inserted into the book table;

[0021] Determine a value corresponding to at least one product attribute field based on the book data to be inserted and a mapping relationship between the at least one product attribute field and at least one book field;

[0022] The value corresponding to the at least one commodity attribute field is inserted into the commodity attribute value table.

[0023] In another possible implementation, determining a value corresponding to at least one product attribute field based on the book data to be inserted and a mapping relationship between the at least one product attribute field and the at least one book field includes:

[0024] Based on the book data to be inserted, determining whether the mapping relationship contains a book field corresponding to the book data to be inserted;

[0025] If not, determining the target field from the mapping relationship, the target field being the book field included in the mapping relationship;

[0026] Outputting prompt information, wherein the prompt information is used to prompt the user to input the book data corresponding to the target field;

[0027] Acquire the book data corresponding to the target field input by the user;

[0028] Based on the book data to be inserted, the book data corresponding to the target field, and the mapping relationship between the at least one product attribute field and the at least one book field, a value corresponding to the at least one product attribute field is determined.

[0029] In another possible implementation, determining a value corresponding to at least one product attribute field based on the book data to be inserted and a mapping relationship between the at least one product attribute field and the at least one book field includes:

[0030] Converting the book data to be inserted into a preset format to obtain book data in the preset format;

[0031] Based on the book data in the preset format and the mapping relationship between the at least one product attribute field and the at least one book field, a value corresponding to the at least one product attribute field is determined.

[0032] In another possible implementation, the method further includes:

[0033] Acquire a product specification table, wherein the product specification table includes a mapping relationship between at least one product field and at least one product attribute value field;

[0034] The commodity table is updated based on the commodity specification table and the commodity attribute value table into which the commodity attribute values ​​are inserted.

[0035] In a second aspect, a modeling device is provided, comprising:

[0036] A first creation module is used to create a book table and a commodity attribute table, wherein the book table has multiple book fields, and the commodity attribute table has multiple commodity attribute fields;

[0037] A first acquisition module, used for acquiring at least one book field from the book table;

[0038] A first inserting module, used for inserting the at least one book field into the commodity attribute table;

[0039] The second creation module is used to create a mapping relationship between at least one commodity attribute field and at least one book field based on the commodity attribute table of the inserted field and the book table.

[0040] In a possible implementation, when creating the book table and the commodity attribute table, the first creation module is specifically used to:

[0041] Creating the book table by way of paradigm modeling;

[0042] Creating the commodity attribute table by EAV modeling;

[0043] Wherein, when inserting the at least one book field into the commodity attribute table, the first inserting module is specifically used to:

[0044] The at least one book field is inserted as row data of the commodity attribute table.

[0045] In another possible implementation, when the second creation module creates a mapping relationship between at least one product attribute field and at least one book field based on the product attribute table of the inserted field and the book table, it is specifically used to:

[0046] Based on the commodity attribute table of the inserted field and the book table, a mapping table is created, wherein at least two mapping table fields are created in the mapping table;

[0047] A mapping relationship between at least one book field and at least one product attribute field is inserted into the mapping table.

[0048] In another possible implementation, the device further includes: a second inserting module, a determining module, and a third inserting module, wherein:

[0049] The second inserting module is used for inserting the book data to be inserted into the book table when there is book data to be inserted;

[0050] The determination module is used to determine a value corresponding to at least one commodity attribute field based on the book data to be inserted and a mapping relationship between the at least one commodity attribute field and the at least one book field;

[0051] The third inserting module is used to insert the value corresponding to the at least one commodity attribute field into the commodity attribute value table.

[0052] In another possible implementation, when the determination module determines the value corresponding to the at least one product attribute field based on the book data to be inserted and the mapping relationship between the at least one product attribute field and the at least one book field, it is specifically used to:

[0053] Based on the book data to be inserted, determining whether the mapping relationship contains a book field corresponding to the book data to be inserted;

[0054] When the mapping relationship does not contain the book field corresponding to the book data to be inserted, determining the target field from the mapping relationship, the target field being the book field contained in the mapping relationship;

[0055] Outputting prompt information, wherein the prompt information is used to prompt the user to input the book data corresponding to the target field;

[0056] Acquire the book data corresponding to the target field input by the user;

[0057] Based on the book data to be inserted, the book data corresponding to the target field, and the mapping relationship between the at least one product attribute field and the at least one book field, a value corresponding to the at least one product attribute field is determined.

[0058] In another possible implementation, when the determination module determines the value corresponding to the at least one product attribute field based on the book data to be inserted and the mapping relationship between the at least one product attribute field and the at least one book field, it is specifically used to:

[0059] Converting the book data to be inserted into a preset format to obtain book data in the preset format;

[0060] Based on the book data in the preset format and the mapping relationship between the at least one product attribute field and the at least one book field, a value corresponding to the at least one product attribute field is determined.

[0061] In another possible implementation, the device further includes: a second acquisition module and an update module, wherein:

[0062] The second acquisition module is used to acquire a product specification table, wherein the product specification table includes a mapping relationship between at least one product field and at least one product attribute value field;

[0063] The updating module is used to update the commodity table based on the commodity specification table and the commodity attribute value table into which the commodity attribute values ​​are inserted.

[0064] In a third aspect, an electronic device is provided, the electronic device comprising:

[0065] one or more processors;

[0066] Memory;

[0067] One or more applications, wherein one or more applications are stored in a memory and configured to be executed by one or more processors, and one or more programs are configured to: perform operations corresponding to a modeling method shown in any possible implementation of the first aspect.

[0068] In a fourth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by a processor to implement a modeling method as shown in any possible implementation method of the first aspect.

[0069] In summary, the present application includes at least one of the following beneficial technical effects:

[0070] The present application provides a modeling method, device, electronic device and computer-readable storage medium. In the present application, a book table including multiple book fields and a product attribute table including multiple product attribute fields are created, and at least one book field is inserted into the product attribute table as a product attribute to create a mapping relationship between at least one product attribute field and at least one book field. Therefore, book metadata and product data can be collaboratively managed based on the created mapping relationship, thereby achieving a balance between book metadata and product data to reduce the complexity of book management. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 This is a flow chart of a modeling method according to an embodiment of the present application;

[0072] Figure 2 It is a parent-child class relationship diagram created based on the paradigm modeling method;

[0073] Figure 3 It is a schematic diagram of a general commodity class created based on the EAV modeling method;

[0074] Figure 4 It is a schematic diagram of the structure of a modeling device provided in an embodiment of the present application;

[0075] Figure 5 It is a schematic diagram of the device structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0076] The present application is further described in detail below in conjunction with the accompanying drawings.

[0077] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make modifications to the present embodiment without any creative contribution as needed, but such modifications are protected by the patent law as long as they are within the scope of the claims of the present application.

[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0079] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

[0080] The present application embodiment provides a modeling method, such as Figure 1 As shown, the modeling method provided in the embodiment of the present application can be executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The method may include:

[0081] Step S101: Create a book table and a product attribute table.

[0082] Among them, multiple book fields are created in the book table, and multiple product attribute fields are created in the product attribute table.

[0083] Specifically, in step S101, a book table and a product attribute table may be created simultaneously, or the book table may be created first and then the product attribute table, or the product attribute table may be created first and then the book table, which is not limited in the embodiment of the present application.

[0084] Furthermore, in an embodiment of the present application, the method of creating a book table may specifically include: obtaining book fields input by a user, and creating a book table based on the book fields input by the user; it may also include: obtaining book fields stored locally, and creating a book table based on the book fields stored locally; it may also include: obtaining pre-set book fields, and creating a book table based on the pre-set book fields.

[0085] Furthermore, in an embodiment of the present application, a method for creating a product attribute table may specifically include: obtaining a product attribute field input by a user, and creating a product attribute table based on the product attribute field input by the user; it may also include: obtaining a locally stored product attribute field, and creating a product attribute table based on the locally stored product attribute field; it may also include: obtaining a pre-set product attribute field, and creating a product attribute table based on the pre-set product attribute field.

[0086] Furthermore, it should be noted that the source of the book field and the source of the product attribute field may be the same or different, and this is not limited in the embodiments of the present application.

[0087] Further, in the embodiment of the present application, the book table is used to store book metadata. In the embodiment of the present application, a plurality of book fields are created to create a book table. For example, a bookID field, an isbn field, and a bookName field may be created in the book table.

[0088] Specifically, a commodity attribute table is created by creating multiple commodity attribute fields. For example, the commodity attribute fields may include: a keyId field, a keyName field, and a keyCode field.

[0089] Step S102: Obtain at least one book field from the book table.

[0090] For the embodiment of the present application, the at least one book field may be any at least one book field in the book table, or may be at least one pre-set book field, or may be at least one book field selected by the user, which is not limited in the embodiment of the present application.

[0091] For example, the at least one book field may be at least one of the bookID field, the isbn field, and the bookName field, or may be all of the book fields of the bookID field, the isbn field, and the bookName field.

[0092] Step S103: insert at least one book field into the commodity attribute table.

[0093] Step S104: Create a mapping relationship between at least one product attribute field and at least one book field based on the product attribute table and the book table in which the fields are inserted.

[0094] An embodiment of the present application provides a modeling method. In the embodiment of the present application, a book table including multiple book fields and a product attribute table including multiple product attribute fields are created, and at least one book field is inserted into the product attribute table as a product attribute to create a mapping relationship between at least one product attribute field and at least one book field. Therefore, book metadata and product data can be collaboratively managed based on the created mapping relationship, thereby achieving a balance between book metadata and product data to reduce the complexity of book management.

[0095] In a possible implementation of the embodiment of the present application, in step S101 , creating a book table and a product attribute table may specifically include: creating a book table by using a paradigm modeling method; and creating a product attribute table by using an EAV modeling method.

[0096] Specifically, the paradigm model is that in object-oriented thinking, reading materials and books, magazines, etc. are abstract and concrete. Among them, reading materials, as an abstract class, derive subclasses such as books, magazines, etc., and there are differences in attributes between subclasses, such as Figure 2 As shown, in Figure 2 The relationship between the parent and child categories is introduced, and the relationship between the subcategories (books, magazines, and others) is also introduced. Figure 2 The main purpose of this article is to introduce the abstract and concrete relationship between reading materials, books, magazines, etc. in paradigm modeling, as well as the differences in various attributes such as subcategories. Figure 2 The reading materials and the attributes corresponding to each sub-category (books, magazines, and others) shown in are not intended to be limiting.

[0097] Specifically, the entity-attribute-value (EAV) model breaks the object-oriented concept and turns member variables into attribute key-value pairs. Figure 3 As shown, Figure 3 It is mainly used to represent the creation of a general commodity table, a general commodity specification table, and then a general commodity attribute table, a general commodity attribute value table, and field mapping relationships through EAV modeling. Figure 3 The attributes in each table in is only one possible way and is not a limitation.

[0098] Specifically, in the embodiment of the present application, paradigm modeling and EAV modeling are comprehensively utilized, and member variables such as isbn of subclasses such as books and magazines are used as a value of the member variable keyCode in the "universal commodity attribute class", and the member variable values ​​of subclasses such as books and periodicals are managed separately as a value of the member variable value in the "universal commodity value class", so that the subclass member variables and values ​​of the abstract "reading material" class can be dynamically managed by the "universal commodity".

[0099] Further, in the embodiment of the present application, the method of obtaining at least one book field from the book table in step S102 can be implemented by the method described in the embodiment of the present application, and can also be implemented by the method described in the relevant technology, which is not limited in the embodiment of the present application.

[0100] Specifically, inserting at least one book field into the commodity attribute table in step S103 may specifically include: inserting at least one book field as row data of the commodity attribute table. In the embodiment of the present application, the book table field is stored as commodity table row data. In the embodiment of the present application, inserting the book field into the commodity attribute table is a commodity attribute.

[0101] The generated commodity attribute table may be shown in Table 1.

[0102] Table 1

[0103] attrID attrCode attrName 50 isbn isbn 51 bookName Title

[0104] Specifically, in step S104, a mapping relationship between at least one product attribute field and at least one book field is created based on the product attribute table and the book table of the inserted fields, which may specifically include: creating a mapping table based on the product attribute table and the book table of the inserted fields; and inserting a mapping relationship between at least one book field and at least one product attribute field in the mapping table.

[0105] At least two mapping table fields are created in the mapping table.

[0106] For example, create mapping table fields property and attCode, and insert the relationship between the book field and the product attribute name in the mapping table, where the field mapping table is shown in Table 2.

[0107] Table 2

[0108] property attrCode isbn isbn bookName bookName

[0109] Further, the method may further include: step Sa (not shown in the figure), step Sb (not shown in the figure) and step Sc (not shown in the figure). In the embodiment of the present application, step Sa to step Sc may be performed after step S104, wherein:

[0110] Step Sa: when there is book data to be inserted, insert the book data to be inserted into the book table.

[0111] The book table into which the book data is inserted is shown in Table 3, where:

[0112] Table 3

[0113] bookID isbn bookName 1 93215339543 XXXX

[0114] Step Sb: determining a value corresponding to at least one product attribute field based on the book data to be inserted and a mapping relationship between at least one product attribute field and at least one book field.

[0115] Specifically, based on the book data to be inserted and the mapping relationship between at least one commodity attribute field and at least one book field, determining the value corresponding to at least one commodity attribute field may specifically include: converting the book data to be inserted into a preset format to obtain book data in the preset format; based on the book data in the preset format and the mapping relationship between at least one commodity attribute field and at least one book field, determining the value corresponding to at least one commodity attribute field. In an embodiment of the present application, by inserting data into the commodity table and converting it into the Jason intermediate format based on the inserted book data, for example, the generated Jason intermediate format is {"isbn":93215339543,"bookName":"XXXX"}, and then converting the data in the Jason format into commodity attributes and the values ​​corresponding to the commodity attributes, for example, the obtained commodity attributes and the values ​​corresponding to the commodity attributes are: "isbn":93215339543", and bookName":"XXXX".

[0116] Step Sc: insert the value corresponding to at least one product attribute field into the product attribute value table.

[0117] For the embodiment of the present application, the value corresponding to at least one commodity attribute field obtained in step Sb is inserted into the commodity attribute value table to obtain a universal commodity value table.

[0118] For example, the commodity attribute and the corresponding value of the commodity attribute are: "isbn":93215339543", and bookName":"XXXX" are inserted into the commodity attribute value table, and the obtained general commodity value table is shown in Table 4.

[0119] Table 4

[0120] attrValID attrID attrVal 60 50 93215339543 61 51 XXXX

[0121] Specifically, in step Sb, based on the book data to be inserted and the mapping relationship between at least one product attribute field and at least one book field, the value corresponding to at least one product attribute field is determined, which may specifically include: step Sb1 (not shown in the figure), step Sb2 (not shown in the figure), step Sb3 (not shown in the figure), step Sb4 (not shown in the figure) and step Sb5 (not shown in the figure), wherein:

[0122] Step Sb1: Based on the book data to be inserted, determine whether the mapping relationship contains the book field corresponding to the book data to be inserted.

[0123] Furthermore, if the mapping relationship includes a book field corresponding to the book data to be inserted, a value corresponding to the at least one product attribute field is determined based on the book data to be inserted and the mapping relationship between the at least one product attribute field and the at least one book field.

[0124] For example, the book data to be inserted is ""bookID":"1""isbn":93215339543", and bookName":"XXXX"", then the mapping relationship contains the book fields corresponding to the book data to be inserted.

[0125] Step Sb2: If not included, determine the target field from the mapping relationship.

[0126] The target field is the book field included in the mapping relationship.

[0127] For example, the book data to be inserted is "bookID": "1", the corresponding book field is "bookID", and the fields included in the mapping relationship are "isbn" and "bookName", that is, the mapping relationship does not include the book field corresponding to the book data to be inserted. When the book field corresponding to the book data to be inserted is not included, the determined target fields are "isbn" and "bookName".

[0128] Step Sb3: output prompt information.

[0129] The prompt information is used to prompt the user to input the book data corresponding to the target field.

[0130] Step Sb4: Obtain the book data corresponding to the target field input by the user.

[0131] For example, the book data corresponding to the target field entered by the user is "isbn":93215339543" and bookName":"XXXX"".

[0132] Step Sb5: Determine a value corresponding to at least one product attribute field based on the book data to be inserted, the book data corresponding to the target field, and the mapping relationship between at least one product attribute field and at least one book field.

[0133] Through the above embodiment, when the mapping relationship does not contain the book field corresponding to the book data to be inserted, prompt information is input to the user, and the user enters the book data corresponding to the target field according to the prompt information, so that when the user adjusts the book data, the product attribute value table is adjusted according to the mapping relationship between at least one product attribute field and at least one book field, thereby avoiding the problem of being unable to collaboratively manage book data and product data due to customer forgetfulness.

[0134] Furthermore, in order to more comprehensively manage product data when managing book metadata, the method may also include: step Sd (not shown in the figure) and step Se (not shown in the figure), wherein step Sd and step Se may be executed after step S104 or after step Sc, which is not limited in the embodiments of the present application.

[0135] Step Sd: Obtain product specification table.

[0136] For the embodiment of the present application, the product specification table can be a product specification table created when the product attribute table is created, or it can be created before the product attribute table is created, or it can be created after the product attribute table is created. In the embodiment of the present application, the product specification table includes a mapping relationship between at least one product field and at least one product attribute value field.

[0137] Specifically, multiple fields may be created when creating a product specification table. For example, a goodsID field, an attrID field, and an attrValID field may be created in the product specification table. The product specification table may be as shown in Table 5.

[0138] Table 5

[0139] goodsID attrID attrValID 10 50 60 10 51 61

[0140] Step Se, based on the product specification table and the product attribute value table in which the product attribute values ​​are inserted, update the product table.

[0141] Specifically, the product table can be called a general product table in the embodiment of the present application, wherein the general product table can be created when the product attribute table is created, or before the product attribute table is created, or after the product attribute table is created, which is not limited in the embodiment of the present application.

[0142] Specifically, when creating a general commodity table, multiple fields may be created. For example, the created fields may include: goodsID, goodsName, and specs fields.

[0143] For example, according to the contents of Table 4 and Table 5, the general commodity table is updated, wherein the updated general commodity table may be as shown in Table 6.

[0144] Table 6

[0145] goodsID goodsName specs 10 XXXX "isbn":93215339543,"bookName":"XXXX"

[0146] Furthermore, in the above embodiment, the scenario of inserting book data is taken as an example to illustrate the method of collaboratively managing book data and product data. In the embodiment of the present application, when it is detected that the user deletes or modifies the book data, the product attribute value table and the general product table and other product data can also be deleted or modified accordingly based on the mapping relationship created above. Among them, the method of deleting or modifying the book data to synchronously realize the deletion or modification of the product attribute value table and the general product table is not repeated in the embodiment of the present application.

[0147] Furthermore, it is worth noting that the above embodiments mainly involve adjusting the scenario of book data to simultaneously take into account the adjustment of product data. However, in the embodiments of the present application, when adjusting product data, such as adjusting the value of product attributes, the book metadata can also be adjusted based on the mapping relationship created above. The specific adjustment method will not be repeated in the embodiments of the present application.

[0148] The above embodiments can realize data sharing and standardized management, and have high flexibility and scalability, so as to be applicable to vertical business systems.

[0149] The above embodiment introduces a modeling method from the perspective of method flow, and the following embodiment introduces a modeling device from the perspective of modules or units. For details, please refer to the following embodiment.

[0150] The present application embodiment provides a modeling device, such as Figure 4 As shown, the modeling device 40 may include: a first creation module 41, a first acquisition module 442, a first insertion module 43 and a second creation module 44, wherein:

[0151] The first creation module 41 is used to create a book table and a commodity attribute table.

[0152] Among them, multiple book fields are created in the book table, and multiple product attribute fields are created in the product attribute table.

[0153] The first acquisition module 42 is used to acquire at least one book field from the book table.

[0154] The first inserting module 43 is used to insert at least one book field into the commodity attribute table.

[0155] The second creation module 44 is used to create a mapping relationship between at least one product attribute field and at least one book field based on the product attribute table and the book table in which the fields are inserted.

[0156] In a possible implementation of the embodiment of the present application, when creating a book table and a product attribute table, the first creation module 41 is specifically used to: create a book table by using a paradigm modeling method; and create a product attribute table by using an EAV modeling method.

[0157] Specifically, when inserting at least one book field into the commodity attribute table, the first inserting module 43 is specifically used to: insert at least one book field as row data of the commodity attribute table.

[0158] In another possible implementation of the embodiment of the present application, when the second creation module 44 creates a mapping relationship between at least one product attribute field and at least one book field based on the product attribute table and the book table of the inserted field, it is specifically used to:

[0159] Based on the commodity attribute table and the book table of the inserted fields, a mapping table is created, wherein at least two mapping table fields are created in the mapping table;

[0160] A mapping relationship between at least one book field and at least one product attribute field is inserted into the mapping table.

[0161] In another possible implementation manner of the embodiment of the present application, the apparatus 40 may further include: a second insertion module, a determination module, and a third insertion module, wherein:

[0162] A second inserting module is used for inserting the book data to be inserted into the book table when there is book data to be inserted;

[0163] A determination module, used to determine a value corresponding to at least one commodity attribute field based on the book data to be inserted and a mapping relationship between at least one commodity attribute field and at least one book field;

[0164] The third inserting module is used to insert the value corresponding to at least one commodity attribute field into the commodity attribute value table.

[0165] In another possible implementation of the embodiment of the present application, when the determination module determines the value corresponding to the at least one product attribute field based on the book data to be inserted and the mapping relationship between the at least one product attribute field and the at least one book field, it is specifically used to:

[0166] Based on the book data to be inserted, determining whether the mapping relationship contains the book field corresponding to the book data to be inserted;

[0167] When the mapping relationship does not contain the book field corresponding to the book data to be inserted, the target field is determined from the mapping relationship, and the target field is the book field contained in the mapping relationship;

[0168] Output prompt information, which is used to prompt the user to enter the book data corresponding to the target field;

[0169] Get the book data corresponding to the target field entered by the user;

[0170] Based on the book data to be inserted, the book data corresponding to the target field, and the mapping relationship between the at least one product attribute field and the at least one book field, a value corresponding to the at least one product attribute field is determined.

[0171] In another possible implementation manner of the embodiment of the present application, when the determination module determines the value corresponding to at least one product attribute field based on the book data to be inserted and the mapping relationship between at least one product attribute field and at least one book field, the determination module is specifically used to: convert the book data to be inserted into a preset format to obtain book data in the preset format; determine the value corresponding to at least one product attribute field based on the book data in the preset format and the mapping relationship between at least one product attribute field and at least one book field.

[0172] In another possible implementation of the embodiment of the present application, the device 40 may further include: a second acquisition module and an update module, wherein:

[0173] A second acquisition module is used to acquire a product specification table, wherein the product specification table includes a mapping relationship between at least one product field and at least one product attribute value field;

[0174] The update module is used to update the product table based on the product specification table and the product attribute value table into which the product attribute values ​​are inserted.

[0175] An embodiment of the present application provides a modeling device. In the embodiment of the present application, a book table including multiple book fields and a product attribute table including multiple product attribute fields are created, and at least one book field is inserted into the product attribute table as a product attribute to create a mapping relationship between at least one product attribute field and at least one book field. Therefore, book metadata and product data can be collaboratively managed based on the created mapping relationship, thereby taking both book metadata and product data into consideration to reduce the complexity of book management.

[0176] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0177] An electronic device is provided in an embodiment of the present application, such as Figure 5 As shown, Figure 5The electronic device 500 shown includes: a processor 501 and a memory 503. The processor 501 and the memory 503 are connected, such as through a bus 502. Optionally, the electronic device 500 may also include a transceiver 504. It should be noted that in actual applications, the transceiver 504 is not limited to one, and the structure of the electronic device 500 does not constitute a limitation on the embodiments of the present application.

[0178] Processor 501 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 501 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0179] The bus 502 may include a path to transmit information between the above components. The bus 502 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0180] The memory 503 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0181] The memory 503 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 501. The processor 501 is used to execute the application code stored in the memory 503 to implement the contents shown in the above method embodiment.

[0182] Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0183] The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer is run on a computer, the computer can execute the corresponding content of the aforementioned method embodiment. That is, in the embodiment of the present application, by creating a book table containing multiple book fields and a product attribute table containing multiple product attribute fields, and by inserting at least one book field into the product attribute table as a product attribute, a mapping relationship between at least one product attribute field and at least one book field is created, so that book metadata and product data can be collaboratively managed based on the created mapping relationship, and then both book metadata and product data can be taken into account to reduce the complexity of book management.

[0184] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0185] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A modeling method, characterized in that: include: Create a book table and a commodity attribute table, wherein the book table has multiple book fields, and the commodity attribute table has multiple commodity attribute fields; Acquire at least one book field from the book table; Inserting the at least one book field into the commodity attribute table; Based on the commodity attribute table with inserted fields and the book table, creating a mapping relationship between at least one commodity attribute field and at least one book field; When there is book data to be inserted, inserting the book data to be inserted into the book table; Determine a value corresponding to at least one product attribute field based on the book data to be inserted and a mapping relationship between the at least one product attribute field and at least one book field; Inserting the value corresponding to the at least one commodity attribute field into the commodity attribute value table; The determining a value corresponding to at least one product attribute field based on the book data to be inserted and the mapping relationship between the at least one product attribute field and the at least one book field includes: Based on the book data to be inserted, determining whether the mapping relationship contains a book field corresponding to the book data to be inserted; If not, determining the target field from the mapping relationship, the target field being the book field included in the mapping relationship; Outputting prompt information, wherein the prompt information is used to prompt the user to input the book data corresponding to the target field; Acquire the book data corresponding to the target field input by the user; Based on the book data to be inserted, the book data corresponding to the target field, and the mapping relationship between the at least one product attribute field and the at least one book field, a value corresponding to the at least one product attribute field is determined.

2. The method according to claim 1, characterized in that: The step of creating a book table and a commodity attribute table includes: Creating the book table by way of paradigm modeling; Creating the commodity attribute table by EAV modeling; The step of inserting the at least one book field into the commodity attribute table includes: The at least one book field is inserted as row data of the commodity attribute table.

3. The method according to claim 1, characterized in that The step of creating a mapping relationship between at least one commodity attribute field and at least one book field based on the commodity attribute table of the inserted field and the book table includes: Based on the commodity attribute table of the inserted field and the book table, a mapping table is created, wherein at least two mapping table fields are created in the mapping table; A mapping relationship between at least one book field and at least one product attribute field is inserted into the mapping table.

4. The method according to claim 1, characterized in that: Determining a value corresponding to at least one product attribute field based on the book data to be inserted and a mapping relationship between the at least one product attribute field and the at least one book field includes: Converting the book data to be inserted into a preset format to obtain book data in the preset format; Based on the book data in the preset format and the mapping relationship between the at least one product attribute field and the at least one book field, a value corresponding to the at least one product attribute field is determined.

5. The method according to claim 4, characterized in that The method further comprises: Acquire a product specification table, wherein the product specification table includes a mapping relationship between at least one product field and at least one product attribute value field; The commodity table is updated based on the commodity specification table and the commodity attribute value table into which the commodity attribute values ​​are inserted.

6. A modeling device, used in a modeling method according to any one of claims 1 to 5, characterized in that: include: A first creation module is used to create a book table and a commodity attribute table, wherein the book table has multiple book fields, and the commodity attribute table has multiple commodity attribute fields; A first acquisition module, used for acquiring at least one book field from the book table; A first inserting module, used for inserting the at least one book field into the commodity attribute table; The second creation module is used to create a mapping relationship between at least one commodity attribute field and at least one book field based on the commodity attribute table with the inserted field and the book table.

7. An electronic device, characterized in that: include: at least one processor; Memory; At least one application, wherein the at least one application is stored in the memory and is configured to be executed by the at least one processor, and the at least one application is configured to: execute a modeling method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a modeling method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • System and method of mapping product attributes between different schemas

    US10810654B1