WO2015067179A1 - Method and apparatus for detecting invalid commodity templates - Google Patents

Method and apparatus for detecting invalid commodity templates Download PDF

Info

Publication number
WO2015067179A1
WO2015067179A1 PCT/CN2014/090387 CN2014090387W WO2015067179A1 WO 2015067179 A1 WO2015067179 A1 WO 2015067179A1 CN 2014090387 W CN2014090387 W CN 2014090387W WO 2015067179 A1 WO2015067179 A1 WO 2015067179A1
Authority
WO
WIPO (PCT)
Prior art keywords
template
product
webpage
product template
information
Prior art date
Application number
PCT/CN2014/090387
Other languages
French (fr)
Chinese (zh)
Inventor
周雷
姜鑫
高扬
牛杏媛
史雯缤
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2015067179A1 publication Critical patent/WO2015067179A1/en

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/02Marketing; Price estimation or determination; Fundraising
    • 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]

Definitions

  • the present invention relates to the field of electronic commerce technologies, and in particular, to a method and apparatus for detecting a failure of a commodity template.
  • the network is full of huge quantities of goods.
  • users upload information about a product to a website, they often rely on the product template.
  • the product template can effectively reduce the workload of the user when entering the product information, and avoid the repetitive operation of the user.
  • the relevant data of the product template will grow geometrically, so it is very important to monitor the product templates.
  • the staff member periodically checks the product template and manually determines whether the product template is invalid. Because the manual method is completely dependent on the detection process of the product template, and the workload in the process of detection is relatively large, the detection efficiency and correctness largely depend on the proficiency and work experience of the staff, because there is no way to ensure the accuracy of the test. In addition, the efficiency of the detection is also very low, and there is no way to achieve accurate real-time detection. Therefore, the failure detection method of the commodity template in the prior art has low efficiency and poor precision, and may cause a large area of the online product to be unloaded due to the above-mentioned problem of the product template detection.
  • the present invention has been made in order to provide a method and corresponding apparatus for detecting a failure of a commodity form that overcomes the above problems or at least partially solves or alleviates the above problems.
  • a method of detecting a failure of a commodity template comprising:
  • the identifying each product template included in the webpage includes:
  • a regular method is used to identify each product template contained in the web page.
  • the method when detecting the failure of the important product template, in order to reduce the user's loss and improve the experience of the product template, the method further includes:
  • An alarm message is issued when the expired item template is the same as the template in the important item template library.
  • determining the detection parameters of the product template according to the identification information of the commodity module includes:
  • the product template is a title template according to the identification information of the product template, determining that the detection parameter corresponding to the title template is text information;
  • the product template is a price template according to the identification information of the product template, determining that the detection parameter corresponding to the price template is digital information;
  • the detection parameter corresponding to the picture template is picture information.
  • the detection parameter of the product template is matched with the obtained content information of the webpage, and the matching success comprises:
  • the product template is a title template, it is determined whether the obtained content information included in the webpage contains text information, and when the acquired content information included in the webpage contains text information, it is determined that the matching is successful;
  • the product template is a price template, it is determined whether the acquired content information contained in the webpage contains digital information, and when the obtained content information contained in the webpage contains digital information, it is determined that the matching is successful;
  • the product template is a picture template
  • an apparatus for detecting a failure of a commodity template comprising:
  • An identification module configured to acquire a uniform resource locator of the webpage to be detected, and identify each product template included in the webpage
  • An obtaining module configured to obtain, according to the location of the product template in the webpage, the content information included in the webpage according to the location of the product template in the webpage;
  • the matching detection module is configured to: according to the identification information of the commodity module, determine and match the detection parameter of the product template with the acquired content information of the webpage; when the matching is successful, determine that the commodity template is valid, otherwise, determine The item template is invalid.
  • the identification module is specifically configured to identify each product template included in the webpage by using a regular method.
  • the device when detecting the failure of the important product template, in order to reduce the loss of the user and improve the experience of the product template, the device further includes:
  • the alarm module is configured to determine whether the failed product template is the same as the template in the important product template library after the matching detection module detects the failure of the commodity template; and issue an alarm when the failed product template is the same as the template in the important product template library; information.
  • the matching detection module is specifically configured to: when determining the product template as the title template according to the identification information of the product template, determining that the detection parameter corresponding to the title template is a text information; when determining that the product template is a price template according to the identification information of the product template, determining that the detection parameter corresponding to the price template is digital information; and determining the product template as a picture according to the identification information of the product template When the template is used, it is determined that the detection parameter corresponding to the image template is picture information.
  • the matching detection module is specifically configured to: when the product template is a title template, determine whether the acquired content information included in the webpage contains text information, and when the acquired When the content information contained in the webpage contains text information, it is determined that the matching is successful; when the product template is a price template, it is determined whether the obtained content information of the webpage contains digital information, and the acquired content information included in the webpage is included When the digital information is used, it is determined that the matching is successful; when the product template is a picture template, it is determined whether the obtained content information included in the webpage contains image information, and when the obtained content information of the webpage contains image information, the matching is determined to be successful. .
  • a computer program comprising computer readable code, when the computer readable code is run on a computing device, causing the computing device to perform the method of detecting a commodity template failure described above .
  • a computer readable medium storing a computer program as described above is provided.
  • An embodiment of the present invention provides a method and a device for detecting a failure of a product template.
  • the method identifies each product template included in the web page in the web page to be detected, according to the detection parameter corresponding to the product template, and in the page.
  • the obtained template matches the content information included in the location, and when the matching is unsuccessful, it determines that the product template is invalid.
  • the product template is detected for the detection parameter corresponding to the product template, and the content information included in the position of the product template in the webpage, the product template is detected to determine whether the product template is invalid, thereby realizing the failure detection of the product template.
  • the automation improves the detection efficiency and accuracy of the failure of the product template.
  • FIG. 1 is a schematic diagram of a process for detecting a failure of a commodity template according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a URL set of a webpage for detecting according to an embodiment of the present invention
  • FIG. 3 is an information diagram of performing product template failure detection for a certain webpage according to an embodiment of the present invention
  • FIG. 4A and FIG. 4B are schematic diagrams showing test results after testing a product template for each webpage according to an embodiment of the present invention
  • 4C is a schematic diagram of a detailed implementation process for detecting a failure of a commodity template according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of an apparatus for detecting a failure of a commodity template according to an embodiment of the present invention
  • Figure 6 is a schematic block diagram of a computing device for performing a method of detecting a failure of a merchandise template in accordance with the present invention
  • Fig. 7 schematically shows a storage unit for holding or carrying program code implementing a method of detecting a failure of a commodity template according to the present invention.
  • the product template is a template used in the description of the product description, which is generally a large piece of code that is designed and provided to the user, that is, the html code.
  • Product templates are only displayed on the product's introduction page, no matter what users can use, no restrictions.
  • the information contained in the general product template is display information, description information, postage description information, and the like.
  • the use of product templates in web pages is generally called directly in the website.
  • the embodiment of the present invention provides a product template for detecting the product. Method and device for failure.
  • FIG. 1 is a schematic diagram of a process for detecting a failure of a commodity template according to an embodiment of the present invention, the process comprising the following steps:
  • S101 Obtain a uniform resource locator URL of the webpage to be detected, and identify each product template included in the webpage.
  • the website In order to facilitate the user to edit the content of the webpage, the website generally provides the user with a lot of product templates, and the user can select the product template that he needs according to the needs. Therefore, generally, a plurality of product templates are included in the webpage, such as a title template carrying title information, a price template carrying price information, a freight template carrying freight information, a picture template carrying picture information, an evaluation template carrying evaluation information, and the like.
  • each product template included in each webpage is first identified, and the identified product template may include one, several, and a dozen. , determined by the diversity of content presented on the web page.
  • the content information included in the webpage needs to be obtained at the corresponding location of the webpage for the location of each identified product template. For example, a total of three templates are identified in a webpage as a title template, a price template, and a shipping template. After each product template is identified, the content information included in the corresponding location of the web page is obtained at a corresponding position in the webpage.
  • S103 Determine, according to the identification information of the product template, the detection parameter of the product template for each product template identified in the webpage.
  • step S104 Match the detection parameter of the product template with the acquired content information of the webpage. If the matching is successful, proceed to step S105; otherwise, proceed to step S106.
  • each web page contains multiple product templates, the types of each product template are different, and the matching detection parameters corresponding to different product templates are different. Therefore, when the product template and the content information corresponding to each product template are identified, in order to detect whether the product template is invalid, it is determined according to the detection parameter of the product template.
  • the corresponding detection parameter is set for each product template, and the corresponding relationship between the identification information of the product template and the detection parameter may be specifically saved.
  • the type of the product template can be determined, so that the identification information of each product template can be determined, according to the identification information of the product template, and the saved Corresponding relationship, the detection parameter corresponding to the product template can be determined.
  • the detection parameter may be matched with the corresponding content information, and whether the product template is invalid according to whether the detection parameter matches the corresponding content information.
  • step S105 Determine that the product template is valid, and then proceed to step S107.
  • step S106 Determine that the commodity template is invalid, and then proceed to step S107.
  • step S107 Determine whether the product template is the last product template to be detected of the webpage. When the determination result is yes, proceed to step S108; otherwise, proceed to step S103.
  • S108 The product template failure detection for the webpage ends, and it is detected whether the commodity template of the next webpage is invalid.
  • the product template is detected to determine whether the product template is invalid, thereby realizing the failure detection of the product template.
  • the automation improves the detection efficiency and accuracy of the failure of the product template.
  • a representative webpage is selected as the detection webpage, and the webpage is selected as the basis for the failure detection of the commodity template, and the selection is performed periodically.
  • the product template of the web page is detected.
  • FIG. 2 is a schematic diagram of a URL set of a webpage for detecting according to an embodiment of the present invention.
  • FIG. 2 is a test for a website (test set name), and a webpage for detecting is selected in the webpage, and the webpage to be detected is to be detected.
  • the URL is entered into the detection device as shown in FIG. 2.
  • the URL of the webpage input to the detecting apparatus may be modified as needed, or operations such as deleting, adding, etc. may be performed.
  • each webpage to be detected is determined, the URL of the webpage is obtained, and each merchandise template included in the webpage is matched by using a regular method or an Xpach method.
  • the process of matching the product template in the webpage by using the regular method or the Xpach method belongs to the prior art, and the process is not described herein. It is believed that those skilled in the art can determine the specific embodiment according to the description of the present invention.
  • the detection parameter corresponding to each merchandise template After obtaining each product template included in the webpage for each webpage to be detected, first determining the detection parameter corresponding to each merchandise template according to the identification information of each merchandise template, and then obtaining the merchandise template in the webpage.
  • Corresponding content information Specifically, when the content information corresponding to the product template is obtained in the webpage, the content information corresponding to the product template may be obtained according to the identified location of the product template. Or, after obtaining each product template included in the webpage, first obtaining content information corresponding to the product template in the webpage, and then determining detection parameters corresponding to each product template according to the identification information of each product template.
  • the acquisition order of the two may be limited according to the above manner, as long as the detection parameter and the content information are acquired before detecting whether the commodity template is invalid. .
  • each product template When detecting whether a product template is invalid, there may be a lot of product templates included in a web page. When testing is performed once, each product template may be detected, or a product template that needs to be detected may be set as needed, that is, each product template may be separately detected during each detection process.
  • FIG. 3 is an information diagram of a product template failure detection for a certain webpage according to an embodiment of the present invention.
  • the product template of the webpage includes: a name template, a price template, a picture template, a navigation template 1, 2, and the like, and the detection parameters corresponding to each product template are as shown in FIG. 3, and the detection parameter corresponding to the name template is name information.
  • the detection parameter corresponding to the price template is price information
  • the detection parameter corresponding to the image template is image information
  • the detection parameter corresponding to the navigation template is navigation (nav) information.
  • a name template, a price template, a picture template, and a navigation template are selected for the webpage, that is, whether the name template, the price template, the image template, and the navigation template in the webpage are invalid.
  • the detection parameter corresponding to the product template is determined for each product template, and in order to effectively implement the automatic detection of the product template, the detection of the product template is determined according to the identification information of the product template.
  • the parameters include:
  • the product template is a title template according to the identification information of the product template, determining that the detection parameter corresponding to the title template is text information;
  • the product template is a price template according to the identification information of the product template, determining that the detection parameter corresponding to the price template is digital information;
  • the detection parameter corresponding to the picture template is picture information.
  • the detection parameter of the product template is matched with the corresponding content information in the webpage, and the product template is invalid according to whether the matching is successful.
  • the detection parameter of the product template is matched with the obtained content information of the webpage, and the matching succeeds: when the product template is a title template, determining whether the acquired content information of the webpage contains text information, when When the obtained content information of the webpage contains text information, it is determined that the matching is successful, and the product template is valid; when the product template is a price template, it is determined whether the acquired content information of the webpage contains digital information, when acquired When the content information contained in the webpage contains the digital information, it is determined that the matching is successful, and the product template is valid; when the product template is the image template, it is determined whether the obtained content information of the webpage contains the image information, and the obtained webpage is obtained.
  • the included content information contains image information, it is determined that the matching is successful, and the product template is valid.
  • the detection parameter corresponding to the title template is text information, because the title should be displayed in the form of text, so the matching in the webpage is matched. Whether the content information contained in the corresponding location contains text information, and the content information includes text The information is successfully matched, indicating that the user can edit the information through the title template, and the title template is valid.
  • the detection parameter corresponding to the price template is digital information, because the price is generally represented by a number, so matching whether the content information contained in the corresponding position in the webpage contains digital information, when If the content information contains digital information, the matching is successful, and the price template is valid.
  • the user For a picture template, the user generally edits the picture information in the picture template. Therefore, the detection parameter corresponding to the picture template is picture information, and the content information corresponding to the corresponding location in the web page is included in the content information, and the content information is included in the content information. If there is a picture information, the match is successful and the picture template is valid.
  • each product template identified in the web page can be detected.
  • the method further includes: determining whether the failed product template is important or not The templates in the product template library are the same; when the failed product template is the same as the template in the important product template library, an alarm message is issued.
  • the product template when detecting a product template failure, it is determined whether the product template is an important template.
  • an alarm message is sent to provide an administrator for processing to prevent the online product from being removed.
  • an important product template library may be disposed in the detecting device, where information of the important product template may be saved, and when a certain product template is detected to be invalid, determining whether the invalid product template is an important template according to the important product template library To determine if an alarm is issued.
  • the failure information of the product template is recorded in the work log, so that the management can consult later.
  • FIG. 4A and FIG. 4B are schematic diagrams showing test results after testing a product template for each webpage according to an embodiment of the present invention, and showing whether an important product template is detected when detecting a product template for each webpage. Whether an alarm message is issued for an important product template. For example, in the detection of the product template in the first five web pages in FIG. 4A, the problem that the important product template is invalid is detected, and the mouse is moved to the chart corresponding to the alarm result, and the specific product template invalidation information is output. The display information of the navigation template 2 is disabled as shown in FIG. 4B. In the latter two web pages in FIG.
  • 4C is a schematic diagram of a detailed implementation process for detecting a failure of a commodity template according to an embodiment of the present invention, where the process includes the following steps:
  • S401 Acquire a uniform resource locator URL of the webpage to be detected, and identify each product template included in the webpage.
  • step S404 Matching the detection parameter of the product template with the acquired content information of the webpage, and if the matching is successful, proceeding to step S405; otherwise, proceeding to step S406.
  • step S407 Determine whether the failed product template is the same as the template in the important product template library. If the determination result is yes, proceed to step S408; otherwise, proceed to step S409.
  • S408 Determine that the product template is an important product template, and issue an alarm message.
  • S409 Determine the product template non-important product template, and record the information that the product template is invalid.
  • the detection template corresponding to the product template, and the information contained in the location of the product template in the webpage the commodity template is detected, thereby determining whether the commodity template is invalid, thereby realizing the failure detection of the commodity template. Automation improves the detection efficiency and accuracy of product template failure.
  • FIG. 5 is a schematic structural diagram of an apparatus for detecting a failure of a commodity template according to an embodiment of the present invention, where the apparatus includes:
  • the identification module 51 is configured to obtain a uniform resource locator of the webpage to be detected, and identify each product template included in the webpage;
  • the obtaining module 52 is configured to obtain, for each identified product template, the content information included in the webpage according to the location of the product template in the webpage;
  • the matching detection module 53 is configured to: according to the identification information of the commodity module, determine and match the detection parameter of the product template with the acquired content information of the webpage; when the matching is successful, determine that the commodity template is valid; otherwise, Make sure the item template is invalid.
  • the identification module 51 is specifically configured to identify each product template included in the webpage by using a regular method.
  • the device when detecting the failure of the important product template, in order to reduce the loss of the user and improve the experience of the product template, the device further includes:
  • the alarm module 54 is configured to determine whether the failed product template is the same as the template in the important product template library after the matching detection module detects the failure of the product template; and when the invalid product template is the same as the template in the important product template library, Alarm information.
  • the matching detection module 53 is specifically configured to determine the detection parameter corresponding to the title template when the product template is determined as the title template according to the identification information of the product template. Is text information; when the product template is determined according to the identification information of the product template When the price template is a price template, the detection parameter corresponding to the price template is determined as digital information. When the product template is determined as the image template according to the identification information of the product template, the detection parameter corresponding to the image template is determined as the picture information.
  • the matching detection module 53 is specifically configured to: when the product template is a title template, determine whether the acquired content information included in the webpage contains text information, when acquired When the content information contained in the webpage contains text information, it is determined that the matching is successful; when the product template is a price template, it is determined whether the obtained content information contained in the webpage contains digital information, and the acquired content information of the webpage is included in the content information. When the digital information is included, it is determined that the matching is successful; when the product template is a picture template, it is determined whether the obtained content information included in the webpage contains image information, and when the acquired content information of the webpage contains image information, the matching is determined. success.
  • An embodiment of the present invention provides a method and a device for detecting a failure of a product template.
  • the method identifies each product template included in the web page in the web page to be detected, according to the detection parameter corresponding to the product template, and in the page.
  • the obtained template matches the content information included in the location, and when the matching is unsuccessful, it determines that the product template is invalid.
  • the product template is detected for the detection parameter corresponding to the product template, and the content information included in the position of the product template in the webpage, the product template is detected to determine whether the product template is invalid, thereby realizing the failure detection of the product template.
  • the automation improves the detection efficiency and accuracy of the failure of the product template.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be provided by the same, equivalent or similar purpose, unless stated otherwise. An alternative feature to replace.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the device or device in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 6 illustrates a computing device that can implement a detection of a commodity template failure in accordance with the present invention.
  • the computing device conventionally includes a processor 610 and a computer program product or computer readable medium in the form of a memory 620.
  • the memory 620 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 620 has a memory space 630 for program code 631 for performing any of the method steps described above.
  • storage space 630 for program code may include various program code 631 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 620 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 631', ie, code readable by a processor, such as 610, that when executed by a computing device causes the computing device to perform each of the methods described above step.

Abstract

Embodiments of the present invention provide a method and an apparatus for detecting invalid commodity templates, which are used for solving problems in prior art that a method for detecting invalid commodity templates is low in efficiency and poor in accuracy and that online commodities are taken off shelves in a large area. The method comprises: on a web page to be detected, identifying each commodity template contained on the web page; performing matching based on a detection parameter corresponding to the commodity template and content information contained in a position corresponding to the template obtained from the page; and when the matching fails, determining that the commodity template is invalid. The embodiments of the present invention also provide an apparatus for detecting invalid commodity templates. Because the embodiments of the present invention detect the commodity template based on the detection parameter corresponding to the commodity template and the content information contained in the position of the commodity template on the web page, and thus determine whether the commodity template is invalid, invalid commodity template detection can be performed automatically, which improves efficiency and accuracy of the invalid commodity template detection.

Description

一种检测商品模板失效的方法及装置Method and device for detecting failure of commodity template 技术领域Technical field
本发明涉及电子商务技术领域,尤其涉及一种检测商品模板失效的方法及装置。The present invention relates to the field of electronic commerce technologies, and in particular, to a method and apparatus for detecting a failure of a commodity template.
背景技术Background technique
随着电商网站的不断发展,网络上充斥着海量的商品。用户在将商品的信息上传到网站中时,往往依赖于商品模板。商品模板可以有效的减少用户在进行商品信息录入时的工作量,避免用户的重复性操作。当一个域名下有多个商品模板时,商品模板的相关数据会成几何级数增长,因此做好商品模板的监控工作具有非常重要的意义。With the continuous development of e-commerce websites, the network is full of huge quantities of goods. When users upload information about a product to a website, they often rely on the product template. The product template can effectively reduce the workload of the user when entering the product information, and avoid the repetitive operation of the user. When there are multiple product templates under a domain name, the relevant data of the product template will grow geometrically, so it is very important to monitor the product templates.
现有技术中,工作人员会定期的对商品模板进行检测,通过人工方式判断商品模板是否失效。因为在商品模板的检测过程中完全依赖人工方式,并且检测的过程中工作量比较大,检测效率和正确性很大程度上依赖工作人员的熟练程度和工作经验,因为没办法保证检测的准确性,另外检测的效率也很低,没办法达到精准实时检测的目的。因此现有技术中的商品模板的失效检测方式效率低、精准性差,可能会因为商品模板检测的上述问题,导致线上商品的大面积下架。In the prior art, the staff member periodically checks the product template and manually determines whether the product template is invalid. Because the manual method is completely dependent on the detection process of the product template, and the workload in the process of detection is relatively large, the detection efficiency and correctness largely depend on the proficiency and work experience of the staff, because there is no way to ensure the accuracy of the test. In addition, the efficiency of the detection is also very low, and there is no way to achieve accurate real-time detection. Therefore, the failure detection method of the commodity template in the prior art has low efficiency and poor precision, and may cause a large area of the online product to be unloaded due to the above-mentioned problem of the product template detection.
发明内容Summary of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决或者减缓上述问题的检测商品模板失效的方法和相应的装置。In view of the above problems, the present invention has been made in order to provide a method and corresponding apparatus for detecting a failure of a commodity form that overcomes the above problems or at least partially solves or alleviates the above problems.
根据本发明的一个方面,提供了一种检测商品模板失效的方法,包括:According to one aspect of the invention, a method of detecting a failure of a commodity template is provided, comprising:
获取待检测网页的统一资源定位符,识别该网页包含的每个商品模板;Obtaining a uniform resource locator of the webpage to be detected, and identifying each product template included in the webpage;
针对识别出的每个商品模板,根据在网页中识别出该商品模板的位置,在该网页中的相应位置获取该网页包含的内容信息;And identifying, according to the location of the product template in the webpage, the content information included in the webpage in the corresponding location in the webpage;
根据所述商品模板的标识信息,确定该商品模板的检测参数,并将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配;Determining, according to the identification information of the product template, the detection parameter of the product template, and matching the detection parameter of the product template with the acquired content information of the webpage;
当匹配成功时,确定该商品模板有效,否则,确定该商品模板失效。When the matching is successful, it is determined that the commodity template is valid, otherwise, the commodity template is determined to be invalid.
较佳地,为了提高模板识别的效率,从而提高模板失效检测的效率。所述识别该网页包含的每个商品模板包括:Preferably, in order to improve the efficiency of template recognition, the efficiency of template failure detection is improved. The identifying each product template included in the webpage includes:
采用正则方法,识别该网页包含的每个商品模板。 A regular method is used to identify each product template contained in the web page.
较佳地,在检测重要商品模板失效时,为了能够降低用户的损失,提高商品模板的体验度,所述确定该商品模板失效后,所述方法还包括:Preferably, when detecting the failure of the important product template, in order to reduce the user's loss and improve the experience of the product template, the method further includes:
判断该失效的商品模板是否与重要商品模板库中的模板相同;Determining whether the expired product template is the same as the template in the important product template library;
当失效的商品模板与重要商品模板库中的模板相同时,发出报警信息。An alarm message is issued when the expired item template is the same as the template in the important item template library.
较佳地,为了有效的实现商品模板检测自动化,根据所述商品模块的标识信息,确定该商品模板的检测参数包括:Preferably, in order to effectively implement the automatic detection of the product template, determining the detection parameters of the product template according to the identification information of the commodity module includes:
当根据所述商品模板的标识信息,确定该商品模板为标题模板时,确定该标题模板对应的检测参数为文字信息;When it is determined that the product template is a title template according to the identification information of the product template, determining that the detection parameter corresponding to the title template is text information;
当根据所述商品模板的标识信息,确定该商品模板为价格模板时,确定该价格模板对应的检测参数为数字信息;When it is determined that the product template is a price template according to the identification information of the product template, determining that the detection parameter corresponding to the price template is digital information;
当根据所述商品模板的标识信息,确定该商品模板为图片模板时,确定该图片模板对应的检测参数为图片信息。When it is determined that the product template is a picture template according to the identifier information of the product template, it is determined that the detection parameter corresponding to the picture template is picture information.
较佳地,为了有效的实现商品模板检测自动化,所述将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配,匹配成功包括:Preferably, in order to effectively implement the automatic detection of the product template, the detection parameter of the product template is matched with the obtained content information of the webpage, and the matching success comprises:
当该商品模板为标题模板时,判断获取的该网页包含的内容信息中是否含有文字信息,当获取的该网页包含的内容信息中含有文字信息时,确定匹配成功;When the product template is a title template, it is determined whether the obtained content information included in the webpage contains text information, and when the acquired content information included in the webpage contains text information, it is determined that the matching is successful;
当该商品模板为价格模板时,判断获取的该网页包含的内容信息中是否含有数字信息,当获取的该网页包含的内容信息中含有数字信息时,确定匹配成功;When the product template is a price template, it is determined whether the acquired content information contained in the webpage contains digital information, and when the obtained content information contained in the webpage contains digital information, it is determined that the matching is successful;
当该商品模板为图片模板时,判断获取的该网页包含的内容信息中是否含有图片信息,当获取的该网页包含的内容信息中含有图片信息时,确定匹配成功。When the product template is a picture template, it is determined whether the acquired content information included in the webpage contains image information, and when the obtained content information included in the webpage contains image information, it is determined that the matching is successful.
根据本发明的另一个方面,提供了一种检测商品模板失效的装置,包括:According to another aspect of the present invention, an apparatus for detecting a failure of a commodity template is provided, comprising:
识别模块,用于获取待检测网页的统一资源定位符,识别该网页包含的每个商品模板;An identification module, configured to acquire a uniform resource locator of the webpage to be detected, and identify each product template included in the webpage;
获取模块,用于针对识别出的每个商品模板,根据在网页中识别出该商品模板的位置,在该网页中的相应位置获取该网页包含的内容信息;An obtaining module, configured to obtain, according to the location of the product template in the webpage, the content information included in the webpage according to the location of the product template in the webpage;
匹配检测模块,用于根据所述商品模块的标识信息,确定并将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配;当匹配成功时,确定该商品模板有效,否则,确定该商品模板失效。The matching detection module is configured to: according to the identification information of the commodity module, determine and match the detection parameter of the product template with the acquired content information of the webpage; when the matching is successful, determine that the commodity template is valid, otherwise, determine The item template is invalid.
较佳地,为了提高模板识别的效率,从而提高模板失效检测的效率。所述识别模块,具体用于采用正则方法,识别该网页包含的每个商品模板。Preferably, in order to improve the efficiency of template recognition, the efficiency of template failure detection is improved. The identification module is specifically configured to identify each product template included in the webpage by using a regular method.
较佳地,在检测重要商品模板失效时,为了能够降低用户的损失,提高商品模板的体验度,所述装置还包括: Preferably, when detecting the failure of the important product template, in order to reduce the loss of the user and improve the experience of the product template, the device further includes:
告警模块,用于确定匹配检测模块检测商品模板失效后,判断该失效的商品模板是否与重要商品模板库中的模板相同;当失效的商品模板与重要商品模板库中的模板相同时,发出报警信息。The alarm module is configured to determine whether the failed product template is the same as the template in the important product template library after the matching detection module detects the failure of the commodity template; and issue an alarm when the failed product template is the same as the template in the important product template library; information.
较佳地,为了有效的实现商品模板检测自动化,所述匹配检测模块,具体用于当根据所述商品模板的标识信息,确定该商品模板为标题模板时,确定该标题模板对应的检测参数为文字信息;当根据所述商品模板的标识信息,确定该商品模板为价格模板时,确定该价格模板对应的检测参数为数字信息;当根据所述商品模板的标识信息,确定该商品模板为图片模板时,确定该图片模板对应的检测参数为图片信息。Preferably, in order to effectively implement the automatic detection of the product template, the matching detection module is specifically configured to: when determining the product template as the title template according to the identification information of the product template, determining that the detection parameter corresponding to the title template is a text information; when determining that the product template is a price template according to the identification information of the product template, determining that the detection parameter corresponding to the price template is digital information; and determining the product template as a picture according to the identification information of the product template When the template is used, it is determined that the detection parameter corresponding to the image template is picture information.
较佳地,为了有效的实现商品模板检测自动化,所述匹配检测模块,具体用于当该商品模板为标题模板时,判断获取的该网页包含的内容信息中是否含有文字信息,当获取的该网页包含的内容信息中含有文字信息时,确定匹配成功;当该商品模板为价格模板时,判断获取的该网页包含的内容信息中是否含有数字信息,当获取的该网页包含的内容信息中含有数字信息时,确定匹配成功;当该商品模板为图片模板时,判断获取的该网页包含的内容信息中是否含有图片信息,当获取的该网页包含的内容信息中含有图片信息时,确定匹配成功。Preferably, in order to effectively implement the automatic detection of the product template, the matching detection module is specifically configured to: when the product template is a title template, determine whether the acquired content information included in the webpage contains text information, and when the acquired When the content information contained in the webpage contains text information, it is determined that the matching is successful; when the product template is a price template, it is determined whether the obtained content information of the webpage contains digital information, and the acquired content information included in the webpage is included When the digital information is used, it is determined that the matching is successful; when the product template is a picture template, it is determined whether the obtained content information included in the webpage contains image information, and when the obtained content information of the webpage contains image information, the matching is determined to be successful. .
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行上述的检测商品模板失效的方法。According to still another aspect of the present invention, a computer program is provided, comprising computer readable code, when the computer readable code is run on a computing device, causing the computing device to perform the method of detecting a commodity template failure described above .
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了如上述的计算机程序。According to still another aspect of the present invention, a computer readable medium storing a computer program as described above is provided.
本发明的有益效果为:The beneficial effects of the invention are:
本发明实施例提供了一种检测商品模板失效的方法及装置,该方法在待检测的网页中,识别出该网页包含的每个商品模板,根据该商品模板对应的检测参数,及在页面中获取的该模板对应位置包含的内容信息进行匹配,当匹配不成功时,确定该商品模板失效。由于在本发明实施例中针对商品模板对应的检测参数,及网页中该商品模板的位置包含的内容信息,对商品模板进行检测,以此来判断商品模板是否失效,从而实现了商品模板失效检测的自动化,提高了商品模板失效的检测效率及精确性。An embodiment of the present invention provides a method and a device for detecting a failure of a product template. The method identifies each product template included in the web page in the web page to be detected, according to the detection parameter corresponding to the product template, and in the page. The obtained template matches the content information included in the location, and when the matching is unsuccessful, it determines that the product template is invalid. In the embodiment of the present invention, for the detection parameter corresponding to the product template, and the content information included in the position of the product template in the webpage, the product template is detected to determine whether the product template is invalid, thereby realizing the failure detection of the product template. The automation improves the detection efficiency and accuracy of the failure of the product template.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。 The above description is only an overview of the technical solutions of the present invention, and the above-described and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below.
附图说明DRAWINGS
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图1为本发明实施例提供的一种检测商品模板失效过程示意图;1 is a schematic diagram of a process for detecting a failure of a commodity template according to an embodiment of the present invention;
图2为本发明实施例提供的进行检测的网页的URL集合的示意图;2 is a schematic diagram of a URL set of a webpage for detecting according to an embodiment of the present invention;
图3为本发明实施例提供的针对某一网页进行商品模板失效检测的信息图;FIG. 3 is an information diagram of performing product template failure detection for a certain webpage according to an embodiment of the present invention;
图4A、图4B为本发明实施例提供的针对每个网页的商品模板进行测试后的测试结果示意图;FIG. 4A and FIG. 4B are schematic diagrams showing test results after testing a product template for each webpage according to an embodiment of the present invention; FIG.
图4C为本发明实施例提供的检测商品模板失效的详细实施过程示意图;4C is a schematic diagram of a detailed implementation process for detecting a failure of a commodity template according to an embodiment of the present invention;
图5为本发明实施例提供的一种检测商品模板失效的装置结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for detecting a failure of a commodity template according to an embodiment of the present invention; FIG.
图6示意性地示出了用于执行根据本发明的检测商品模板失效的方法的计算设备的框图;以及Figure 6 is a schematic block diagram of a computing device for performing a method of detecting a failure of a merchandise template in accordance with the present invention;
图7示意性地示出了用于保持或者携带实现根据本发明的检测商品模板失效的方法的程序代码的存储单元。Fig. 7 schematically shows a storage unit for holding or carrying program code implementing a method of detecting a failure of a commodity template according to the present invention.
具体实施方式detailed description
下面结合附图和具体的实施方式对本发明作进一步的描述。The invention is further described below in conjunction with the drawings and specific embodiments.
商品模板是使用在商品描述介绍中的模板,一般都是设计好后提供给用户使用的一大篇代码,也就是html代码。商品模板只显示在产品的介绍页面,无论什么用户都可以使用,没有限制。一般商品模板中包含的信息为展示信息、描述信息、邮资说明信息等。在网页中使用商品模板,一般是在网站中直接调用,在添加商品的时候,只要对商品模板中的内容进行相应的修改就可以,无需下载编辑,因此采用商品模板可以减少用户的工作量,提高用户信息发布的效率。The product template is a template used in the description of the product description, which is generally a large piece of code that is designed and provided to the user, that is, the html code. Product templates are only displayed on the product's introduction page, no matter what users can use, no restrictions. The information contained in the general product template is display information, description information, postage description information, and the like. The use of product templates in web pages is generally called directly in the website. When adding products, as long as the content in the product template is modified accordingly, there is no need to download and edit, so the use of the product template can reduce the workload of the user. Improve the efficiency of user information distribution.
为了提高商品模板失效的检测效率,提高商品模板失效检测的精确性,避免商品模板失效检测的不及时性导致的线上商品的大面积下架问题,本发明实施例提供了一种检测商品模板失效的方法及装置。In order to improve the detection efficiency of the product template failure, improve the accuracy of the product template failure detection, and avoid the large-area off-line problem of the online product caused by the untimely detection of the failure of the product template, the embodiment of the present invention provides a product template for detecting the product. Method and device for failure.
下面结合说明书附图,对本发明实施例进行详细说明。The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
图1为本发明实施例提供的一种检测商品模板失效过程示意图,该过程包括以下步骤: FIG. 1 is a schematic diagram of a process for detecting a failure of a commodity template according to an embodiment of the present invention, the process comprising the following steps:
S101:获取待检测网页的统一资源定位符URL,识别该网页包含的每个商品模板。S101: Obtain a uniform resource locator URL of the webpage to be detected, and identify each product template included in the webpage.
为了方便用户进行网页内容的编辑,网站一般会提供给用户很多商品模板,用户可以根据需要选择自身需要的商品模板。因此一般在网页中包含有多个商品模板,比如承载标题信息的标题模板,承载价格信息的价格模板,承载运费信息的运费模板、承载图片信息的图片模板,承载评价信息的评价模板等等。In order to facilitate the user to edit the content of the webpage, the website generally provides the user with a lot of product templates, and the user can select the product template that he needs according to the needs. Therefore, generally, a plurality of product templates are included in the webpage, such as a title template carrying title information, a price template carrying price information, a freight template carrying freight information, a picture template carrying picture information, an evaluation template carrying evaluation information, and the like.
在本发明实施例中对商品模板是否失效进行检测时,针对每个网页,首先识别出每个网页包含的每个商品模板,识别出的商品模板可能包括一个、几个、十几个不等,由网页呈现内容的多样性来决定。In the embodiment of the present invention, when the product template is invalidated, for each webpage, each product template included in each webpage is first identified, and the identified product template may include one, several, and a dozen. , determined by the diversity of content presented on the web page.
S102:针对识别出的每个商品模板,根据在网页中识别出该商品模板的位置,在该网页中的相应位置获取该网页包含的内容信息。S102: For each identified product template, the content information included in the webpage is obtained at a corresponding location in the webpage according to the location of the product template identified in the webpage.
当在网页中识别出网页包含的每个商品模板后,为了对商品模板是否失效进行检测,需要确定网页中该商品模板对应的位置的内容信息,是否与该商品模板对应的检测参数匹配。因此,在本发明实施例中需要针对识别出的每个商品模板的位置,在网页的相应位置获取该网页包含的内容信息。例如,在某一网页中共识别出三个模板分别为标题模板、价格模板和运费模板,识别出每个商品模板后,在网页中的相应位置获取该网页在每个相应位置包含的内容信息。After the product template included in the webpage is identified in the webpage, in order to detect whether the merchandise template is invalid, it is necessary to determine whether the content information of the location corresponding to the merchandise template in the webpage matches the detection parameter corresponding to the merchandise template. Therefore, in the embodiment of the present invention, the content information included in the webpage needs to be obtained at the corresponding location of the webpage for the location of each identified product template. For example, a total of three templates are identified in a webpage as a title template, a price template, and a shipping template. After each product template is identified, the content information included in the corresponding location of the web page is obtained at a corresponding position in the webpage.
S103:针对在该网页中识别出的每个商品模板,根据所述商品模板的标识信息,确定该商品模板的检测参数。S103: Determine, according to the identification information of the product template, the detection parameter of the product template for each product template identified in the webpage.
S104:将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配,当匹配成功时,进行步骤S105,否则,进行步骤S106。S104: Match the detection parameter of the product template with the acquired content information of the webpage. If the matching is successful, proceed to step S105; otherwise, proceed to step S106.
由于每个网页中包含多个商品模板,每个商品模板的类型不同,而不同的商品模板对应的匹配检测参数也不同。因此当识别出了商品模板和每个商品模板对应的内容信息时,为了检测商品模板是否失效,需要根据商品模板的检测参数来确定。Since each web page contains multiple product templates, the types of each product template are different, and the matching detection parameters corresponding to different product templates are different. Therefore, when the product template and the content information corresponding to each product template are identified, in order to detect whether the product template is invalid, it is determined according to the detection parameter of the product template.
具体的,为了方便对每个商品模板进行检测,在本发明实施例中针对每个商品模板,设置了其对应的检测参数,具体的可以保存商品模板的标识信息与检测参数的对应关系。当在网页中识别出其包含的商品模板后,根据商品模板编写时的方法,可以确定商品模板的类型,从而可以确定每个商品模板的标识信息,根据该商品模板的标识信息,及保存的对应关系,可以确定该商品模板对应的检测参数。确定了商品模板的检测参数后,可以采用该检测参数与对应的内容信息进行匹配,根据检测参数与对应的内容信息是否匹配,确定该商品模板是否失效。Specifically, in order to facilitate the detection of each product template, in the embodiment of the present invention, the corresponding detection parameter is set for each product template, and the corresponding relationship between the identification information of the product template and the detection parameter may be specifically saved. After identifying the product template included in the webpage, according to the method of writing the product template, the type of the product template can be determined, so that the identification information of each product template can be determined, according to the identification information of the product template, and the saved Corresponding relationship, the detection parameter corresponding to the product template can be determined. After the detection parameter of the product template is determined, the detection parameter may be matched with the corresponding content information, and whether the product template is invalid according to whether the detection parameter matches the corresponding content information.
S105:确定该商品模板有效,之后进行步骤S107。 S105: Determine that the product template is valid, and then proceed to step S107.
S106:确定该商品模板失效,之后进行步骤S107。S106: Determine that the commodity template is invalid, and then proceed to step S107.
S107:判断该商品模板是否为该网页的待检测的最后一个商品模板,当判断结果为是时,进行步骤S108,否则,进行步骤S103。S107: Determine whether the product template is the last product template to be detected of the webpage. When the determination result is yes, proceed to step S108; otherwise, proceed to step S103.
S108:针对该网页的商品模板失效检测结束,检测下一网页的商品模板是否失效。S108: The product template failure detection for the webpage ends, and it is detected whether the commodity template of the next webpage is invalid.
由于在本发明实施例中针对商品模板对应的检测参数,及网页中该商品模板的位置包含的内容信息,对商品模板进行检测,以此来判断商品模板是否失效,从而实现了商品模板失效检测的自动化,提高了商品模板失效的检测效率及精确性。In the embodiment of the present invention, for the detection parameter corresponding to the product template, and the content information included in the position of the product template in the webpage, the product template is detected to determine whether the product template is invalid, thereby realizing the failure detection of the product template. The automation improves the detection efficiency and accuracy of the failure of the product template.
在对商品模板是否失效进行检测时,可以针对网站中的每个网页分别进行,但是网站中可能很多用户的网页都是基于相同的商品模板编辑的。因此为了减少商品模板失效检测的工作量,提高商品模板失效检测效率,在本发明实施例中选择具有代表性的网页作为检测的网页,将选择网页作为进行商品模板失效检测的基础,定期对选择网页的商品模板进行检测。When detecting whether a product template is invalid, it can be performed separately for each webpage in the website, but many users' webpages in the website may be edited based on the same product template. Therefore, in order to reduce the workload of the product template failure detection and improve the efficiency of the product template failure detection, in the embodiment of the present invention, a representative webpage is selected as the detection webpage, and the webpage is selected as the basis for the failure detection of the commodity template, and the selection is performed periodically. The product template of the web page is detected.
图2为本发明实施例提供的进行检测的网页的URL集合的示意图,图2中针对某一网站(测试集名)进行测试,在该网站中选择出了进行检测的网页,将待检测网页的URL输入到检测装置中,如图2所示。在具体进行检测时,可以根据需要对输入到检测装置中的网页的URL进行修改操作,或者可以进行删除、添加等操作。FIG. 2 is a schematic diagram of a URL set of a webpage for detecting according to an embodiment of the present invention. FIG. 2 is a test for a website (test set name), and a webpage for detecting is selected in the webpage, and the webpage to be detected is to be detected. The URL is entered into the detection device as shown in FIG. 2. When the detection is specifically performed, the URL of the webpage input to the detecting apparatus may be modified as needed, or operations such as deleting, adding, etc. may be performed.
确定了每个待检测的网页后,获取该网页的URL,采用正则方法或Xpach方法,匹配出该网页中包含的每个商品模板。采用正则方法或Xpach方法,在网页中匹配出商品模板的过程属于现有技术,在此不对该过程进行说明,相信本领域技术人员,可以根据本发明的描述,确定具体的实施方式。After each webpage to be detected is determined, the URL of the webpage is obtained, and each merchandise template included in the webpage is matched by using a regular method or an Xpach method. The process of matching the product template in the webpage by using the regular method or the Xpach method belongs to the prior art, and the process is not described herein. It is believed that those skilled in the art can determine the specific embodiment according to the description of the present invention.
针对每个待检测的网页,获取了该网页包含的每个商品模板后,首先根据每个商品模板的标识信息,确定每个商品模板对应的检测参数,然后再在该网页中获取该商品模板对应的内容信息。具体的,在网页中获取该商品模板对应的内容信息时,可以根据识别出的该商品模板的位置,在网页的对应位置获取该商品模板对应的内容信息。或者,获取了该网页包含的每个商品模板后,首先在该网页中获取该商品模板对应的内容信息,然后根据每个商品模板的标识信息,确定每个商品模板对应的检测参数。After obtaining each product template included in the webpage for each webpage to be detected, first determining the detection parameter corresponding to each merchandise template according to the identification information of each merchandise template, and then obtaining the merchandise template in the webpage. Corresponding content information. Specifically, when the content information corresponding to the product template is obtained in the webpage, the content information corresponding to the product template may be obtained according to the identified location of the product template. Or, after obtaining each product template included in the webpage, first obtaining content information corresponding to the product template in the webpage, and then determining detection parameters corresponding to each product template according to the identification information of each product template.
在获取商品模板对应的检测参数和网页中的对应内容信息时,可以按照上述方式,不限定两者的获取顺序,只要在对商品模板是否失效进行检测之前,获取了检测参数和内容信息即可。When obtaining the detection parameter corresponding to the product template and the corresponding content information in the webpage, the acquisition order of the two may be limited according to the above manner, as long as the detection parameter and the content information are acquired before detecting whether the commodity template is invalid. .
在对商品模板是否失效进行检测时,可能某一网页包含的商品模板很多,在每 次进行检测时,可以针对每个商品模板都进行检测,也可以根据需要设置需要进行检测的商品模板,即在每次检测过程中,可以针对不同的商品模板分别进行检测。When detecting whether a product template is invalid, there may be a lot of product templates included in a web page. When testing is performed once, each product template may be detected, or a product template that needs to be detected may be set as needed, that is, each product template may be separately detected during each detection process.
图3为本发明实施例提供的针对某一网页进行商品模板失效检测的信息图,在该图3中针对待检测的网页,图3中的样例地址,在该待检测的网页中,检测该网页的商品模板包括:名称模板、价格模板、图片模板、导航模板1、2等,并且每个商品模板对应的检测参数如图3所示,名称模板对应的检测参数为名称(name)信息,价格模板对应的检测参数为价格(price)信息,图片模板对应的检测参数为图片(image)信息,导航模板对应的检测参数为导航(nav)信息等。并且在图3中针对该网页选择了名称模板、价格模板、图片模板、导航模板,即检测该网页中的名称模板、价格模板、图片模板、导航模板是否失效。FIG. 3 is an information diagram of a product template failure detection for a certain webpage according to an embodiment of the present invention. In FIG. 3, for a webpage to be detected, the sample address in FIG. 3 is detected in the webpage to be detected. The product template of the webpage includes: a name template, a price template, a picture template, a navigation template 1, 2, and the like, and the detection parameters corresponding to each product template are as shown in FIG. 3, and the detection parameter corresponding to the name template is name information. The detection parameter corresponding to the price template is price information, the detection parameter corresponding to the image template is image information, and the detection parameter corresponding to the navigation template is navigation (nav) information. And in FIG. 3, a name template, a price template, a picture template, and a navigation template are selected for the webpage, that is, whether the name template, the price template, the image template, and the navigation template in the webpage are invalid.
当确定了网页中的每个商品模板,针对每个商品模板,确定该商品模板对应的检测参数,为了有效的实现商品模板检测自动化,根据所述商品模板的标识信息,确定该商品模板的检测参数包括:When each product template in the webpage is determined, the detection parameter corresponding to the product template is determined for each product template, and in order to effectively implement the automatic detection of the product template, the detection of the product template is determined according to the identification information of the product template. The parameters include:
当根据所述商品模板的标识信息,确定该商品模板为标题模板时,确定该标题模板对应的检测参数为文字信息;When it is determined that the product template is a title template according to the identification information of the product template, determining that the detection parameter corresponding to the title template is text information;
当根据所述商品模板的标识信息,确定该商品模板为价格模板时,确定该价格模板对应的检测参数为数字信息;When it is determined that the product template is a price template according to the identification information of the product template, determining that the detection parameter corresponding to the price template is digital information;
当根据所述商品模板的标识信息,确定该商品模板为图片模板时,确定该图片模板对应的检测参数为图片信息。When it is determined that the product template is a picture template according to the identifier information of the product template, it is determined that the detection parameter corresponding to the picture template is picture information.
确定了商品模板的检测参数,并获取了网页中的对应内容信息后,将检测参数与网页中的对应内容信息进行匹配,根据是否匹配成功,以确定商品模板是否失效。具体的将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配,匹配成功包括:当该商品模板为标题模板时,判断获取的该网页包含的内容信息中是否含有文字信息,当获取的该网页包含的内容信息中含有文字信息时,确定匹配成功,该商品模板有效;当该商品模板为价格模板时,判断获取的该网页包含的内容信息中是否含有数字信息,当获取的该网页包含的内容信息中含有数字信息时,确定匹配成功,该商品模板有效;当该商品模板为图片模板时,判断获取的该网页包含的内容信息中是否含有图片信息,当获取的该网页包含的内容信息中含有图片信息时,确定匹配成功,该商品模板有效。After the detection parameter of the product template is determined, and the corresponding content information in the webpage is obtained, the detection parameter is matched with the corresponding content information in the webpage, and the product template is invalid according to whether the matching is successful. Specifically, the detection parameter of the product template is matched with the obtained content information of the webpage, and the matching succeeds: when the product template is a title template, determining whether the acquired content information of the webpage contains text information, when When the obtained content information of the webpage contains text information, it is determined that the matching is successful, and the product template is valid; when the product template is a price template, it is determined whether the acquired content information of the webpage contains digital information, when acquired When the content information contained in the webpage contains the digital information, it is determined that the matching is successful, and the product template is valid; when the product template is the image template, it is determined whether the obtained content information of the webpage contains the image information, and the obtained webpage is obtained. When the included content information contains image information, it is determined that the matching is successful, and the product template is valid.
具体的,在本发明实施例中,当识别出该网页中包含标题模板时,该标题模板对应的检测参数为文字信息,因为作为标题应该是以文字的形式展示的,因此匹配该网页中的对应位置包含的内容信息是否包含文字信息,当该内容信息中包含文字 信息时匹配成功,说明用户能够通过该标题模板进行信息的编辑,该标题模板有效。Specifically, in the embodiment of the present invention, when the title template is included in the webpage, the detection parameter corresponding to the title template is text information, because the title should be displayed in the form of text, so the matching in the webpage is matched. Whether the content information contained in the corresponding location contains text information, and the content information includes text The information is successfully matched, indicating that the user can edit the information through the title template, and the title template is valid.
而当识别出的商品模板为价格模板时,该价格模板对应的检测参数为数字信息,因为价格一般是以数字来表示的,因此匹配该网页中对应位置包含的内容信息是否包含数字信息,当该内容信息中包含数字信息时匹配成功,该价格模板有效。When the identified product template is a price template, the detection parameter corresponding to the price template is digital information, because the price is generally represented by a number, so matching whether the content information contained in the corresponding position in the webpage contains digital information, when If the content information contains digital information, the matching is successful, and the price template is valid.
而对于图片模板,用户一般在图片模板中编辑有图片信息,因此图片模板对应的检测参数为图片信息,匹配该网页中的对应位置的内容信息中是否包含有图片信息,当该内容信息中包含有图片信息时匹配成功,该图片模板有效。For a picture template, the user generally edits the picture information in the picture template. Therefore, the detection parameter corresponding to the picture template is picture information, and the content information corresponding to the corresponding location in the web page is included in the content information, and the content information is included in the content information. If there is a picture information, the match is successful and the picture template is valid.
采用上述方法,可以针对网页中识别出的每个商品模板进行检测。较佳地,在检测重要商品模板失效时,为了能够降低用户的损失,提高商品模板的体验度,所述确定该商品模板失效后,所述方法还包括:判断该失效的商品模板是否与重要商品模板库中的模板相同;当失效的商品模板与重要商品模板库中的模板相同时,发出报警信息。With the above method, each product template identified in the web page can be detected. Preferably, when detecting the failure of the important product template, in order to reduce the loss of the user and improve the experience of the product template, after determining that the product template is invalid, the method further includes: determining whether the failed product template is important or not The templates in the product template library are the same; when the failed product template is the same as the template in the important product template library, an alarm message is issued.
即当检测某一商品模板失效时,判断该商品模板是否为重要模板,当该商品模板为重要模板时,发出报警信息,以提供管理员进行处理,避免线上商品下架。具体的,可以在检测装置中设置有重要商品模板库,在其中可以保存重要商品模板的信息,当检测到某一商品模板失效时,根据该重要商品模板库确定该失效商品模板是否为重要模板,从而确定是否报警。当该商品模板非重要模板时,在工作日志中记录该商品模板的失效信息,以便管理人员后期查阅。That is, when detecting a product template failure, it is determined whether the product template is an important template. When the product template is an important template, an alarm message is sent to provide an administrator for processing to prevent the online product from being removed. Specifically, an important product template library may be disposed in the detecting device, where information of the important product template may be saved, and when a certain product template is detected to be invalid, determining whether the invalid product template is an important template according to the important product template library To determine if an alarm is issued. When the product template is not an important template, the failure information of the product template is recorded in the work log, so that the management can consult later.
图4A、图4B为本发明实施例提供的针对每个网页的商品模板进行测试后的测试结果示意图,在该图中显示了针对每个网页的商品模板进行检测时,是否检测到重要商品模板,针对重要商品模板是否发出了报警信息。例如图4A中在对前5个网页中的商品模板检测时,都检测到其中存在重要商品模板失效的问题,将鼠标移动到报警结果对应的图表处,会输出具体的哪个商品模板失效的信息,如图4B所示的导航模板2失效的显示信息。在图4A中后两个网页中不存在重要商品模板失效的问题,因此在报警结果栏显示的为“×”,并且根据操作栏中记录的“处理”字样可知,已经记录了该网页中每个商品模板的失效情况。FIG. 4A and FIG. 4B are schematic diagrams showing test results after testing a product template for each webpage according to an embodiment of the present invention, and showing whether an important product template is detected when detecting a product template for each webpage. Whether an alarm message is issued for an important product template. For example, in the detection of the product template in the first five web pages in FIG. 4A, the problem that the important product template is invalid is detected, and the mouse is moved to the chart corresponding to the alarm result, and the specific product template invalidation information is output. The display information of the navigation template 2 is disabled as shown in FIG. 4B. In the latter two web pages in FIG. 4A, there is no problem that the important product template is invalid, so the “X” is displayed in the alarm result column, and according to the “processing” recorded in the operation column, it is known that each page in the web page has been recorded. The failure status of the product template.
图4C为本发明实施例提供的检测商品模板失效的详细实施过程示意图,该过程包括以下步骤:4C is a schematic diagram of a detailed implementation process for detecting a failure of a commodity template according to an embodiment of the present invention, where the process includes the following steps:
S401:获取待检测网页的统一资源定位符URL,识别该网页包含的每个商品模板。S401: Acquire a uniform resource locator URL of the webpage to be detected, and identify each product template included in the webpage.
S402:针对识别出的每个商品模板,根据在网页中识别出该商品模板的位置,在该网页中的相应位置获取该网页包含的内容信息。 S402: For each identified product template, the content information included in the webpage is obtained at a corresponding location in the webpage according to the location of the product template identified in the webpage.
S403:针对在该网页中识别出的每个商品模板,根据所述商品模板的标识S403: for each product template identified in the webpage, according to the identifier of the product template
信息,确定该商品模板的检测参数。Information to determine the detection parameters of the product template.
S404:将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配,当匹配成功时,进行步骤S405,否则,进行步骤S406。S404: Matching the detection parameter of the product template with the acquired content information of the webpage, and if the matching is successful, proceeding to step S405; otherwise, proceeding to step S406.
S405:确定该商品模板有效。S405: Determine that the product template is valid.
S406:确定该商品模板失效。S406: Determine that the product template is invalid.
S407:判断该失效的商品模板是否与重要商品模板库中的模板相同,当判断结果为是时,进行步骤S408,否则,进行步骤S409。S407: Determine whether the failed product template is the same as the template in the important product template library. If the determination result is yes, proceed to step S408; otherwise, proceed to step S409.
S408:确定该商品模板为重要商品模板,发出报警信息。S408: Determine that the product template is an important product template, and issue an alarm message.
S409:确定该商品模板非重要商品模板,记录该商品模板失效的信息。S409: Determine the product template non-important product template, and record the information that the product template is invalid.
由于在本发明实施例中针对商品模板对应的检测参数,及网页中该商品模板的位置包含的信息,对商品模板进行检测,以此来判断商品模板是否失效,从而实现了商品模板失效检测的自动化,提高了商品模板失效的检测效率及精确性。In the embodiment of the present invention, the detection template corresponding to the product template, and the information contained in the location of the product template in the webpage, the commodity template is detected, thereby determining whether the commodity template is invalid, thereby realizing the failure detection of the commodity template. Automation improves the detection efficiency and accuracy of product template failure.
图5为本发明实施例提供的一种检测商品模板失效的装置结构示意图,所述装置包括:FIG. 5 is a schematic structural diagram of an apparatus for detecting a failure of a commodity template according to an embodiment of the present invention, where the apparatus includes:
识别模块51,用于获取待检测网页的统一资源定位符,识别该网页包含的每个商品模板;The identification module 51 is configured to obtain a uniform resource locator of the webpage to be detected, and identify each product template included in the webpage;
获取模块52,用于针对识别出的每个商品模板,根据在网页中识别出该商品模板的位置,在该网页中的相应位置获取该网页包含的内容信息;The obtaining module 52 is configured to obtain, for each identified product template, the content information included in the webpage according to the location of the product template in the webpage;
匹配检测模块53,用于根据所述商品模块的标识信息,确定并将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配;当匹配成功时,确定该商品模板有效,否则,确定该商品模板失效。The matching detection module 53 is configured to: according to the identification information of the commodity module, determine and match the detection parameter of the product template with the acquired content information of the webpage; when the matching is successful, determine that the commodity template is valid; otherwise, Make sure the item template is invalid.
较佳地,为了提高模板识别的效率,从而提高模板失效检测的效率。所述识别模块51,具体用于采用正则方法,识别该网页包含的每个商品模板。Preferably, in order to improve the efficiency of template recognition, the efficiency of template failure detection is improved. The identification module 51 is specifically configured to identify each product template included in the webpage by using a regular method.
较佳地,在检测重要商品模板失效时,为了能够降低用户的损失,提高商品模板的体验度,所述装置还包括:Preferably, when detecting the failure of the important product template, in order to reduce the loss of the user and improve the experience of the product template, the device further includes:
告警模块54,用于确定匹配检测模块检测商品模板失效后,判断该失效的商品模板是否与重要商品模板库中的模板相同;当失效的商品模板与重要商品模板库中的模板相同时,发出报警信息。The alarm module 54 is configured to determine whether the failed product template is the same as the template in the important product template library after the matching detection module detects the failure of the product template; and when the invalid product template is the same as the template in the important product template library, Alarm information.
较佳地,为了有效的实现商品模板检测自动化,所述匹配检测模块53,具体用于当根据所述商品模板的标识信息,确定该商品模板为标题模板时,确定该标题模板对应的检测参数为文字信息;当根据所述商品模板的标识信息,确定该商品模板 为价格模板时,确定该价格模板对应的检测参数为数字信息;当根据所述商品模板的标识信息,确定该商品模板为图片模板时,确定该图片模板对应的检测参数为图片信息。Preferably, in order to effectively implement the automatic detection of the product template, the matching detection module 53 is specifically configured to determine the detection parameter corresponding to the title template when the product template is determined as the title template according to the identification information of the product template. Is text information; when the product template is determined according to the identification information of the product template When the price template is a price template, the detection parameter corresponding to the price template is determined as digital information. When the product template is determined as the image template according to the identification information of the product template, the detection parameter corresponding to the image template is determined as the picture information.
较佳地,为了有效的实现商品模板检测自动化,所述匹配检测模块53,具体用于当该商品模板为标题模板时,判断获取的该网页包含的内容信息中是否含有文字信息,当获取的该网页包含的内容信息中含有文字信息时,确定匹配成功;当该商品模板为价格模板时,判断获取的该网页包含的内容信息中是否含有数字信息,当获取的该网页包含的内容信息中含有数字信息时,确定匹配成功;当该商品模板为图片模板时,判断获取的该网页包含的内容信息中是否含有图片信息,当获取的该网页包含的内容信息中含有图片信息时,确定匹配成功。Preferably, in order to effectively implement the automatic detection of the product template, the matching detection module 53 is specifically configured to: when the product template is a title template, determine whether the acquired content information included in the webpage contains text information, when acquired When the content information contained in the webpage contains text information, it is determined that the matching is successful; when the product template is a price template, it is determined whether the obtained content information contained in the webpage contains digital information, and the acquired content information of the webpage is included in the content information. When the digital information is included, it is determined that the matching is successful; when the product template is a picture template, it is determined whether the obtained content information included in the webpage contains image information, and when the acquired content information of the webpage contains image information, the matching is determined. success.
本发明实施例提供了一种检测商品模板失效的方法及装置,该方法在待检测的网页中,识别出该网页包含的每个商品模板,根据该商品模板对应的检测参数,及在页面中获取的该模板对应位置包含的内容信息进行匹配,当匹配不成功时,确定该商品模板失效。由于在本发明实施例中针对商品模板对应的检测参数,及网页中该商品模板的位置包含的内容信息,对商品模板进行检测,以此来判断商品模板是否失效,从而实现了商品模板失效检测的自动化,提高了商品模板失效的检测效率及精确性。An embodiment of the present invention provides a method and a device for detecting a failure of a product template. The method identifies each product template included in the web page in the web page to be detected, according to the detection parameter corresponding to the product template, and in the page. The obtained template matches the content information included in the location, and when the matching is unsuccessful, it determines that the product template is invalid. In the embodiment of the present invention, for the detection parameter corresponding to the product template, and the content information included in the position of the product template in the webpage, the product template is detected to determine whether the product template is invalid, thereby realizing the failure detection of the product template. The automation improves the detection efficiency and accuracy of the failure of the product template.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, the various features of the invention are sometimes grouped together into a single embodiment, in the above description of the exemplary embodiments of the invention, Figure, or a description of it. However, the method disclosed is not to be interpreted as reflecting the intention that the claimed invention requires more features than those recited in the claims. Rather, as the following claims reflect, inventive aspects reside in less than all features of the single embodiments disclosed herein. Therefore, the claims following the specific embodiments are hereby explicitly incorporated into the embodiments, and each of the claims as a separate embodiment of the invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的 的替代特征来代替。Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components. In addition to such features and/or at least some of the processes or units being mutually exclusive, any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined. Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be provided by the same, equivalent or similar purpose, unless stated otherwise. An alternative feature to replace.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features that are included in other embodiments and not in other features, combinations of features of different embodiments are intended to be within the scope of the present invention. Different embodiments are formed and formed. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的设备或者装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of the device or device in accordance with embodiments of the present invention. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
例如,图6示出了可以实现根据本发明的检测商品模板失效的计算设备。该计算设备传统上包括处理器610和以存储器620形式的计算机程序产品或者计算机可读介质。存储器620可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器620具有用于执行上述方法中的任何方法步骤的程序代码631的存储空间630。例如,用于程序代码的存储空间630可以包括分别用于实现上面的方法中的各种步骤的各个程序代码631。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图7所述的便携式或者固定存储单元。该存储单元可以具有与图6的计算设备中的存储器620类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码631’,即可以由例如诸如610之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。For example, Figure 6 illustrates a computing device that can implement a detection of a commodity template failure in accordance with the present invention. The computing device conventionally includes a processor 610 and a computer program product or computer readable medium in the form of a memory 620. The memory 620 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM. Memory 620 has a memory space 630 for program code 631 for performing any of the method steps described above. For example, storage space 630 for program code may include various program code 631 for implementing various steps in the above methods, respectively. The program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG. The storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 620 in the computing device of FIG. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit includes computer readable code 631', ie, code readable by a processor, such as 610, that when executed by a computing device causes the computing device to perform each of the methods described above step.
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。"an embodiment," or "an embodiment," or "an embodiment," In addition, it is noted that the phrase "in one embodiment" is not necessarily referring to the same embodiment.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将 这些单词解释为名称。It is to be noted that the above-described embodiments are illustrative of the invention and are not intended to be limiting, and that the invention may be devised without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as a limitation. The word "comprising" does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. Can These words are interpreted as names.
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。 In addition, it should be noted that the language used in the specification has been selected for the purpose of readability and teaching, and is not intended to be construed or limited. Therefore, many modifications and changes will be apparent to those skilled in the art without departing from the scope of the invention. The disclosure of the present invention is intended to be illustrative, and not restrictive, and the scope of the invention is defined by the appended claims.

Claims (12)

  1. 一种检测商品模板失效的方法,其特征在于,该方法包括:A method for detecting a failure of a commodity template, the method comprising:
    获取待检测网页的统一资源定位符,识别该网页包含的每个商品模板;Obtaining a uniform resource locator of the webpage to be detected, and identifying each product template included in the webpage;
    针对识别出的每个商品模板,根据在网页中识别出该商品模板的位置,在该网页中的相应位置获取该网页包含的内容信息;And identifying, according to the location of the product template in the webpage, the content information included in the webpage in the corresponding location in the webpage;
    根据所述商品模板的标识信息,确定该商品模板的检测参数,并将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配;Determining, according to the identification information of the product template, the detection parameter of the product template, and matching the detection parameter of the product template with the acquired content information of the webpage;
    当匹配成功时,确定该商品模板有效,否则,确定该商品模板失效。When the matching is successful, it is determined that the commodity template is valid, otherwise, the commodity template is determined to be invalid.
  2. 如权利要求1所述的方法,其特征在于,所述识别该网页包含的每个商品模板包括:The method of claim 1, wherein the identifying each merchandise template included in the webpage comprises:
    采用正则方法,识别该网页包含的每个商品模板。A regular method is used to identify each product template contained in the web page.
  3. 如权利要求1所述的方法,其特征在于,所述确定该商品模板失效后,所述方法还包括:The method according to claim 1, wherein after the determining that the commodity template is invalid, the method further comprises:
    判断该失效的商品模板是否与重要商品模板库中的模板相同;Determining whether the expired product template is the same as the template in the important product template library;
    当失效的商品模板与重要商品模板库中的模板相同时,发出报警信息。An alarm message is issued when the expired item template is the same as the template in the important item template library.
  4. 如权利要求1所述的方法,其特征在于,根据所述商品模块的标识信息,确定该商品模板的检测参数包括:The method of claim 1, wherein determining the detection parameters of the product template according to the identification information of the commodity module comprises:
    当根据所述商品模板的标识信息,确定该商品模板为标题模板时,确定该标题模板对应的检测参数为文字信息;When it is determined that the product template is a title template according to the identification information of the product template, determining that the detection parameter corresponding to the title template is text information;
    当根据所述商品模板的标识信息,确定该商品模板为价格模板时,确定该价格模板对应的检测参数为数字信息;When it is determined that the product template is a price template according to the identification information of the product template, determining that the detection parameter corresponding to the price template is digital information;
    当根据所述商品模板的标识信息,确定该商品模板为图片模板时,确定该图片模板对应的检测参数为图片信息。When it is determined that the product template is a picture template according to the identifier information of the product template, it is determined that the detection parameter corresponding to the picture template is picture information.
  5. 如权利要求1所述的方法,其特征在于,所述将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配,匹配成功包括:The method according to claim 1, wherein the detecting parameter of the product template is matched with the obtained content information of the webpage, and the matching success comprises:
    当该商品模板为标题模板时,判断获取的该网页包含的内容信息中是否含有文字信息,当获取的该网页包含的内容信息中含有文字信息时,确定匹配成功;When the product template is a title template, it is determined whether the obtained content information included in the webpage contains text information, and when the acquired content information included in the webpage contains text information, it is determined that the matching is successful;
    当该商品模板为价格模板时,判断获取的该网页包含的内容信息中是否含有数字信息,当获取的该网页包含的内容信息中含有数字信息时,确定匹配成功;When the product template is a price template, it is determined whether the acquired content information contained in the webpage contains digital information, and when the obtained content information contained in the webpage contains digital information, it is determined that the matching is successful;
    当该商品模板为图片模板时,判断获取的该网页包含的内容信息中是否含有图片信息,当获取的该网页包含的内容信息中含有图片信息时,确定匹配成功。 When the product template is a picture template, it is determined whether the acquired content information included in the webpage contains image information, and when the obtained content information included in the webpage contains image information, it is determined that the matching is successful.
  6. 一种检测商品模板失效的装置,其特征在于,所述装置包括:A device for detecting a failure of a commodity template, characterized in that the device comprises:
    识别模块,用于获取待检测网页的统一资源定位符,识别该网页包含的每个商品模板;An identification module, configured to acquire a uniform resource locator of the webpage to be detected, and identify each product template included in the webpage;
    获取模块,用于针对识别出的每个商品模板,根据在网页中识别出该商品模板的位置,在该网页中的相应位置获取该网页包含的内容信息;An obtaining module, configured to obtain, according to the location of the product template in the webpage, the content information included in the webpage according to the location of the product template in the webpage;
    匹配检测模块,用于根据所述商品模块的标识信息,确定并将该商品模板的检测参数与获取的该网页包含的内容信息进行匹配;当匹配成功时,确定该商品模板有效,否则,确定该商品模板失效。The matching detection module is configured to: according to the identification information of the commodity module, determine and match the detection parameter of the product template with the acquired content information of the webpage; when the matching is successful, determine that the commodity template is valid, otherwise, determine The item template is invalid.
  7. 如权利要求6所述的装置,其特征在于,所述识别模块,具体用于采用正则方法,识别该网页包含的每个商品模板。The device according to claim 6, wherein the identification module is specifically configured to identify each product template included in the webpage by using a regular method.
  8. 如权利要求6所述的装置,其特征在于,所述装置还包括:The device of claim 6 wherein said device further comprises:
    告警模块,用于确定匹配检测模块检测商品模板失效后,判断该失效的商品模板是否与重要商品模板库中的模板相同;当失效的商品模板与重要商品模板库中的模板相同时,发出报警信息。The alarm module is configured to determine whether the failed product template is the same as the template in the important product template library after the matching detection module detects the failure of the commodity template; and issue an alarm when the failed product template is the same as the template in the important product template library; information.
  9. 如权利要求6所述的装置,其特征在于,所述匹配检测模块,具体用于当根据所述商品模板的标识信息,确定该商品模板为标题模板时,确定该标题模板对应的检测参数为文字信息;当根据所述商品模板的标识信息,确定该商品模板为价格模板时,确定该价格模板对应的检测参数为数字信息;当根据所述商品模板的标识信息,确定该商品模板为图片模板时,确定该图片模板对应的检测参数为图片信息。The device according to claim 6, wherein the matching detection module is configured to: when determining the product template as a title template according to the identification information of the product template, determining that the detection parameter corresponding to the title template is a text information; when determining that the product template is a price template according to the identification information of the product template, determining that the detection parameter corresponding to the price template is digital information; and determining the product template as a picture according to the identification information of the product template When the template is used, it is determined that the detection parameter corresponding to the image template is picture information.
  10. 如权利要求6所述的装置,其特征在于,所述匹配检测模块,具体用于当该商品模板为标题模板时,判断获取的该网页包含的内容信息中是否含有文字信息,当获取的该网页包含的内容信息中含有文字信息时,确定匹配成功;The device of claim 6, wherein the matching detection module is configured to: when the product template is a title template, determine whether the acquired content information included in the webpage contains text information, and when the acquired When the content information contained in the webpage contains text information, it is determined that the matching is successful;
    当该商品模板为价格模板时,判断获取的该网页包含的内容信息中是否含有数字信息,当获取的该网页包含的内容信息中含有数字信息时,确定匹配成功;When the product template is a price template, it is determined whether the acquired content information contained in the webpage contains digital information, and when the obtained content information contained in the webpage contains digital information, it is determined that the matching is successful;
    当该商品模板为图片模板时,判断获取的该网页包含的内容信息中是否含有图片信息,当获取的该网页包含的内容信息中含有图片信息时,确定匹配成功。When the product template is a picture template, it is determined whether the acquired content information included in the webpage contains image information, and when the obtained content information included in the webpage contains image information, it is determined that the matching is successful.
  11. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-5中的任一个所述的检测商品模板失效的方法。A computer program comprising computer readable code, when the computer readable code is run on a computing device, causing the computing device to perform a method of detecting a commodity template failure according to any one of claims 1-5 .
  12. 一种计算机可读介质,其中存储了如权利要求11所述的计算机程序。 A computer readable medium storing the computer program of claim 11.
PCT/CN2014/090387 2013-11-07 2014-11-05 Method and apparatus for detecting invalid commodity templates WO2015067179A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310553137.5 2013-11-07
CN201310553137.5A CN103593429B (en) 2013-11-07 2013-11-07 Commodity template failure detection method and device

Publications (1)

Publication Number Publication Date
WO2015067179A1 true WO2015067179A1 (en) 2015-05-14

Family

ID=50083570

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/090387 WO2015067179A1 (en) 2013-11-07 2014-11-05 Method and apparatus for detecting invalid commodity templates

Country Status (2)

Country Link
CN (1) CN103593429B (en)
WO (1) WO2015067179A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593429B (en) * 2013-11-07 2017-02-15 北京奇虎科技有限公司 Commodity template failure detection method and device
CN105095463B (en) * 2015-07-30 2018-09-11 北京奇虎科技有限公司 Visiting method, the apparatus and system of material chained address
CN107329981B (en) * 2017-06-01 2021-05-25 北京京东尚科信息技术有限公司 Page detection method and device
CN109308251B (en) * 2017-07-27 2022-03-25 阿里巴巴集团控股有限公司 Test data verification method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020087426A1 (en) * 2000-12-28 2002-07-04 Fujitsu Limited Online shopping method and system
CN101727446A (en) * 2008-10-27 2010-06-09 国际商业机器公司 Method and system for accessing mobile Web, corresponding server and mobile equipment
CN102867053A (en) * 2012-09-12 2013-01-09 北京奇虎科技有限公司 Method, device and system for collecting effective information web pages in website information
CN103593429A (en) * 2013-11-07 2014-02-19 北京奇虎科技有限公司 Commodity template failure detection method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102200980B (en) * 2010-03-25 2013-06-19 北京搜狗科技发展有限公司 Method and system for providing network resources
CN102495847B (en) * 2011-11-16 2017-04-19 浙江盘石信息技术股份有限公司 Network commodity information extraction method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020087426A1 (en) * 2000-12-28 2002-07-04 Fujitsu Limited Online shopping method and system
CN101727446A (en) * 2008-10-27 2010-06-09 国际商业机器公司 Method and system for accessing mobile Web, corresponding server and mobile equipment
CN102867053A (en) * 2012-09-12 2013-01-09 北京奇虎科技有限公司 Method, device and system for collecting effective information web pages in website information
CN103593429A (en) * 2013-11-07 2014-02-19 北京奇虎科技有限公司 Commodity template failure detection method and device

Also Published As

Publication number Publication date
CN103593429B (en) 2017-02-15
CN103593429A (en) 2014-02-19

Similar Documents

Publication Publication Date Title
CN108683562B (en) Anomaly detection positioning method and device, computer equipment and storage medium
CN104317618B (en) A kind of firmware partition treating method and apparatus
JP2011505605A5 (en)
US8867848B2 (en) Display test device, display test method, and storage medium
US8869025B2 (en) Method and system for identifying advertisement in web page
WO2015067179A1 (en) Method and apparatus for detecting invalid commodity templates
US10169810B2 (en) Product information inconsistency detection
US9009613B2 (en) System to overlay application help on a mobile device
US9870300B2 (en) Logged event frequency visualization
US8589734B2 (en) Verifying correctness of processor transactions
CN113807066A (en) Chart generation method and device and electronic equipment
CN106897224B (en) Method and device for determining software testing range
US10782942B1 (en) Rapid onboarding of data from diverse data sources into standardized objects with parser and unit test generation
CN110908907A (en) Web page testing method, device, equipment and storage medium
CN112835779A (en) Test case determination method and device and computer equipment
CN109271399A (en) A kind of method of calibration of database write-in log consistency
JP5670156B2 (en) Test result verification system, method, and program
CN114968725A (en) Task dependency relationship correction method and device, computer equipment and storage medium
WO2021135369A1 (en) Sample processing method and apparatus
WO2017054731A1 (en) Method and device for processing hijacked browser
CN113836899A (en) Webpage identification method and device, electronic equipment and storage medium
CN111125590B (en) Method and device for drawing thermodynamic diagram
CN113256205A (en) Standard product management method and management system
JP2009199172A (en) Information processing system, method for specifying similar parts inside program, and program
CN107346256B (en) Method and device for detecting IO (input/output) influence time caused by firmware refreshing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14859662

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14859662

Country of ref document: EP

Kind code of ref document: A1