CN106097072B - Comparison method and device of commodity information and terminal equipment - Google Patents

Comparison method and device of commodity information and terminal equipment Download PDF

Info

Publication number
CN106097072B
CN106097072B CN201610431862.9A CN201610431862A CN106097072B CN 106097072 B CN106097072 B CN 106097072B CN 201610431862 A CN201610431862 A CN 201610431862A CN 106097072 B CN106097072 B CN 106097072B
Authority
CN
China
Prior art keywords
commodity
event
information
comparison
determining
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
CN201610431862.9A
Other languages
Chinese (zh)
Other versions
CN106097072A (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610431862.9A priority Critical patent/CN106097072B/en
Publication of CN106097072A publication Critical patent/CN106097072A/en
Application granted granted Critical
Publication of CN106097072B publication Critical patent/CN106097072B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/0623Item investigation
    • G06Q30/0625Directed, with specific intent or strategy
    • G06Q30/0629Directed, with specific intent or strategy for generating comparisons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • 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

Abstract

The invention discloses a comparison method, a comparison device and terminal equipment of commodity information, and relates to the technical field of electronic commerce, wherein the method comprises the following steps: receiving commodity information and displaying the commodity information on a commodity display page; detecting an event in the commodity display page, and determining commodities to be compared selected on the commodity display page according to the event; acquiring characteristic information of the commodities to be compared and sending the characteristic information to a server; and receiving the commodity data of the commodities to be compared returned by the server and displaying the commodity data on the commodity comparison page. The method, the device and the terminal equipment can directly carry out the operation of initiating the commodity information comparison in the commodity display page, do not need to open the commodity detail page and repeatedly enter the detail page for operation, reduce the calculated amount, reduce the occupation of system resources, reduce the load of a network, reduce the utilization rate of a CPU and improve the user experience.

Description

Comparison method and device of commodity information and terminal equipment
Technical Field
The invention relates to the technical field of electronic commerce, in particular to a method and a device for comparing commodity information and terminal equipment.
Background
With the rapid development of the internet and electronic commerce, a large number of commodity transactions are completed on the e-commerce website every day, and the variety and the number of commodities of each large e-commerce platform are rapidly increased. In the shopping process, a user often searches for needed commodities through keywords, for example, commodities with keywords of 'mobile phones', the server returns mobile phones of various brands to the front end for display, and the user can select proper commodities by comparing various parameters of the commodities and combining the demands of the user. In this process, the user can compare various parameter information of the product, such as price, configuration parameters, functions, and the like, in various ways, so the comparison operation function for providing the product information to the user is very important.
The current functions of comparing the commodity information provided by the e-commerce platform website are generally as follows: searching the appointed commodities to obtain commodity searching result data; opening a certain commodity, selecting a 'comparison' button in a commodity detail page, and adding the commodity into a list to be compared; and clicking a comparison button again in the list to be compared, and entering a commodity information comparison page. When the comparison is needed, the commodities are added into the list to be compared after the commodity details are entered, the operation is complex, and the comparison of the commodities can be completed only by repeated operation. The user can only open the commodity detail page to compare the commodity information, the user cannot perform the comparison operation of the commodity information on the commodity search list surface, the user experience is poor, and frequent webpage requests need to be performed on the server due to the fact that the user needs to frequently enter the commodity detail page, larger background server resources are occupied, the load of network transmission is large, and the operation cost and the use cost are increased.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus and a terminal device for comparing commodity information.
According to an aspect of the present invention, there is provided a method for comparing commodity information, including: detecting an event in the commodity display page, and determining commodities to be compared selected on the commodity display page according to the event; the commodity display page displays the received commodity information; acquiring the characteristic information of the commodities to be compared and sending the characteristic information to a server; and receiving the commodity data of the commodity to be compared returned by the server and displaying the commodity data on a commodity comparison page.
Optionally, determining the to-be-compared commodity selected on the commodity display page according to the event includes: determining a comparison commodity area selected on the commodity display page according to the event; and determining the commodities corresponding to the commodity elements in the comparison commodity area as the commodities to be compared.
Optionally, the determining, according to the event, a comparison merchandise area selected on the merchandise display page includes: when a first selection starting event is monitored, recording a first coordinate corresponding to the first selection starting event; when a first selection end event is monitored, recording a second coordinate corresponding to the first selection end event; and determining the comparison commodity area according to the first coordinate and the second coordinate.
Optionally, determining a first commodity element selected on the commodity display page; and when the focus area on the commodity display page is positioned above a second commodity element and meets a selected condition, determining the first commodity element and the second commodity element as the commodity to be compared.
Optionally, when the first commodity element is judged to start to be dragged, adding a reference commodity element corresponding to the first commodity element, and displaying the reference commodity element along the dragged track; and when the reference commodity element moves above the second commodity element and meets a selected condition, determining the first commodity element and the second commodity element as the commodity to be compared.
Optionally, the adding a reference commodity element corresponding to the first commodity element comprises: adding a commodity reference layer; acquiring display content and cascading style sheet information of the first commodity element; creating and referring commodity elements in the commodity reference layer according to the display content and the cascading style sheet information; the commodity reference layer is positioned on the top layer and covers the commodity display page.
Optionally, the displaying the reference commodity element following the dragged trajectory includes: when a second selection starting event of the selected first commodity element is monitored, recording a third coordinate corresponding to the second selection starting event; monitoring a movement event corresponding to the movement of the reference commodity element, and acquiring the offset of the reference commodity element in real time based on the movement event; and determining a fourth coordinate in real time based on the third coordinate and the offset, and enabling the display position of the reference commodity element to be transformed based on the fourth coordinate.
Optionally, determining that the reference merchandise element moves above the second merchandise element based on a movement event and starting timing; when the timed duration exceeds a preset duration threshold, determining that the commodity corresponding to the second commodity element is the commodity to be compared; or when the reference commodity element moves above the second commodity element and a second selection end event is monitored, determining that the second commodity element is a commodity to be compared; and hiding the commodity reference layer when the second selection ending event is monitored and the second selection ending event is monitored.
Optionally, the obtaining the feature information of the to-be-compared commodity and sending the feature information to a server includes: obtaining pre-stored commodity information of the commodity to be compared, and extracting the characteristic information from the commodity information; providing a function of selecting whether to compare or not on the commodity display page, and sending the characteristic information of the commodity to be compared to the server based on an input selection instruction; the characteristic information is a commodity name and/or an identification number of the commodity.
Optionally, the receiving the commodity information and displaying the commodity information on a commodity display page includes: receiving a commodity retrieval result sent by the server, wherein the commodity retrieval result comprises: HTML files, CSS files; and generating the commodity display page based on the HTML file and the cascading style sheet information, determining the coordinates of commodity elements displayed on the commodity display page, and caching the commodity information carried in the HTML file.
According to another aspect of the present invention, there is provided a commodity information comparison apparatus including: the comparison commodity confirming module is used for detecting the event in the commodity display page and determining the commodity to be compared selected on the commodity display page according to the event; the commodity display page displays the received commodity information; the comparison data sending module is used for acquiring the characteristic information of the commodities to be compared and sending the characteristic information to the server; and the comparison commodity display module is used for receiving the commodity data of the commodity to be compared returned by the server and displaying the commodity data on a commodity comparison page.
Optionally, the comparison product confirmation module includes: an event detection unit for detecting the event; the comparison area confirming unit is used for confirming the comparison commodity area selected on the commodity display page according to the event; and the comparison commodity selection unit is used for determining commodities corresponding to the commodity elements in the comparison commodity area as the commodities to be compared.
Optionally, the event detecting unit is further configured to record a first coordinate corresponding to a first selection start event when the first selection start event is monitored; when a first selection end event is monitored, recording a second coordinate corresponding to the first selection end event; the comparison commodity selection unit is further used for determining the comparison commodity area according to the first coordinate and the second coordinate.
Optionally, the comparison product confirmation module includes: and the selected commodity determining unit is used for determining a first commodity element selected on the commodity display page, and when a focus area on the commodity display page is positioned on a second commodity element and meets a selected condition, determining the first commodity element and the second commodity element as the commodity to be compared.
Optionally, the comparison product confirmation module includes: the dragged picture generating unit is used for adding a commodity reference layer when the first commodity element is judged to be dragged, and copying a reference commodity element corresponding to the first commodity element on the commodity reference layer; a dragged picture display unit for displaying the reference commodity element along the dragged track; the selected commodity determining unit is configured to determine the first commodity element and the second commodity element as the commodity to be compared when the reference commodity element moves above the second commodity element and meets a selected condition.
Optionally, the dragged picture generating unit is further configured to add a commodity reference layer, obtain display content and cascading style sheet information of the first commodity element, and create a reference commodity element corresponding to the first commodity element in the commodity reference layer according to the display content and the cascading style sheet information; the commodity reference layer is positioned on the top layer and covers the commodity display page.
Optionally, the dragging picture display unit includes: the initial coordinate recording subunit is used for recording a third coordinate corresponding to a second selection starting event when the second selection starting event of the selected first commodity element is monitored; the offset amount operator unit is used for monitoring a movement event corresponding to the movement of the reference commodity element and acquiring the offset amount of the reference commodity element in real time based on the movement event; and the display coordinate determining subunit is used for determining a fourth coordinate in real time based on the third coordinate and the offset, so that the display position of the reference commodity element is transformed based on the fourth coordinate.
Optionally, the selected article determining unit is further configured to determine that the reference article element moves above the second article element based on a movement event, and start timing; when the timed duration exceeds a preset duration threshold, determining that the commodity corresponding to the second commodity element is the commodity to be compared; or when the reference commodity element moves above the second commodity element and a second selection end event is monitored, determining that the second commodity element is a commodity to be compared; the comparison commodity confirming module further comprises: and the dragged picture hiding unit is used for hiding the commodity reference layer when a second selection end event is monitored.
Optionally, the comparison data sending module includes: the characteristic information acquisition unit is used for acquiring pre-stored commodity information of the commodity to be compared and extracting the characteristic information from the commodity information; the characteristic information sending unit is used for providing a function of selecting whether to compare on the commodity display page and sending the characteristic information of the commodity to be compared to the server based on an input selection instruction; the characteristic information is a commodity name and/or an identification number of the commodity.
Optionally, the system further comprises a product display processing module, wherein the product display processing module includes: a retrieval result receiving unit, configured to receive a commodity retrieval result sent by the server, where the commodity retrieval result includes: HTML files, CSS files; and the display layout unit is used for generating the commodity display page based on the HTML file and the cascading style sheet information, determining the coordinates of commodity elements displayed on the commodity display page, and caching the commodity information carried in the HTML file.
According to still another aspect of the present invention, there is provided a terminal device including: the above-described product information comparison device.
According to still another aspect of the present invention, there is provided a commodity information comparison apparatus including: a memory; and a processor coupled to the memory, the processor configured to perform the comparison method of merchandise information as described above based on instructions stored in the memory.
The commodity information comparison method, the commodity information comparison device and the terminal equipment can directly carry out the operation of initiating the commodity information comparison in the commodity display page, reduce the occupation of system resources, reduce the network load and improve the use experience of users.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a method for comparing merchandise information according to the present invention;
FIG. 2 is a schematic view of a display of a product on a product display page;
FIG. 3 is a block diagram of an embodiment of a merchandise information comparison apparatus according to the present invention;
FIG. 4 is a block diagram of a comparison product confirmation module in an embodiment of the product information comparison device according to the present invention;
FIG. 5 is a schematic diagram of a drag image display unit in an embodiment of the apparatus for comparing merchandise information according to the present invention;
FIG. 6 is a block diagram of a comparison data sending module in an embodiment of the apparatus for comparing merchandise information according to the present invention;
FIG. 7 is a block diagram of a product display processing module in an embodiment of the product information comparison apparatus according to the present invention;
fig. 8 is a block diagram illustrating another embodiment of the apparatus for comparing merchandise information according to the present invention.
Detailed Description
The present invention now will be described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown. The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The technical solution of the present invention is described in various aspects below with reference to various figures and embodiments.
The terms "first", "second", and the like are used hereinafter only for descriptive distinction and not for other specific meanings.
Fig. 1 is a schematic flow chart of an embodiment of a method for comparing commodity information according to the present invention, as shown in fig. 1:
step 101, receiving commodity information and displaying the commodity information on a commodity display page.
For example, a user inputs a keyword on a browser retrieval page in a mobile phone or a PC and submits the keyword, and a server sends searched commodity information to the mobile phone or the PC, wherein the commodity information comprises: the name of the goods, the ID (identification number) of the goods, the price, the promotion information, the picture, etc., and the browser in the mobile phone or the PC generates a goods display page to present the goods to the user.
And 102, detecting an event in the commodity display page, and determining the commodity to be compared selected on the commodity display page according to the event.
Detecting an event input by a user in a commodity display page, wherein the event comprises the following steps: a mouse event, a keyboard event, or a touch event of a touch screen, etc.
And 103, acquiring the characteristic information of the commodity to be compared and sending the characteristic information to a server.
When the user selects the commodities to be compared on the commodity display page, a commodity list to be compared can be generated, one or more commodities selected by the user are added into the commodity list to be compared, and the commodity information selected by the user is stored. Feature information is extracted from the commodity information and used for generating a data pair report. The characteristic information is a commodity name and/or an ID of the commodity, for example, the ID of each commodity in the list is acquired, a request is sent to the server, and unique marks (IDs of the commodities) of all commodities in the list to be compared are used as request parameters and sent to the specified server.
And 104, receiving the commodity data of the commodity to be compared returned by the server and displaying the commodity data on the commodity comparison page.
For example, the server generates an information comparison data report of each parameter of the commodity to be compared according to the ID of each commodity, and issues the generated comparison data report to a mobile phone or a PC of a user to generate a commodity comparison page display comparison data report.
The comparison method of the commodity information in the embodiment can directly carry out the operation of initiating the commodity information comparison in the commodity display page, and can realize the operation of rapidly comparing the commodity information without opening the commodity detail page, thereby improving the user experience and reducing the load of the system.
In one embodiment, a browser in a mobile phone or a PC of a user sends a commodity search instruction carrying a commodity keyword to a server, and the browser receives a commodity search result returned by the server, where the commodity search result includes: HTML files, CSS files, merchandise pictures, and the like. The HTML file carries commodity information, and the method comprises the following steps: name of the item, ID of the item, price, promotional information, etc. And analyzing the HTML file and storing the commodity information in the memory. And analyzing the CSS file to generate a style sheet.
The method comprises the steps of generating a commodity display page based on an HTML file, a style sheet and commodity pictures, determining coordinates of the commodity pictures on the commodity display page, determining the layout type of the commodity display page according to the style sheet, determining the number of columns and the width proportion of each column of the commodity display page according to the layout type, displaying commodity information in the columns, and determining the coordinates of commodity elements in the columns.
In the browser, functions such as selecting, framing, dragging and the like of a designated view in a page can be realized by combining the provided HTML DOM (Document Object Model) with a Hypertext Markup Language (HTML) script technology (JavaScript and the like).
A plurality of commodity display areas are formed on the commodity display page, a commodity display list is formed, DIV nodes of all commodities in the HTML file are created through the scripting language JavaScript, and commodity information is displayed in the corresponding commodity display areas, as shown in fig. 2. The commodity information (DIV node of the commodity) displayed in the commodity picture display area is the commodity element in the invention, and comprises a picture, a price, promotion information and the like.
The browser analyzes a DOM Tree from an HTML file, analyzes a Style structure body corresponding to a Cascading Style Sheet from a CSS (Cascading Style Sheet), constructs a Render Tree, and then the browser draws a page according to the Render Tree for display. In the construction process, the browser puts the commodity elements in the document object model tree into corresponding cascading style sheet positions in the style structure body corresponding to the cascading style sheet one by one, and then construction is carried out. The document object model tree mainly determines the presentation content of the commodity elements, including pictures, prices, preferential information and the like, and the style structure body corresponding to the cascading style sheet mainly determines the presentation positions of the commodity elements.
The coordinates of commodity elements on a commodity display page are set, the current page can be regarded as a coordinate system (container) with an upper left vertex angle as an origin and x and y as axes, the coordinate system is arranged in a Flexbox layout or a nine-grid diagram mode, all commodity data are displayed on the page, the width and the height in the container are calculated according to the size of a commodity picture size sent by a server, the size of a top (top) and a left edge distance (left) of the container is set, and the positions of all data on the page are calculated by analogy. For example, the position of the article a can be described in terms of style, width, height, 90, left, 10, top, 20, position, absolute.
Events can be added to the commodity display page through the script, and corresponding operation can be carried out when the input events of the user are monitored. The input event may be a mouse event, a touch screen event, a keyboard event, etc. The method can be used for selecting commodities on the commodity display page by using a frame selection method, determining a comparison commodity area selected on the commodity display page according to an event, and determining commodities corresponding to a plurality of commodity elements in the comparison commodity area as commodities to be compared.
In one embodiment, a first coordinate corresponding to a first selection start event is recorded when the first selection start event is monitored, and a second coordinate corresponding to the first selection end event is recorded when the first selection end event is monitored. And taking the rectangular frame taking the first coordinate and the second coordinate as the opposite fixed points as a comparison commodity area, determining all or part of a plurality of commodity elements falling into the comparison commodity area, and taking commodities corresponding to the commodity elements as commodities to be compared.
The first selection start event and the first selection end event may be various. For example, pressing the mouse event onmousedown is the first selection start event, and releasing the mouse event onmouseup is the first selection end event. When a user presses a mouse to trigger an onmousedown event, recording a coordinate point a (x, y) when the user presses the mouse, monitoring a mobile mouse onmousedown event, recording a coordinate a (x, y) when the user clicks the mouse, and acquiring a rolling track in real time by monitoring the onmousedown event.
In one embodiment, a first commodity element selected on the commodity display page is determined, and when a focus area on the commodity display page is located above a second commodity element and meets a selected condition, the first commodity element and the second commodity element are determined as the commodities to be compared.
For example, the user may also click a mouse on a product display page to select a product a, drag the product a to the position of the product B, suspend the product a above the product B, or overlap the display frame of the product a and the display area of the product B, and select a product to be compared. Or after the user clicks the mouse to select the commodity A, the user clicks the commodity B through the mouse to select the commodity to be compared and the like. The focus area in the invention is a click area of a mouse, a view display area formed when a commodity is dragged, an area clicked by a finger on a touch screen, and the like. The selected conditions may be: release of the mouse, click of the mouse, dwell over time threshold, etc.
Determining a first commodity element selected on a commodity display page, adding a commodity reference layer when the first commodity element is judged to start to be dragged, copying a reference commodity element corresponding to the first commodity element on the commodity reference layer, and displaying the reference commodity element along with a dragging track; and when the hovering time length of the reference commodity element above the second commodity element on the commodity display page exceeds a preset time length threshold value or the reference commodity element is positioned above the second commodity element, monitoring a second selection ending event, and determining the second commodity element as the commodity to be compared.
The display content and the cascading style sheet information of the first commodity element are obtained, and the commodity element comprises a picture, price, preferential information and the like displayed on a commodity display page. The obtained display content of the first commodity element can be one or more of pictures, prices and preferential information. And creating a reference commodity element corresponding to the first commodity element in the commodity reference layer according to the display content and the cascading style sheet information. The commodity reference layer is positioned on the top layer and covers the commodity display page.
And when a second selection starting event of the selected first commodity element is monitored, recording a third coordinate corresponding to the second selection starting event. And monitoring a movement event corresponding to the movement of the reference commodity element, and acquiring the offset of the reference commodity element in real time based on the movement event. And determining the fourth coordinate in real time based on the third coordinate and the offset, and converting the display position of the reference commodity element based on the fourth coordinate.
The second selection start event, the move event, and the second selection end event may be various. For example, pressing the mouse event onmousedown is a second selection start event, releasing the mouse event onmouseup is a second selection end event, and moving the mouse event onmouseover is a moving event. When the commodity A is dragged, a mouse is pressed to trigger an onmousedown event, a coordinate point a (x, y) when the mouse is pressed is recorded, the mouse is moved to trigger the onmousedown event, a moving track is recorded, the offset of the mouse is calculated, and the coordinate of the relative position of the commodity A1 corresponding to the commodity A on the commodity reference layer is calculated according to the offset.
When the dragging action of the mouse is intercepted to start, activating and adding a commodity reference layer covering the whole dragging area, and then creating a reference commodity element corresponding to the dragged first commodity element in the commodity reference layer. The product reference layer corresponds to a position in the document object model tree, and each element corresponds to a position in the document object model tree.
When the mouse is dragged, the dragged commodity element is a reference commodity element in the commodity reference layer, the original position of the first commodity element is not dragged, and the position of the second picture element in the commodity reference layer is calculated. Determining, based on the movement event, that the reference merchandise element moves over the second merchandise element and begins timing; and when the timed duration exceeds a preset duration threshold, determining the commodity corresponding to the second commodity element as the commodity to be compared. And hiding the commodity reference layer when a second selection ending event is monitored.
As shown in fig. 2, a single selection operation is realized by clicking a certain commodity through the left mouse button, and when a drag operation is performed after the commodity a is selected through the mouse, the commodity reference layer can move along with the drag of the mouse, and the operation of commodity comparison can be realized by dragging the commodity a to move above the commodity B. And adding an event onmouseover in the display area of the commodity B through the script, wherein the event is triggered when the mouse moves into the display area of the commodity B.
And when the selected commodity A is moved to the upper surface of the commodity B, hovering the commodity A for a certain time, and if the time is 2s later, the commodity B is the selected commodity to be compared. The selected commodity can be obtained when the mouse is released by detecting the track of the commodity dragged by the mouse and hovering the commodity above the corresponding commodity or overlapping the commodity with other commodities.
A commodity reference layer structure may be added after the last element in the document object model tree, a commodity reference layer is added after the position of the last element in the document object model tree corresponding to the commodity display page in advance, and a DIV block corresponding to the commodity reference layer is added at the tail end of the trunk of the document object model tree, that is, a unit determined using a DIV tag, and its attribute is set as a top-level DIV.
The commodity information of the commodity to be compared, which is stored in advance when the page is generated, may be stored in a specific memory, for example. And after judging that the user selects the comparison commodity, extracting characteristic information from the commodity information as a parameter, sending a request to a specified server, generating a detailed commodity parameter comparison report by the server, and returning the detailed commodity parameter comparison report to the user.
After the comparison commodity is selected by the user, a function of selecting whether to perform comparison can be provided on the commodity display page, for example, a pop-up box is provided, and the user needs to select whether to perform comparison. And if the user determines that the comparison is required, sending the characteristic information of the commodity to be compared to the server.
The comparison method of the commodity information in the embodiment can directly perform the operation of initiating the commodity information comparison in the commodity display page without opening the commodity detail page or repeatedly entering the detail page for operation, thereby reducing the calculation amount, reducing the occupation of system resources, reducing the load of a network and reducing the utilization rate of a CPU.
As shown in fig. 3, the present invention provides a product information comparison device 30 including: a commodity display processing module 31, a comparison commodity confirming module 32, a comparison data transmitting module 33 and a comparison commodity display module 34. The commodity display processing module 31 receives commodity information and displays the commodity information on a commodity display page.
The comparison commodity confirming module 32 detects an event in the commodity display page, and determines the commodity to be compared selected on the commodity display page according to the event. The comparison data sending module 33 obtains the characteristic information of the commodity to be compared and sends the characteristic information to the server. The comparison commodity display module 34 receives the commodity data of the commodity to be compared returned by the server and displays the commodity data on the commodity comparison page.
As shown in fig. 4, the comparison product confirmation module 32 includes: an event detecting unit 321, a contrasting area confirming unit 322, a contrasting article selecting unit 323, a dragged picture generating unit 324, a dragged picture displaying unit 325, a selected article determining unit 326, and a dragged picture hiding unit 327. The event detection unit 321 detects an event. The comparison area confirmation unit 322 determines a comparison commodity area selected on the commodity display page according to the event. The comparison commodity selection unit 323 determines commodities corresponding to the plurality of commodity elements in the comparison commodity region as commodities to be compared.
When the first selection start event is monitored, the event detecting unit 321 records a first coordinate corresponding to the first selection start event. When the first selection end event is monitored, the event detecting unit 321 records a second coordinate corresponding to the first selection end event. The comparison product selection unit 322 determines a comparison product area according to the first coordinate and the second coordinate.
The selected commodity determining unit 326 determines a first commodity element selected on the commodity display page, and determines the first commodity element and a second commodity element as commodities to be compared when a focus area on the commodity display page is located on the second commodity element and meets a selected condition.
The dragged picture generating unit 324 adds the commodity reference layer when it is judged that the first commodity element starts to be dragged, and adds a reference commodity element corresponding to the first commodity element on the commodity reference layer. The dragged picture display unit 325 causes the reference commodity element to be displayed following the dragged trajectory.
The selected commodity determining unit 326 determines that the second commodity element is a commodity to be compared when it is determined that the time length for which the reference commodity element hovers over the second commodity element on the commodity display page exceeds a preset time length threshold or when the reference commodity element is located over the second commodity element, and a second selection end event is monitored. The dragged picture hiding unit 327 hides the commodity reference layer when the second selection end event is monitored.
The dragged picture generating unit 324 acquires the display content and the cascading style sheet information of the first commodity element, and creates a reference commodity element corresponding to the first commodity element in the commodity reference layer according to the display content and the cascading style sheet information; the commodity reference layer is positioned on the top layer and covers the commodity display page. The selected commodity determining unit 326 determines that the reference commodity element moves above the second commodity element based on the movement event, starts timing, and determines that the commodity corresponding to the second commodity element is the commodity to be compared when the time length of the timing exceeds a preset time length threshold value.
As shown in fig. 5, the drag picture display unit 325 includes: an initial coordinate recording subunit 3251, an offset amount operator unit 3252, and a display coordinate determination subunit 3253. The initial coordinate recording subunit 3251 records, when a second selection start event of the selected first commodity element is monitored, a third coordinate corresponding to the second selection start event. The offset amount operator unit 3252 monitors a movement event corresponding to the movement of the reference commodity element, and acquires the offset amount of the reference commodity element in real time based on the movement event. The display coordinate determination subunit 3253 determines the fourth coordinate in real time based on the third coordinate and the offset amount so that the display position of the reference commodity element is transformed based on the fourth coordinate.
As shown in fig. 6, the comparison data transmission module 33 includes: a feature information acquisition unit 331 and a feature information transmission unit 332. The feature information acquisition unit 331 acquires commodity information of commodities to be compared, which is stored in advance, and extracts feature information from the commodity information. The characteristic information sending unit 332 provides a function of selecting whether to compare on the commodity display page, and sends the characteristic information of the commodity to be compared to the server based on the input selection instruction.
As shown in fig. 7, the product display processing module 31 includes: a search result receiving unit 311 and a display layout unit 312. The search result receiving unit 311 receives a product search result sent by the server, where the product search result includes: HTML files, CSS files, etc. The display layout unit 312 generates a product display page based on the HTML file and the cascading style sheet information, determines coordinates of product elements displayed on the product display page, and caches product information carried in the HTML file.
Fig. 8 is a block diagram illustrating another embodiment of the apparatus for comparing merchandise information according to the present invention. As shown in fig. 8, the apparatus may include a memory 81 and a processor 82, the memory 81 is used for storing instructions, the processor 82 is coupled to the memory 81, and the processor 82 is configured to execute a comparison method for implementing the above-mentioned commodity information based on the instructions stored in the memory 81.
The memory 81 may be a high-speed RAM memory, a non-volatile memory (non-volatile memory), or the like, and the memory 81 may be a memory array. The storage 81 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules. The processor 82 may be a central processing unit CPU, or an application specific integrated circuit asic, or one or more integrated circuits configured to implement the merchandise display method of the present invention.
According to one embodiment, the present invention provides a terminal device, including: the above commodity information comparison device.
According to the method and the device for comparing the commodity information and the terminal device, the operation of initiating the commodity information comparison can be directly carried out in the commodity display page, the commodity information can be quickly compared without opening the commodity detail page, when a plurality of commodities are compared, only the commodities need to be compared in a frame selection mode and then are operated, the operation of repeatedly entering the detail page is not needed, the calculation amount is reduced, the occupation of system resources is reduced, the network load is reduced, the utilization rate of a CPU is also reduced, and the user experience is improved.
The method and system of the present invention may be implemented in a number of ways. For example, the methods and systems of the present invention may be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustrative purposes only, and the steps of the method of the present invention are not limited to the order specifically described above unless specifically indicated otherwise. Furthermore, in some embodiments, the present invention may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (14)

1. A method for comparing commodity information, comprising:
detecting an event in a commodity display page, and determining commodities to be compared selected on the commodity display page according to the event;
the commodity display page displays the received commodity information; adding a commodity reference layer when the first commodity element selected on the commodity display page is judged to start to be dragged, acquiring the display content and the cascading style sheet information of the first commodity element, and creating a reference commodity element in the commodity reference layer according to the display content and the cascading style sheet information so that the reference commodity element is displayed along with the dragging track; the commodity reference layer is positioned on the top layer and covers the commodity display page;
determining that the reference merchandise element moves over a second merchandise element based on a movement event and starting timing; when the timed duration exceeds a preset duration threshold, determining that the commodity corresponding to the second commodity element is the commodity to be compared; or when the reference commodity element moves above the second commodity element and a second selection end event is monitored, determining that the second commodity element is a commodity to be compared; when a second selection end event is monitored, hiding the commodity reference layer;
acquiring the characteristic information of the commodities to be compared and sending the characteristic information to a server;
and receiving the commodity data of the commodity to be compared returned by the server and displaying the commodity data on a commodity comparison page.
2. The method of claim 1, wherein determining the to-be-compared merchandise selected on the merchandise display page according to the event comprises:
determining a comparison commodity area selected on the commodity display page according to the event;
and determining the commodities corresponding to the commodity elements in the comparison commodity area as the commodities to be compared.
3. The method of claim 2, wherein said determining a comparative merchandise area selected on the merchandise display page according to the event comprises:
when a first selection starting event is monitored, recording a first coordinate corresponding to the first selection starting event;
when a first selection end event is monitored, recording a second coordinate corresponding to the first selection end event;
and determining the comparison commodity area according to the first coordinate and the second coordinate.
4. The method of claim 1, wherein causing the reference merchandise element to be displayed following the dragged trajectory comprises:
when a second selection starting event of the selected first commodity element is monitored, recording a third coordinate corresponding to the second selection starting event;
monitoring a movement event corresponding to the movement of the reference commodity element, and acquiring the offset of the reference commodity element in real time based on the movement event;
and determining a fourth coordinate in real time based on the third coordinate and the offset, and enabling the display position of the reference commodity element to be transformed based on the fourth coordinate.
5. The method of claim 1, wherein obtaining the characteristic information of the goods to be compared and sending the characteristic information to a server comprises:
obtaining pre-stored commodity information of the commodity to be compared, and extracting the characteristic information from the commodity information;
providing a function of selecting whether to compare or not on the commodity display page, and sending the characteristic information of the commodity to be compared to the server based on an input selection instruction;
the characteristic information is a commodity name and/or an identification number of the commodity.
6. The method of claim 1, wherein the receiving and displaying merchandise information on a merchandise display page comprises:
receiving a commodity retrieval result sent by the server, wherein the commodity retrieval result comprises: HTML files, CSS files;
and generating the commodity display page based on the HTML file and the cascading style sheet information, determining the coordinates of commodity elements displayed on the commodity display page, and caching the commodity information carried in the HTML file.
7. A device for comparing commodity information, comprising:
the comparison commodity confirming module is used for detecting an event in a commodity display page and confirming the commodity to be compared selected on the commodity display page according to the event; the commodity display page displays the received commodity information;
the comparison commodity confirming module comprises:
the selected commodity determining unit is used for determining a first commodity element selected on the commodity display page;
the dragged picture generating unit is used for adding a commodity reference layer when the first commodity element is judged to be dragged, acquiring the display content and the cascading style sheet information of the first commodity element, and creating a reference commodity element corresponding to the first commodity element in the commodity reference layer according to the display content and the cascading style sheet information;
a dragged picture display unit for displaying the reference commodity element along the dragged track; the commodity reference layer is positioned on the top layer and covers the commodity display page;
the selected commodity determining unit is further used for determining that the reference commodity element moves above the second commodity element based on the movement event and starting timing; when the timed duration exceeds a preset duration threshold, determining that the commodity corresponding to the second commodity element is the commodity to be compared; or when the reference commodity element moves above the second commodity element and a second selection end event is monitored, determining that the second commodity element is a commodity to be compared;
the comparison commodity confirming module further comprises: the dragged picture hiding unit is used for hiding the commodity reference layer when a second selection end event is monitored;
the comparison data sending module is used for acquiring the characteristic information of the commodities to be compared and sending the characteristic information to the server;
and the comparison commodity display module is used for receiving the commodity data of the commodity to be compared returned by the server and displaying the commodity data on a commodity comparison page.
8. The apparatus of claim 7, wherein:
the comparison commodity confirming module comprises:
an event detection unit for detecting the event;
the comparison area confirming unit is used for confirming the comparison commodity area selected on the commodity display page according to the event;
and the comparison commodity selection unit is used for determining commodities corresponding to the commodity elements in the comparison commodity area as the commodities to be compared.
9. The apparatus of claim 8, wherein:
the event detection unit is further used for recording a first coordinate corresponding to a first selection starting event when the first selection starting event is monitored; when a first selection end event is monitored, recording a second coordinate corresponding to the first selection end event;
the comparison commodity selection unit is further used for determining the comparison commodity area according to the first coordinate and the second coordinate.
10. The apparatus of claim 7, wherein:
the drag picture display unit includes:
the initial coordinate recording subunit is used for recording a third coordinate corresponding to a second selection starting event when the second selection starting event of the selected first commodity element is monitored;
the offset amount operator unit is used for monitoring a movement event corresponding to the movement of the reference commodity element and acquiring the offset amount of the reference commodity element in real time based on the movement event;
and the display coordinate determining subunit is used for determining a fourth coordinate in real time based on the third coordinate and the offset, so that the display position of the reference commodity element is transformed based on the fourth coordinate.
11. The apparatus of claim 7, wherein:
the comparison data sending module comprises:
the characteristic information acquisition unit is used for acquiring pre-stored commodity information of the commodity to be compared and extracting the characteristic information from the commodity information;
the characteristic information sending unit is used for providing a function of selecting whether to compare on the commodity display page and sending the characteristic information of the commodity to be compared to the server based on an input selection instruction;
the characteristic information is a commodity name and/or an identification number of the commodity.
12. The apparatus of claim 7, further comprising an item display processing module, wherein the item display processing module comprises:
a retrieval result receiving unit, configured to receive a commodity retrieval result sent by the server, where the commodity retrieval result includes: HTML files, CSS files;
and the display layout unit is used for generating the commodity display page based on the HTML file and the cascading style sheet information, determining the coordinates of commodity elements displayed on the commodity display page, and caching the commodity information carried in the HTML file.
13. A terminal device, comprising:
a device for comparing commodity information according to any one of claims 7 to 12.
14. A device for comparing commodity information, comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the comparison method of merchandise information according to any one of claims 1 to 6 based on instructions stored in the memory.
CN201610431862.9A 2016-06-17 2016-06-17 Comparison method and device of commodity information and terminal equipment Active CN106097072B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610431862.9A CN106097072B (en) 2016-06-17 2016-06-17 Comparison method and device of commodity information and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610431862.9A CN106097072B (en) 2016-06-17 2016-06-17 Comparison method and device of commodity information and terminal equipment

Publications (2)

Publication Number Publication Date
CN106097072A CN106097072A (en) 2016-11-09
CN106097072B true CN106097072B (en) 2020-06-30

Family

ID=57236801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610431862.9A Active CN106097072B (en) 2016-06-17 2016-06-17 Comparison method and device of commodity information and terminal equipment

Country Status (1)

Country Link
CN (1) CN106097072B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107767211A (en) * 2017-09-26 2018-03-06 北京小米移动软件有限公司 Product control methods, device and storage medium based on augmented reality
CN110163701B (en) * 2018-02-11 2023-11-03 北京京东尚科信息技术有限公司 Method and device for pushing information
CN110716681A (en) * 2018-07-11 2020-01-21 阿里巴巴集团控股有限公司 Method and device for comparing display objects of display interface
CN109085963A (en) * 2018-08-08 2018-12-25 维沃移动通信有限公司 A kind of interface display method and terminal device
CN110928542B (en) * 2018-09-20 2023-12-26 北京国双科技有限公司 Webpage adaptation method, device, system and equipment
CN111598640A (en) * 2019-02-21 2020-08-28 北京京东尚科信息技术有限公司 Information processing method and device and storage medium
CN111144438A (en) * 2019-11-26 2020-05-12 苏州方正璞华信息技术有限公司 Method and device for detecting commodities in advertisement bill
CN111552528A (en) * 2020-04-14 2020-08-18 携程旅游网络技术(上海)有限公司 Display method, system, electronic equipment and medium of mobile terminal page

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103258280A (en) * 2012-02-17 2013-08-21 盛趣信息技术(上海)有限公司 Price comparative method and system
CN104077693A (en) * 2013-03-27 2014-10-01 腾讯科技(深圳)有限公司 Commodity comparison method, server, client side and e-commerce system
CN104615665A (en) * 2015-01-12 2015-05-13 华为技术有限公司 Method and device for display control of information in webpage

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130173431A1 (en) * 2011-12-28 2013-07-04 Target Brands, Inc. Product comparison

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103258280A (en) * 2012-02-17 2013-08-21 盛趣信息技术(上海)有限公司 Price comparative method and system
CN104077693A (en) * 2013-03-27 2014-10-01 腾讯科技(深圳)有限公司 Commodity comparison method, server, client side and e-commerce system
CN104615665A (en) * 2015-01-12 2015-05-13 华为技术有限公司 Method and device for display control of information in webpage

Also Published As

Publication number Publication date
CN106097072A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106097072B (en) Comparison method and device of commodity information and terminal equipment
US11880864B2 (en) System and method of automated delivery of relevance-checked benefit-conveying codes during online transaction
KR102127191B1 (en) Method, apparatus and computer program for providing shopping informations
KR101511050B1 (en) Method, apparatus, system and computer program for offering and displaying a product information
US9128909B2 (en) Intelligent augmentation of media content
US9760541B2 (en) Systems and methods for delivery techniques of contextualized services on mobile devices
CA2861616C (en) Method and system to provide a scroll map
US10699315B2 (en) Method and computer program for displaying search information
US20120278742A1 (en) Server apparatus, terminal apparatus, user's degree of interest calculation method, user's degree of interest calculation program, terminal program, recording medium having program recorded therein, and an information providing system
US9934206B2 (en) Method and apparatus for extracting web page content
US9679081B2 (en) Navigation control for network clients
JP5198838B2 (en) Information providing program, information providing apparatus, and information providing method
CN102147702A (en) Method and apparatus for selecting hyperlinks
CN102411614A (en) Display Of Image Search Results
US20130179262A1 (en) Advertisement display program, advertisement display apparatus, advertisement display method, recording medium, and advertisement display system
US9135316B2 (en) Information providing device, method, program, information display device, method, program, information search system, and recording medium for enhanced search results
US20170220671A1 (en) System, method, and apparatus for collecting and processing user feedback on webpages
CN106951495A (en) Method and apparatus for information to be presented
KR20170013369A (en) Method, apparatus and computer program for displaying serch information
US20140214591A1 (en) System and method to provide a product display in a business
KR20170076199A (en) Method, apparatus and computer program for providing commercial contents
CN113722630B (en) Method and equipment for presenting resource data in web page based on client rendering
CN105260904B (en) Method for recommending information according to webpage image and electronic equipment
KR20150097250A (en) Sketch retrieval system using tag information, user equipment, service equipment, service method and computer readable medium having computer program recorded therefor
CN110147477B (en) Data resource modeling extraction method, device and equipment of Web system

Legal Events

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