CN113419726B - Commodity detail page generation method, device, equipment and storage medium - Google Patents

Commodity detail page generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN113419726B
CN113419726B CN202110691225.6A CN202110691225A CN113419726B CN 113419726 B CN113419726 B CN 113419726B CN 202110691225 A CN202110691225 A CN 202110691225A CN 113419726 B CN113419726 B CN 113419726B
Authority
CN
China
Prior art keywords
commodity
component
parent
target
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110691225.6A
Other languages
Chinese (zh)
Other versions
CN113419726A (en
Inventor
张正林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kangjian Information Technology Shenzhen Co Ltd
Original Assignee
Kangjian Information Technology Shenzhen 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 Kangjian Information Technology Shenzhen Co Ltd filed Critical Kangjian Information Technology Shenzhen Co Ltd
Priority to CN202110691225.6A priority Critical patent/CN113419726B/en
Publication of CN113419726A publication Critical patent/CN113419726A/en
Application granted granted Critical
Publication of CN113419726B publication Critical patent/CN113419726B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces
    • G06Q30/0643Graphical representation of items or shoppers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Finance (AREA)
  • Human Computer Interaction (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of computers, and discloses a method, a device, equipment and a storage medium for generating an item detail page, which are used for reducing the code redundancy of the item detail page. The commodity detail page generation method comprises the following steps: acquiring and caching the detail data of the target commodity according to the target commodity identification; analyzing the detail data of the target commodity according to a preset data format to obtain a plurality of parent commodity component codes and a plurality of child commodity component codes; performing component matching screening according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names; and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation. In addition, the invention also relates to a blockchain technology, and the detail data of the target commodity can be stored in the blockchain node.

Description

Commodity detail page generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating an item detail page.
Background
The commodity detail page is a page for displaying commodity detailed information and is used for bearing most of traffic and entrance of orders of the e-commerce website. At present, a plurality of detail templates are respectively set for different service versions in the existing electronic mall. Metadata of each detail template is the same, but different detail templates have diversity in corresponding display modes.
With the progress and rapid development of society, different e-commerce websites are layered endlessly, different commodity types are more confusing and eight-door, personalized demands of commodity detail pages are very large, data sources are also very large, original codes can be destroyed according to new demand development of actual business scenes, different judgment logics, new modules and the like are added, and the problems of high code redundancy of commodity detail pages and low operation and maintenance efficiency of commodity detail business are caused.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for generating an commodity detail page, which are used for reducing the code redundancy of the commodity detail page and improving the operation and maintenance efficiency of commodity detail business.
In order to achieve the above object, a first aspect of the present invention provides a method for generating an item detail page, including: when loading the commodity detail page, acquiring an identification attribute value corresponding to a preset element to obtain a target commodity identification, and acquiring and caching target commodity detail data according to the target commodity identification; carrying out data analysis on the target commodity detail data according to a preset data format to obtain a plurality of father-level commodity component codes and a plurality of son-level commodity component codes, wherein a hierarchical mapping relation exists between each father-level commodity component code and each son-level commodity component code; acquiring corresponding parent commodity component names according to the parent commodity component codes, and carrying out component matching screening according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names; and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation.
Optionally, in a first implementation manner of the first aspect of the present invention, when loading an item detail page, acquiring an identifier attribute value corresponding to a preset element to obtain a target item identifier, and acquiring and caching target item detail data according to the target item identifier, where the method includes: when loading the commodity detail page, reading an identification attribute value corresponding to a preset element to obtain a target commodity identification, and checking the target commodity identification to obtain a checking result; if the verification result is that verification is passed, generating an article detail acquisition request according to the target article identifier and a preset article detail interface, and sending the article detail acquisition request to a target server through a preset middleware to obtain response data; extracting a response status code from the response data, and judging whether the response status code is consistent with a preset code or not; and if the response state code is consistent with the preset code, reading target commodity detail data from the response data, and storing the target commodity detail data into a preset memory database according to the target commodity identification.
Optionally, in a second implementation manner of the first aspect of the present invention, the obtaining, according to each parent commodity component code, a corresponding parent commodity component name, and performing component matching screening according to each parent commodity component code corresponding parent commodity component name, to obtain parent commodity component data corresponding to each parent commodity component name, includes: reading each parent commodity component code in a preset main page, calling a preset component classification function, and acquiring corresponding parent commodity component names according to the arrangement sequence of each parent commodity component code from front to back; and carrying out component matching screening on preset component configuration data according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names.
Optionally, in a third implementation manner of the first aspect of the present invention, the drawing each parent commodity component according to the parent commodity component data corresponding to each parent commodity component name, and determining and drawing each parent commodity component code corresponding to the target child commodity component according to the hierarchical mapping relationship includes: calling a preset component generating function, and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component; extracting target sub-level commodity component codes corresponding to the parent-level commodity component codes from the hierarchical mapping relation according to preset associated fields; when the target sub-level commodity component codes corresponding to the parent-level commodity component codes are not null, matching and screening the target sub-level commodity component codes corresponding to the parent-level commodity component codes according to the preset component classification function to obtain target sub-level commodity component data corresponding to the target sub-level commodity component codes; and when the target sub-level commodity component data corresponding to the target sub-level commodity component code is not null, calling the preset component generating function, and carrying out component drawing on the target sub-level commodity component corresponding to the target sub-level commodity component code.
Optionally, in a fourth implementation manner of the first aspect of the present invention, when the product detail page is loaded, acquiring an identifier attribute value corresponding to a preset element to obtain a target product identifier, and before acquiring and caching the target product detail data according to the target product identifier, the product detail page generating method further includes: receiving commodity detail component configuration instructions, and reading the parent commodity component codes and the child commodity component codes according to the commodity detail component configuration instructions; the plurality of parent commodity component codes and the plurality of child commodity component codes are subjected to data assembly according to the hierarchical mapping relation and a preset loading sequence to obtain target commodity detail data; and sending the target commodity detail data to a target server in a preset asynchronous interaction mode, so that the target server carries out persistence processing on the target commodity detail data.
Optionally, in a fifth implementation manner of the first aspect of the present invention, after the drawing of each parent commodity component according to the parent commodity component data corresponding to each parent commodity component name, and determining and drawing, according to the hierarchical mapping relationship, a target child commodity component corresponding to each parent commodity component code, the commodity detail page generating method further includes: receiving an article detail assembly adding instruction, and adding target article assembly data according to the article detail assembly adding instruction, wherein the target article assembly data is used for indicating a newly added parent article assembly or a newly added child article assembly; distributing commodity component names and commodity component codes to the target commodity component data, binding the commodity component names and the commodity component codes, updating the commodity component names and the commodity component codes into the hierarchical mapping relation, and updating commodity component codes corresponding to the target commodity component data into the target commodity detail data; and receiving an article detail component modification instruction, and modifying the target article component data and the target article detail data according to the article detail component modification instruction.
Optionally, in a sixth implementation manner of the first aspect of the present invention, after the drawing of each parent commodity component according to the parent commodity component data corresponding to each parent commodity component name, and determining and drawing, according to the hierarchical mapping relationship, a target child commodity component corresponding to each parent commodity component code, the commodity detail page generating method further includes: monitoring each father-level commodity component and each son-level commodity component in the process of operating the commodity detail page by a user to obtain user operation behavior data, wherein the user operation behavior data comprises user collection commodity behavior data, user shopping cart behavior data and user commodity purchasing behavior data; and constructing a user consumption behavior portrait based on the user operation behavior data, and pushing a target commodity to the commodity detail page based on the user consumption behavior portrait.
The second aspect of the present invention provides an article detail page generating apparatus, comprising: the acquisition module is used for acquiring an identification attribute value corresponding to a preset element when loading the commodity detail page to obtain a target commodity identification, and acquiring and caching target commodity detail data according to the target commodity identification; the analysis module is used for carrying out data analysis on the target commodity detail data according to a preset data format to obtain a plurality of father-level commodity component codes and a plurality of child-level commodity component codes, wherein a hierarchical mapping relation exists between each father-level commodity component code and each child-level commodity component code; the matching module is used for acquiring corresponding parent commodity component names according to the parent commodity component codes, and carrying out component matching screening according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names; and the drawing module is used for drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation.
Optionally, in a first implementation manner of the second aspect of the present invention, the acquiring module package may be specifically further configured to: when loading the commodity detail page, reading an identification attribute value corresponding to a preset element to obtain a target commodity identification, and checking the target commodity identification to obtain a checking result; if the verification result is that verification is passed, generating an article detail acquisition request according to the target article identifier and a preset article detail interface, and sending the article detail acquisition request to a target server through a preset middleware to obtain response data; extracting a response status code from the response data, and judging whether the response status code is consistent with a preset code or not; and if the response state code is consistent with the preset code, reading target commodity detail data from the response data, and storing the target commodity detail data into a preset memory database according to the target commodity identification.
Optionally, in a second implementation manner of the second aspect of the present invention, the matching module is specifically configured to: reading each parent commodity component code in a preset main page, calling a preset component classification function, and acquiring corresponding parent commodity component names according to the arrangement sequence of each parent commodity component code from front to back; and carrying out component matching screening on preset component configuration data according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names.
Optionally, in a third implementation manner of the second aspect of the present invention, the drawing module is specifically configured to: calling a preset component generating function, and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component; extracting target sub-level commodity component codes corresponding to the parent-level commodity component codes from the hierarchical mapping relation according to preset associated fields; when the target sub-level commodity component codes corresponding to the parent-level commodity component codes are not null, matching and screening the target sub-level commodity component codes corresponding to the parent-level commodity component codes according to the preset component classification function to obtain target sub-level commodity component data corresponding to the target sub-level commodity component codes; and when the target sub-level commodity component data corresponding to the target sub-level commodity component code is not null, calling the preset component generating function, and carrying out component drawing on the target sub-level commodity component corresponding to the target sub-level commodity component code.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the product detail page generating device further includes: the reading module is used for receiving the commodity detail component configuration instruction and reading the plurality of parent commodity component codes and the plurality of child commodity component codes according to the commodity detail component configuration instruction; the assembly module is used for carrying out data assembly on the plurality of parent commodity component codes and the plurality of child commodity component codes according to the hierarchical mapping relation and a preset loading sequence to obtain target commodity detail data; and the processing module is used for sending the target commodity detail data to a target server in a preset asynchronous interaction mode so that the target server can perform persistence processing on the target commodity detail data.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the product detail page generating device further includes: the adding module is used for receiving an commodity detail component adding instruction, adding target commodity component data according to the commodity detail component adding instruction, wherein the target commodity component data is used for indicating a newly added parent commodity component or a newly added child commodity component; the distribution module is used for distributing commodity component names and commodity component codes to the target commodity component data, binding the commodity component names and the commodity component codes, updating the commodity component names and the commodity component codes to the hierarchical mapping relation, and updating the commodity component codes corresponding to the target commodity component data to the target commodity detail data; and the modification module is used for receiving the commodity detail component modification instruction and carrying out modification operation on the target commodity component data and the target commodity detail data according to the commodity detail component modification instruction.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the product detail page generating apparatus further includes: the monitoring module is used for monitoring each father-level commodity component and each son-level commodity component in the process of operating the commodity detail page by a user to obtain user operation behavior data, wherein the user operation behavior data comprises user collection commodity behavior data, user shopping cart behavior data and user commodity purchasing behavior data; and the pushing module is used for constructing a user consumption behavior portrait based on the user operation behavior data and pushing a target commodity to the commodity detail page based on the user consumption behavior portrait.
A third aspect of the present invention provides an article detail page generating apparatus comprising: a memory and at least one processor, the memory having instructions stored therein; the at least one processor invokes the instructions in the memory to cause the item detail page generating device to perform the item detail page generating method described above.
A fourth aspect of the present invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the above-described item detail page generation method.
In the technical scheme provided by the invention, when the commodity detail page is loaded, the identification attribute value corresponding to the preset element is obtained to obtain the target commodity identification, and the target commodity detail data is obtained and cached according to the target commodity identification; carrying out data analysis on the target commodity detail data according to a preset data format to obtain a plurality of father-level commodity component codes and a plurality of son-level commodity component codes, wherein a hierarchical mapping relation exists between each father-level commodity component code and each son-level commodity component code; acquiring corresponding parent commodity component names according to the parent commodity component codes, and carrying out component matching screening according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names; and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation. In the embodiment of the invention, a plurality of father-level commodity component codes and a plurality of son-level commodity component codes are acquired through target commodity detail data; determining parent commodity component data corresponding to the names of the parent commodity components according to the names of the parent commodity components corresponding to the parent commodity component codes; and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation. Through flexible configuration between the parent commodity components and each child commodity component, high decoupling among the components in the commodity detail page is realized, code redundancy of the commodity detail page is reduced, and operation and maintenance efficiency of commodity detail business is improved.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a method for generating a detailed page of an article according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of another embodiment of a method for generating a detail page of an article according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of an apparatus for generating a detailed page of an article according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of an apparatus for generating a detailed page of an article according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an embodiment of an apparatus for generating a page of product details in an embodiment of the invention.
Detailed Description
The embodiment of the invention provides a commodity detail page generation method, device, equipment and storage medium, which are used for realizing high decoupling among all components in a commodity detail page and reducing code redundancy of the commodity detail page through flexible configuration among parent commodity components and all child commodity components.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation 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 or inherent to such process, method, article, or apparatus.
For ease of understanding, a specific flow of an embodiment of the present invention is described below with reference to fig. 1, where an embodiment of a method for generating an item detail page according to an embodiment of the present invention includes:
101. and when the commodity detail page is loaded, acquiring an identification attribute value corresponding to the preset element to obtain a target commodity identification, and acquiring and caching target commodity detail data according to the target commodity identification.
Wherein the item detail page may be used to indicate medical product details related to the medical field, such as a medical instrument detail page or a medical supplies detail page. The commodity detail page can comprise commodity names, commodity pictures or commodity enlarged drawings, commodity prices, commodity stock quantity, commodity descriptions, commodity colors or commodity sizes; the commodity detail page can also comprise commodity scores, user comments, commodity ordering, commodity videos and related commodity recommendations, and can also comprise other detail information, and the detail information in the commodity detail page can be loaded and displayed in a component mode without limitation. Wherein, the target commodity identification and the target commodity detail data have a one-to-one correspondence. The target commodity detail data can be packaged according to a preset data format. Specifically, when the terminal loads the commodity detail page, the terminal judges whether preset page elements in the commodity detail page are triggered or not; if the preset page element is triggered, the terminal acquires an identification attribute value (i.e. an id value) corresponding to the preset element to obtain a target commodity identification; and the terminal sends an article detail acquisition request to the target server according to the target article identifier to obtain target article detail data. There is a one-to-one correspondence between the target item identification and the target item detail data. Further, the terminal stores the target item detail data in a blockchain database, and is not limited herein.
It will be understood that the execution subject of the present invention may be the product detail page generating device, or may be a terminal or a server, which is not limited herein. The embodiment of the invention is described by taking the terminal as an execution main body as an example.
102. And carrying out data analysis on the target commodity detail data according to a preset data format to obtain a plurality of parent commodity component codes and a plurality of child commodity component codes, wherein a hierarchical mapping relationship exists between each parent commodity component code and each child commodity component code.
The preset data format may be JSON data format of JS object profile, or YAML data serialization format, which is not limited herein. In this embodiment, the terminal sets a preset data format to be a JSON data format. There is a correspondence between the plurality of parent commodity component codes and the plurality of child commodity component codes, and further, one parent commodity component code corresponds to at least one child commodity component code, for example, parent commodity component code a corresponds to child commodity component code a_1, child commodity component code a_2, and child commodity component code a_3. Alternatively, the target commodity detail data is [ { "id": "3035501", "child" [ { "id": "3035601" }, { "id": "3036001" } ] ], and the parent commodity component code 3035501 corresponds to the child commodity component code 3035601 and the child commodity component code 3036001. And the parent commodity component codes and the child commodity component codes realize a hierarchical mapping relation according to a preset association field child. The preset association field may also be a sub_cat, which is not limited herein.
Specifically, the terminal determines a data analysis function according to a JSON data format; the terminal performs data analysis on the target commodity detail data according to a data analysis function to obtain commodity detail analysis data, wherein the data analysis function can be JSON.parameter (), can be $. Parameter JSON (), can be eval (), is not limited in particular, and can be an object, an array or a character string; the terminal filters and screens objects, arrays or character strings of the commodity detail analysis data to obtain a plurality of parent commodity component codes and a plurality of child commodity component codes, and hierarchical mapping relations exist between the parent commodity component codes and the child commodity component codes.
103. And obtaining corresponding parent commodity component names according to the parent commodity component codes, and carrying out component matching screening according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names.
The parent commodity component names corresponding to the parent commodity component codes have a one-to-one correspondence. Specifically, the terminal sets the codes of the parent commodity components as input parameters; the terminal calls a preset component classification function based on the input parameters to obtain a return value of the component classification function; the terminal judges whether the return value of the component classification function is a null value or not; if the return value of the component classification function is a null value, the terminal generates and displays that the target parent commodity component does not exist, continuously screens the parent commodity component names corresponding to the next parent commodity component codes, and does not block the current process; if the return value of the component classification function is not null, the terminal sets the return value of the component classification function as the name of the parent commodity component corresponding to each parent commodity component code; and the terminal performs component matching screening on the preset component configuration data according to the parent commodity component names corresponding to the parent commodity component codes, so as to obtain the parent commodity component data corresponding to the parent commodity component names.
104. And drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation.
Specifically, the terminal combines the parent commodity component data corresponding to the names of the parent commodity components with preset hypertext markup language elements (i.e. divs), calls a preset component generating function and draws the parent commodity components according to the parent commodity component data corresponding to the names of the parent commodity components; the terminal determines target sub-level commodity component codes corresponding to the parent-level commodity component codes according to the mapping relation and a preset component classification function; and when the target sub-level commodity component codes corresponding to the parent-level commodity component codes are not null values, the terminal screens the target sub-level commodity components corresponding to the target sub-level commodity component codes according to the target sub-level commodity component codes corresponding to the parent-level commodity component codes, and the terminal calls a preset component generating function to render the target sub-level commodity components corresponding to the target sub-level commodity component codes.
It will be appreciated that each parent commodity component and each child commodity component may belong to a public component, which is a component shared by multiple users, or a private component, which is a component customized by a user, the public and private components being stored in different component directories or different component data tables.
In the embodiment of the invention, a plurality of father-level commodity component codes and a plurality of son-level commodity component codes are acquired through target commodity detail data; determining parent commodity component data corresponding to the names of the parent commodity components according to the names of the parent commodity components corresponding to the parent commodity component codes; and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation. Through flexible configuration between the parent commodity components and each child commodity component, high decoupling among the components in the commodity detail page is realized, code redundancy of the commodity detail page is reduced, and operation and maintenance efficiency of commodity detail business is improved.
Referring to fig. 2, another embodiment of the method for generating an item detail page according to an embodiment of the present invention includes:
201. and when the commodity detail page is loaded, reading the identification attribute value corresponding to the preset element to obtain a target commodity identification, and checking the target commodity identification to obtain a checking result.
Further, when the terminal loads the commodity detail page and the terminal detects that a preset page element in the commodity detail page is triggered, the terminal reads an identification attribute value corresponding to the preset page element and a target commodity identification; the terminal judges whether the target commodity identification is a null value, if the target commodity identification is the null value, the terminal determines that the verification result is that the verification is not passed, and the terminal can also generate and display prompt information according to the terminal, wherein the prompt information is used for prompting a user to acquire that the commodity detail page is abnormally loaded and ask the user to reload the commodity detail page; if the target commodity identification is null, the terminal checks the target commodity identification according to a preset identification coding rule to obtain a checking result, wherein the preset identification coding rule is used for indicating a coding format which is met by the target commodity identification. For example, the terminal checks the number of digits of the target commodity identifier and the separator of the target commodity identifier according to a preset identifier coding rule; the terminal judges whether the verification result is a preset value or not; if the verification result is a preset value, the terminal determines that the verification result is verification passing; if the verification result is not the preset value, the terminal determines that the verification result is that the verification is not passed, and the terminal can correct the target commodity identification according to the preset identification deviation correcting rule. The preset value may be success or true, and is used for indicating that the verification result is that verification is passed; or may be fail or false, for indicating that the verification result is that the verification fails. The preset value may also be other values, which are not limited herein.
Further, before step 201, the terminal configures the product detail pages of different styles according to the actual product detail service requirements. Specifically, the terminal receives an commodity detail component configuration instruction, and reads a plurality of parent commodity component codes and a plurality of child commodity component codes according to the commodity detail component configuration instruction; the terminal performs data assembly on the plurality of parent commodity component codes and the plurality of child commodity component codes according to the hierarchical mapping relation and a preset loading sequence to obtain target commodity detail data; and the terminal sends the target commodity detail data to the target server in a preset asynchronous interaction mode, so that the target server carries out persistence processing on the target commodity detail data. It should be noted that, the hierarchical mapping relationship is used to indicate a master-slave correspondence relationship between the plurality of parent commodity component codes and the plurality of child commodity component codes, that is, an association relationship of tree structure data, and the preset loading sequence is used to indicate loading position sequences of the plurality of parent commodity component codes and the plurality of child commodity component codes in the commodity detail page. The target commodity detail data are preconfigured and stored in the target server, and the terminal can acquire the target commodity detail data through a preset commodity detail interface.
202. If the verification result is that the verification is passed, generating an article detail acquisition request according to the target article identification and a preset article detail interface, and sending the article detail acquisition request to the target server through a preset middleware to obtain response data.
Specifically, if the verification result is that the verification is passed, the terminal generates an asynchronous data interaction object (for example, an ajax object); the terminal acquires an interface address corresponding to a preset commodity detail interface; the terminal requests the target commodity identification and an interface address corresponding to a preset commodity detail interface according to a hypertext transfer protocol through a creation request function (for example, an open function corresponding to an ajax object) corresponding to an asynchronous data interaction object to obtain a commodity detail acquisition request; the terminal sends the commodity detail acquisition request to a preset middleware through a sending function (for example, a send function corresponding to the ajax object) corresponding to the asynchronous data interaction object, and sends the commodity detail acquisition request to a corresponding target server through the preset middleware, wherein the target server comprises a preset commodity detail interface. The preset middleware is used for indicating the sending and receiving of data, and an efficient and reliable asynchronous message transmission mechanism is utilized to integrate a distributed system, wherein the distributed system comprises a target server. The preset middleware may be a kaff card, or may be other message middleware, which is not limited herein.
203. And extracting a response state code from the response data, and judging whether the response state code is consistent with a preset code or not.
Specifically, the terminal analyzes the response data to obtain an analysis result; the terminal verifies the analysis result to obtain a verification result; when the verification result is successful, the terminal extracts a response state code from the verification result, and the terminal compares the response state code with a preset code according to a preset character string comparison function to obtain a comparison result; if the comparison result is a preset target value, the terminal determines that the response state code is consistent with the preset code; if the comparison result part is the preset target value, the terminal determines that the response state code is inconsistent with the preset code, and the terminal generates and displays the request failure information.
204. And if the response state code is consistent with the preset code, reading the target commodity detail data from the response data, and storing the target commodity detail data into a preset memory database according to the target commodity identification.
Further, if the response status code is a preset code (for example, 200), the terminal extracts the target product detail data from the analysis result according to the preset parameter field, where the target product detail data is encapsulated according to a preset data format, and the target product detail data is not null. The terminal sets the target commodity identification as a key, sets the target commodity detail data as a target key value pair, and updates the target key value pair into a preset memory database. The preset memory database may be a distributed cache, or may be an embedded database sqlite, which is not limited herein.
It should be noted that, when the terminal loads the commodity detail page and the network connection of the terminal is abnormal (for example, network interruption or network signal), the terminal determines that the verification result is that the verification fails, the terminal may jump to a preset network abnormal page and prompt the user to check the network connection condition of the terminal. The target commodity detail data can also comprise commodity comment advanced screening, commodity regular purchasing recommendation and commodity panoramic picture data, and is not limited herein.
205. And carrying out data analysis on the target commodity detail data according to a preset data format to obtain a plurality of parent commodity component codes and a plurality of child commodity component codes, wherein a hierarchical mapping relationship exists between each parent commodity component code and each child commodity component code.
The execution of step 205 is similar to that of step 102, and detailed description thereof will be omitted herein.
206. And obtaining corresponding parent commodity component names according to the parent commodity component codes, and carrying out component matching screening according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names.
It should be noted that, the preset main page is a root page (for example, root. Jsx), and the preset component classification function may be function creatBlockFactory (id), where id is a code of each parent commodity component, for example, a return value corresponding to id 1010101,function creatBlockFactory (1010101) is a Header, where the Header is used to indicate a title component of the commodity detail page. The header component may include text content and text styles (e.g., text size, text color) and may also include component layout data, as is not limited in this regard. function creatBlockFactory (id) pre-packages each parent commodity component and each child commodity component in the form of each building block, when the terminal operates each building block, the parent commodity components can be freely arranged and combined according to actual service requirements to obtain target commodity detail data so as to realize commodity detail pages in different styles, service decoupling is realized among the parent commodity components, and the existing code structure is not damaged.
Optionally, the terminal reads the parent commodity component code from the preset main page, invokes a preset component classification function and acquires the corresponding parent commodity component name according to the front-to-back arrangement sequence of the parent commodity component code; and the terminal performs component matching screening on the preset component configuration data according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names. The parent commodity component codes are in one-to-one correspondence with the parent commodity component names, and the parent commodity component names are in one-to-one correspondence with the parent commodity component data.
207. And drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation.
When the terminal draws the plurality of parent commodity component codes and the plurality of child commodity component codes, the terminal determines that the commodity detail page is loaded, monitors the operation behavior of the user, and adds commodities to a shopping cart, purchases the commodities by the user or displays the commodity arrangement according to commodity screening conditions input by the user. The terminal may display item detail pages in different styles according to the component arrangement order in the item detail data of interest, and item detail data (including item detail data) in different item detail pages may be identical.
Optionally, the terminal calls a preset component generating function, and draws each parent commodity component according to the parent commodity component data corresponding to each parent commodity component name; the terminal extracts target sub-level commodity component codes corresponding to the parent-level commodity component codes from the hierarchical mapping relation according to the preset association field; when the target sub-level commodity component codes corresponding to the parent-level commodity component codes are not null values, the terminal matches and screens the target sub-level commodity component codes corresponding to the parent-level commodity component codes according to a preset component classification function to obtain target sub-level commodity component data corresponding to the target sub-level commodity component codes; and when the target sub-level commodity component data corresponding to the target sub-level commodity component code is not null, the terminal calls a preset component generating function, and performs component drawing on the target sub-level commodity component corresponding to the target sub-level commodity component code. Wherein, each father commodity component code corresponds to a target sub-level commodity component code belonging to a plurality of sub-level commodity component codes. Each parent commodity component code may correspond to one child commodity component code or may correspond to a plurality of child commodity component codes, which is not limited herein. When each parent commodity component code corresponds to 0 child commodity component codes (namely, the target child commodity component code corresponding to each parent commodity component code is null), the terminal continues to draw and execute the next parent commodity component code.
That is, when the terminal receives a new service requirement, for example, a certain price style of the commodity detail page is changed, the terminal only needs to modify the corresponding price component, and synchronizes the modified price component to the preset component catalog, so that the target commodity detail data and the hierarchical mapping relation do not need to be modified. The development period of the commodity detail page is shortened, and the release efficiency and the operation and maintenance efficiency of the commodity detail page are improved. Optionally, the terminal receives an item detail component adding instruction, and adds target item component data according to the item detail component adding instruction, where the target item component data is used to indicate a newly added parent item component or a newly added child item component; the terminal distributes commodity component names and commodity component codes to the target commodity component data, binds the commodity component names and the commodity component codes and updates the commodity component names and the commodity component codes to the hierarchical mapping relation, and updates the commodity component codes corresponding to the target commodity component data to the target commodity detail data; and the terminal receives the commodity detail component modification instruction and carries out modification operation on the target commodity component data and the target commodity detail data according to the commodity detail component modification instruction. That is, the terminal performs a data update operation or a data deletion operation on the target commodity component data and the target commodity detail data according to the commodity detail component modification instruction, and commodity component codes between the target commodity component data and the target commodity detail data remain consistent.
208. And in the process of operating the commodity detail page by the user, monitoring each parent commodity component and each child commodity component to obtain user operation behavior data, wherein the user operation behavior data comprises user collection commodity behavior data, user shopping cart behavior data and user commodity purchasing behavior data.
It can be understood that the preset embedded point control is pre-embedded in each parent commodity component and each child commodity component, and the preset embedded point control comprises a user behavior acquisition rule. When the terminal detects the user operation commodity detail page, the terminal monitors a first trigger event corresponding to each father-level commodity component and a second trigger event corresponding to each child-level commodity component in real time according to a user behavior acquisition rule, and when the first trigger event and the second trigger event are triggered, the server acquires user operation behavior data, wherein the user operation behavior data can comprise user collection commodity behavior data, user shopping cart behavior data and user purchasing commodity behavior data.
It should be noted that, the user operation behavior data may also include user browsing commodity behavior data, user evaluating commodity data, user trial commodity behavior data, user searching commodity behavior data, and user comparing similar commodity behavior data, which is not limited herein. The terminal collects the user operation behavior data through user authorization, and user privacy is not involved.
209. And constructing a user consumption behavior portrait based on the user operation behavior data, and pushing the target commodity to the commodity detail page based on the user consumption behavior portrait.
Specifically, the terminal sends the user operation behavior data to the target server through the preset message queue, so that the target server stores the user operation behavior data in a preset database, wherein the preset database can be a data warehouse hive or a relational database mysql, and the method is not limited in the specific application. The target server performs data cleaning on the user operation behavior data to obtain cleaned behavior data, generates a user consumption knowledge graph based on the cleaned behavior data, identifies and extracts a plurality of entities, a plurality of entity attributes and a plurality of entity relationships from the user consumption knowledge graph, and returns the entities, the entity attributes and the entity relationships to the terminal; the terminal analyzes the portraits of the entities, the attributes of the entities and the relationships of the entities to obtain a user consumption behavior portraits, displays the user consumption behavior portraits, and pushes target commodities to the commodity detail page based on the user consumption behavior portraits. Further, the terminal may also put a commodity advertisement to the commodity detail page according to the consumer behavior portraits, where the commodity advertisement may be an advertisement picture or an advertisement video, and the specific situation is not limited herein.
It should be noted that the preset message queue may be a message middleware active mq, a message oriented middleware rubbi mq, a message queue based multi-line Cheng Wanglao library zeroMQ, a kafu card kafka, a message queue middleware meta mq or a distributed message system rock mq. And the terminal monitors the user behavior of the target commodity detail page according to the componentization development mode of the target commodity detail page, so that commodity recommendation accuracy is improved.
In the embodiment of the invention, a plurality of father-level commodity component codes and a plurality of son-level commodity component codes are acquired through target commodity detail data; determining parent commodity component data corresponding to the names of the parent commodity components according to the names of the parent commodity components corresponding to the parent commodity component codes; and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation. Through flexible configuration between the parent commodity components and each child commodity component, high decoupling among the components in the commodity detail page is realized, code redundancy of the commodity detail page is reduced, and operation and maintenance efficiency of commodity detail business is improved.
The method for generating an article detail page in the embodiment of the present invention is described above, and the apparatus for generating an article detail page in the embodiment of the present invention is described below, referring to fig. 3, where an embodiment of the apparatus for generating an article detail page in the embodiment of the present invention includes:
the acquiring module 301 is configured to acquire an identifier attribute value corresponding to a preset element when loading the commodity detail page, obtain a target commodity identifier, and acquire and cache target commodity detail data according to the target commodity identifier;
the parsing module 302 is configured to parse the target commodity detail data according to a preset data format to obtain a plurality of parent commodity component codes and a plurality of child commodity component codes, where a hierarchical mapping relationship exists between each parent commodity component code and each child commodity component code;
the matching module 303 is configured to obtain corresponding parent commodity component names according to the parent commodity component codes, and perform component matching screening according to the parent commodity component names corresponding to the parent commodity component codes, so as to obtain parent commodity component data corresponding to the parent commodity component names;
and the drawing module 304 is configured to draw each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determine and draw the target child commodity component corresponding to the code of each parent commodity component according to the hierarchical mapping relationship.
Further, the target item detail data is stored in a blockchain database, and is not limited herein in particular.
In the embodiment of the invention, a plurality of father-level commodity component codes and a plurality of son-level commodity component codes are acquired through target commodity detail data; determining parent commodity component data corresponding to the names of the parent commodity components according to the names of the parent commodity components corresponding to the parent commodity component codes; and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation. Through flexible configuration between the parent commodity components and each child commodity component, high decoupling among the components in the commodity detail page is realized, code redundancy of the commodity detail page is reduced, and operation and maintenance efficiency of commodity detail business is improved.
Referring to fig. 4, another embodiment of the apparatus for generating an item detail page according to an embodiment of the present invention includes:
the acquiring module 301 is configured to acquire an identifier attribute value corresponding to a preset element when loading the commodity detail page, obtain a target commodity identifier, and acquire and cache target commodity detail data according to the target commodity identifier;
The parsing module 302 is configured to parse the target commodity detail data according to a preset data format to obtain a plurality of parent commodity component codes and a plurality of child commodity component codes, where a hierarchical mapping relationship exists between each parent commodity component code and each child commodity component code;
the matching module 303 is configured to obtain corresponding parent commodity component names according to the parent commodity component codes, and perform component matching screening according to the parent commodity component names corresponding to the parent commodity component codes, so as to obtain parent commodity component data corresponding to the parent commodity component names;
and the drawing module 304 is configured to draw each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determine and draw the target child commodity component corresponding to the code of each parent commodity component according to the hierarchical mapping relationship.
Optionally, the obtaining module 301 may be further specifically configured to:
when the commodity detail page is loaded, reading an identification attribute value corresponding to a preset element to obtain a target commodity identification, and checking the target commodity identification to obtain a checking result;
if the verification result is that the verification is passed, generating an article detail acquisition request according to the target article identification and a preset article detail interface, and sending the article detail acquisition request to a target server through a preset middleware to obtain response data;
Extracting a response state code from the response data, and judging whether the response state code is consistent with a preset code or not;
and if the response state code is consistent with the preset code, reading the target commodity detail data from the response data, and storing the target commodity detail data into a preset memory database according to the target commodity identification.
Optionally, the matching module 303 may be further specifically configured to:
reading each parent commodity component code in a preset main page, calling a preset component classification function, and acquiring corresponding parent commodity component names according to the arrangement sequence of each parent commodity component code from front to back;
and carrying out component matching screening on preset component configuration data according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names.
Optionally, the drawing module 304 may be further specifically configured to:
calling a preset component generating function, and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component;
extracting target sub-level commodity component codes corresponding to the parent-level commodity component codes from the hierarchical mapping relation according to the preset associated fields;
When the target sub-level commodity component codes corresponding to the parent-level commodity component codes are not null, matching and screening the target sub-level commodity component codes corresponding to the parent-level commodity component codes according to a preset component classification function to obtain target sub-level commodity component data corresponding to the target sub-level commodity component codes;
and when the target sub-level commodity component data corresponding to the target sub-level commodity component code is not null, calling a preset component generating function, and carrying out component drawing on the target sub-level commodity component corresponding to the target sub-level commodity component code.
Optionally, the product detail page generating apparatus may further include:
a reading module 305, configured to receive an item detail component configuration instruction, and read a plurality of parent-level item component codes and a plurality of child-level item component codes according to the item detail component configuration instruction;
the assembling module 306 is configured to perform data assembling on the plurality of parent commodity component codes and the plurality of child commodity component codes according to the hierarchical mapping relationship and a preset loading sequence, so as to obtain target commodity detail data;
and the processing module 307 is configured to send the target product detail data to the target server through a preset asynchronous interaction manner, so that the target server performs persistence processing on the target product detail data.
Optionally, the product detail page generating apparatus may further include:
an adding module 308, configured to receive an item detail component adding instruction, and add target item component data according to the item detail component adding instruction, where the target item component data is used to indicate a newly added parent item component or a newly added child item component;
the allocation module 309 is configured to allocate a commodity component name and a commodity component code to the target commodity component data, bind the commodity component name and the commodity component code, update the commodity component name and the commodity component code to a hierarchical mapping relationship, and update the commodity component code corresponding to the target commodity component data to target commodity detail data;
and a modification module 310, configured to receive the item detail component modification instruction, and perform a modification operation on the target item component data and the target item detail data according to the item detail component modification instruction.
Optionally, the product detail page generating apparatus may further include:
the monitoring module 311 is configured to monitor each parent commodity component and each child commodity component during the process of operating the commodity detail page by the user, so as to obtain user operation behavior data, where the user operation behavior data includes user collection commodity behavior data, user shopping cart behavior data, and user commodity purchasing behavior data;
The pushing module 312 is configured to construct a user consumption behavior portrait based on the user operation behavior data, and push the target commodity to the commodity detail page based on the user consumption behavior portrait.
In the embodiment of the invention, a plurality of father-level commodity component codes and a plurality of son-level commodity component codes are acquired through target commodity detail data; determining parent commodity component data corresponding to the names of the parent commodity components according to the names of the parent commodity components corresponding to the parent commodity component codes; and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing the target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation. Through flexible configuration between the parent commodity components and each child commodity component, high decoupling among the components in the commodity detail page is realized, code redundancy of the commodity detail page is reduced, and operation and maintenance efficiency of commodity detail business is improved.
The article detail page generating apparatus in the embodiment of the present invention is described in detail from the viewpoint of modularization in fig. 3 and 4 above, and the article detail page generating device in the embodiment of the present invention is described in detail from the viewpoint of hardware processing below.
Fig. 5 is a schematic diagram of an apparatus for generating an article detail page according to an embodiment of the present invention, where the apparatus 500 may have a relatively large difference according to a configuration or a performance, and may include one or more processors (central processing units, CPU) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) storing application programs 533 or data 532. Wherein memory 520 and storage medium 530 may be transitory or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations for the item detail page generating apparatus 500. Still further, processor 510 may be arranged to communicate with storage medium 530 to perform a series of instruction operations in storage medium 530 on item detail page generating device 500.
The item detail page generating apparatus 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input/output interfaces 560, and/or one or more operating systems 531, such as Windows Serve, mac OS X, unix, linux, freeBSD, and the like. It will be appreciated by those skilled in the art that the article detail page generating apparatus structure shown in fig. 5 does not constitute a limitation of the article detail page generating apparatus, and may include more or less components than illustrated, or may combine certain components, or may be arranged in different components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, or may be a volatile computer readable storage medium, having stored therein instructions that, when executed on a computer, cause the computer to perform the steps of the item detail page generation method.
The present invention also provides an article detail page generating apparatus including a memory and a processor, the memory storing instructions which, when executed by the processor, cause the processor to perform the steps of the article detail page generating method in the above embodiments.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. The commodity detail page generating method is characterized by comprising the following steps:
when loading the commodity detail page, acquiring an identification attribute value corresponding to a preset element to obtain a target commodity identification, and acquiring and caching target commodity detail data according to the target commodity identification;
carrying out data analysis on the target commodity detail data according to a preset data format to obtain a plurality of father-level commodity component codes and a plurality of son-level commodity component codes, wherein a hierarchical mapping relation exists between each father-level commodity component code and each son-level commodity component code;
acquiring corresponding parent commodity component names according to the parent commodity component codes, and carrying out component matching screening according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names;
Drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing target child commodity components corresponding to the codes of each parent commodity component according to the hierarchical mapping relation;
drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, determining and drawing a target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation, and comprising the following steps:
calling a preset component generating function, and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component;
extracting target sub-level commodity component codes corresponding to the parent-level commodity component codes from the hierarchical mapping relation according to preset associated fields;
when the target sub-level commodity component codes corresponding to the parent-level commodity component codes are not null, matching and screening the target sub-level commodity component codes corresponding to the parent-level commodity component codes according to a preset component classification function to obtain target sub-level commodity component data corresponding to the target sub-level commodity component codes;
and when the target sub-level commodity component data corresponding to the target sub-level commodity component code is not null, calling the preset component generating function, and carrying out component drawing on the target sub-level commodity component corresponding to the target sub-level commodity component code.
2. The method for generating an item detail page according to claim 1, wherein when the item detail page is loaded, acquiring an identification attribute value corresponding to a preset element to obtain a target item identification, and acquiring and caching target item detail data according to the target item identification, comprises:
when loading the commodity detail page, reading an identification attribute value corresponding to a preset element to obtain a target commodity identification, and checking the target commodity identification to obtain a checking result;
if the verification result is that verification is passed, generating an article detail acquisition request according to the target article identifier and a preset article detail interface, and sending the article detail acquisition request to a target server through a preset middleware to obtain response data;
extracting a response status code from the response data, and judging whether the response status code is consistent with a preset code or not;
and if the response state code is consistent with the preset code, reading target commodity detail data from the response data, and storing the target commodity detail data into a preset memory database according to the target commodity identification.
3. The method for generating the commodity detail page according to claim 1, wherein said obtaining the corresponding parent commodity component name according to each parent commodity component code, and performing component matching screening according to the corresponding parent commodity component name of each parent commodity component code, to obtain the parent commodity component data corresponding to each parent commodity component name, includes:
Reading each parent commodity component code in a preset main page, calling a preset component classification function, and acquiring corresponding parent commodity component names according to the arrangement sequence of each parent commodity component code from front to back;
and carrying out component matching screening on preset component configuration data according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names.
4. The method for generating an item detail page according to any one of claims 1 to 3, wherein, when the item detail page is loaded, an identification attribute value corresponding to a preset element is acquired to obtain a target item identification, and before the target item detail data is acquired and cached according to the target item identification, the method for generating an item detail page further comprises:
receiving commodity detail component configuration instructions, and reading the parent commodity component codes and the child commodity component codes according to the commodity detail component configuration instructions;
the plurality of parent commodity component codes and the plurality of child commodity component codes are subjected to data assembly according to the hierarchical mapping relation and a preset loading sequence to obtain target commodity detail data;
And sending the target commodity detail data to a target server in a preset asynchronous interaction mode, so that the target server carries out persistence processing on the target commodity detail data.
5. A commodity details page generating method according to any one of claims 1-3, wherein after said drawing each parent commodity component according to the parent commodity component data corresponding to each parent commodity component name, and determining and drawing each parent commodity component code corresponding to the target child commodity component according to the hierarchical mapping relation, said commodity details page generating method further comprises:
receiving an article detail assembly adding instruction, and adding target article assembly data according to the article detail assembly adding instruction, wherein the target article assembly data is used for indicating a newly added parent article assembly or a newly added child article assembly;
distributing commodity component names and commodity component codes to the target commodity component data, binding the commodity component names and the commodity component codes, updating the commodity component names and the commodity component codes into the hierarchical mapping relation, and updating commodity component codes corresponding to the target commodity component data into the target commodity detail data;
And receiving an article detail component modification instruction, and modifying the target article component data and the target article detail data according to the article detail component modification instruction.
6. A commodity details page generating method according to any one of claims 1-3, wherein after said drawing each parent commodity component according to the parent commodity component data corresponding to each parent commodity component name, and determining and drawing each parent commodity component code corresponding to the target child commodity component according to the hierarchical mapping relation, said commodity details page generating method further comprises:
monitoring each father-level commodity component and each son-level commodity component in the process of operating the commodity detail page by a user to obtain user operation behavior data, wherein the user operation behavior data comprises user collection commodity behavior data, user shopping cart behavior data and user commodity purchasing behavior data;
and constructing a user consumption behavior portrait based on the user operation behavior data, and pushing a target commodity to the commodity detail page based on the user consumption behavior portrait.
7. An article detail page generating apparatus, characterized in that the article detail page generating apparatus comprises:
The acquisition module is used for acquiring an identification attribute value corresponding to a preset element when loading the commodity detail page to obtain a target commodity identification, and acquiring and caching target commodity detail data according to the target commodity identification;
the analysis module is used for carrying out data analysis on the target commodity detail data according to a preset data format to obtain a plurality of father-level commodity component codes and a plurality of child-level commodity component codes, wherein a hierarchical mapping relation exists between each father-level commodity component code and each child-level commodity component code;
the matching module is used for acquiring corresponding parent commodity component names according to the parent commodity component codes, and carrying out component matching screening according to the parent commodity component names corresponding to the parent commodity component codes to obtain parent commodity component data corresponding to the parent commodity component names;
the drawing module is used for drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component, and determining and drawing a target child commodity component corresponding to each parent commodity component code according to the hierarchical mapping relation;
the drawing module is specifically configured to:
calling a preset component generating function, and drawing each parent commodity component according to the parent commodity component data corresponding to the name of each parent commodity component;
Extracting target sub-level commodity component codes corresponding to the parent-level commodity component codes from the hierarchical mapping relation according to preset associated fields;
when the target sub-level commodity component codes corresponding to the parent-level commodity component codes are not null, matching and screening the target sub-level commodity component codes corresponding to the parent-level commodity component codes according to a preset component classification function to obtain target sub-level commodity component data corresponding to the target sub-level commodity component codes;
and when the target sub-level commodity component data corresponding to the target sub-level commodity component code is not null, calling the preset component generating function, and carrying out component drawing on the target sub-level commodity component corresponding to the target sub-level commodity component code.
8. The article detail page generating apparatus of claim 7, wherein the obtaining module is specifically configured to:
when loading the commodity detail page, reading an identification attribute value corresponding to a preset element to obtain a target commodity identification, and checking the target commodity identification to obtain a checking result;
if the verification result is that verification is passed, generating an article detail acquisition request according to the target article identifier and a preset article detail interface, and sending the article detail acquisition request to a target server through a preset middleware to obtain response data;
Extracting a response status code from the response data, and judging whether the response status code is consistent with a preset code or not;
and if the response state code is consistent with the preset code, reading target commodity detail data from the response data, and storing the target commodity detail data into a preset memory database according to the target commodity identification.
9. An article detail page generating apparatus, characterized in that the article detail page generating apparatus comprises: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invoking the instructions in the memory to cause the item detail page generating device to perform the item detail page generating method of any of claims 1-6.
10. A computer readable storage medium having instructions stored thereon, which when executed by a processor implement an item detail page generation method as claimed in any one of claims 1 to 6.
CN202110691225.6A 2021-06-22 2021-06-22 Commodity detail page generation method, device, equipment and storage medium Active CN113419726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110691225.6A CN113419726B (en) 2021-06-22 2021-06-22 Commodity detail page generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110691225.6A CN113419726B (en) 2021-06-22 2021-06-22 Commodity detail page generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113419726A CN113419726A (en) 2021-09-21
CN113419726B true CN113419726B (en) 2023-10-24

Family

ID=77789827

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110691225.6A Active CN113419726B (en) 2021-06-22 2021-06-22 Commodity detail page generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113419726B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114936301B (en) * 2022-07-20 2022-10-25 深圳装速配科技有限公司 Intelligent household building material data management method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761664A (en) * 2014-01-07 2014-04-30 重庆仁腾科技有限公司 Information page showing method, device and system
WO2016177250A1 (en) * 2015-05-05 2016-11-10 阿里巴巴集团控股有限公司 Client page rendering method and apparatus
CN108874384A (en) * 2018-05-31 2018-11-23 康键信息技术(深圳)有限公司 Terminal device, server, web data processing method and computer storage medium
CN109582403A (en) * 2017-09-29 2019-04-05 北京国双科技有限公司 Interlocked display method and device between chart inner assembly
CN110516180A (en) * 2019-08-21 2019-11-29 北京拉勾网络技术有限公司 A kind of content display method, device and calculate equipment
CN111708537A (en) * 2020-06-18 2020-09-25 深圳前海微众银行股份有限公司 Page rendering method and device based on component template and readable storage medium
CN111796727A (en) * 2019-03-22 2020-10-20 阿里巴巴集团控股有限公司 Interface data processing method and device
CN112527287A (en) * 2020-12-08 2021-03-19 北京达佳互联信息技术有限公司 Article detail information display method, device, terminal and storage medium
CN112905279A (en) * 2021-02-03 2021-06-04 广州虎牙科技有限公司 Page component rendering method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761664A (en) * 2014-01-07 2014-04-30 重庆仁腾科技有限公司 Information page showing method, device and system
WO2016177250A1 (en) * 2015-05-05 2016-11-10 阿里巴巴集团控股有限公司 Client page rendering method and apparatus
CN109582403A (en) * 2017-09-29 2019-04-05 北京国双科技有限公司 Interlocked display method and device between chart inner assembly
CN108874384A (en) * 2018-05-31 2018-11-23 康键信息技术(深圳)有限公司 Terminal device, server, web data processing method and computer storage medium
CN111796727A (en) * 2019-03-22 2020-10-20 阿里巴巴集团控股有限公司 Interface data processing method and device
CN110516180A (en) * 2019-08-21 2019-11-29 北京拉勾网络技术有限公司 A kind of content display method, device and calculate equipment
CN111708537A (en) * 2020-06-18 2020-09-25 深圳前海微众银行股份有限公司 Page rendering method and device based on component template and readable storage medium
CN112527287A (en) * 2020-12-08 2021-03-19 北京达佳互联信息技术有限公司 Article detail information display method, device, terminal and storage medium
CN112905279A (en) * 2021-02-03 2021-06-04 广州虎牙科技有限公司 Page component rendering method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113419726A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
CN112035742B (en) User portrait generation method, device, equipment and storage medium
CN108228873B (en) Object recommendation and release content pushing method and device, storage medium and equipment
US10437848B2 (en) Systems and methods for parsing and ingesting data in big data environments
US8224823B1 (en) Browsing history restoration
US7587486B2 (en) Click stream analysis
US8090716B2 (en) Information-processing apparatus, information-processing method, and computer-readable storage medium
US20020095441A1 (en) Adaptive catalog page display
CN113032668A (en) Product recommendation method, device and equipment based on user portrait and storage medium
CN109428877A (en) A kind of method and apparatus for by user equipment access operation system
RU2632149C2 (en) System, method and constant machine-readable medium for validation of web pages
CN113419726B (en) Commodity detail page generation method, device, equipment and storage medium
JP2007226558A (en) Automatic affiliate site management system, automatic affiliate site management method and automatic affiliate site management program
US20170228815A1 (en) Methods, systems, and media for providing aggregated and uniformly arranged item information
US20170068931A1 (en) Method and system for providing continuous reference architecture and bill of material modeling
US20110022563A1 (en) Document display system, related document display method, and program
US20070112675A1 (en) Goods and Services Locator Language for Uniform Resource Identifier Components
JP4649525B1 (en) RECOMMENDATION DEVICE, RECOMMENDATION METHOD, AND RECOMMENDATION PROGRAM
CA2785250A1 (en) Method, system, and article of manufacture for generating ad groups for on-line advertising
WO2021181900A1 (en) Target user feature extraction method, target user feature extraction system, and target user feature extraction server
CN114691769A (en) Unstructured data processing method and device of power monitoring system
CN115271769A (en) Method, device and equipment for estimating delivery effect data
KR101791784B1 (en) Method and system for managing business card using hash tag
CN113811911A (en) System and method for obtaining platform feedback data to be dynamically retrieved by downstream subsystems
US11714954B1 (en) System for determining reliability of extracted data using localized graph analysis
KR20200129782A (en) Searching service method using crawling

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant