Method and device for identifying on-off state of product, computer equipment and storage medium
Through automated comparison of history and current product lists, the problem of low efficiency in product status recognition on and off the shelves in e-commerce stores is solved, and efficient and accurate status recognition is achieved.
Patent Information
- Application Number
- CN202510235515.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, it is inefficient and time-consuming to determine the on-off status of products in an electronic mall by manual means.
By obtaining the historical and current related product lists, comparing, determining the up-and-down status of the product, and using computer equipment and storage media to automatically process the list comparison process.
It improves the efficiency, accuracy and automation of product status recognition on and off the shelves, and reduces the time and cost of manual intervention.
Smart Images

Figure CN120338908A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technologies, and in particular, to a method and apparatus for identifying the shelf status of products, a computer device, and a storage medium. Background Art
[0002] With the development of science and technology, e-commerce platforms have emerged. There are products on the shelves in e-commerce platforms. For example, the e-commerce platform can be an application market or an e-commerce platform, and the product can be an application program or a commodity. R & D personnel can put the developed application programs on the application market, so that users can download the application programs through the application market and use the downloaded application programs; or, sellers can put the commodities on the e-commerce platform, so that buyers can purchase the commodities through the e-commerce platform.
[0003] In order to analyze market fluctuations, it is necessary to understand the shelf status of products in the e-commerce platform. Currently, mainly through manual means to count the shelf status of each product in the e-commerce platform. However, determining the shelf status through manual means is time-consuming and laborious, resulting in low efficiency in determining the shelf status. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a method and apparatus for identifying the shelf status of products, a computer device, a computer-readable storage medium, and a computer program product that can improve the efficiency of identifying the shelf status of products.
[0005] In a first aspect, the present application provides a method for identifying the shelf status of products. The method includes:
[0006] Obtain a historical list set; the historical list set includes at least one historical associated product list corresponding to each company; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company;
[0007] For each company in the at least one company, at the current sampling moment, obtain the corresponding current associated product list according to the company identifier of the company;
[0008] Take the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, and compare the lists in the list pair to obtain the comparison result corresponding to the list pair;
[0009] For each comparison result, determine the shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0010] In a second aspect, the present application further provides an apparatus for identifying the shelf status of products. The apparatus includes:
[0011] A data acquisition module, configured to acquire a historical list set; the historical list set includes historical associated product lists corresponding to at least one company respectively; the historical associated product list refers to an associated product list collected at the previous sampling moment, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company; for each company in the at least one company, at the current sampling moment, a corresponding current associated product list is acquired according to the company identifier of the company.
[0012] A comparison module, configured to use the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, and compare the lists in the list pair to obtain a comparison result corresponding to the list pair.
[0013] A status determination module, configured to, for each comparison result, determine the on-shelf and off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0014] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0015] Acquire a historical list set; the historical list set includes historical associated product lists corresponding to at least one company respectively; the historical associated product list refers to an associated product list collected at the previous sampling moment, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company.
[0016] For each company in the at least one company, at the current sampling moment, a corresponding current associated product list is acquired according to the company identifier of the company.
[0017] Use the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, and compare the lists in the list pair to obtain a comparison result corresponding to the list pair.
[0018] For each comparison result, determine the on-shelf and off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0019] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0020] Obtain a historical list set; the historical list set includes historical associated product lists corresponding to at least one company respectively; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company;
[0021] For each company among the at least one company, at the current sampling moment, obtain the corresponding current associated product list according to the company identifier of the company;
[0022] Take the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, and compare the lists in the list pair to obtain the comparison result corresponding to the list pair;
[0023] For each comparison result, determine the on-shelf or off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0024] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0025] Obtain a historical list set; the historical list set includes historical associated product lists corresponding to at least one company respectively; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company;
[0026] For each company among the at least one company, at the current sampling moment, obtain the corresponding current associated product list according to the company identifier of the company;
[0027] Take the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, and compare the lists in the list pair to obtain the comparison result corresponding to the list pair;
[0028] For each comparison result, determine the on-shelf or off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0029] The above product online / offline status recognition method, device, computer equipment, storage medium and computer program product can compare the historical associated product list and the current associated product list corresponding to the same company by obtaining the historical list set and the current list set, and obtain the comparison result. By obtaining the comparison result, since the historical list set and the current list set are list sets collected at two adjacent sampling moments, the comparison result obtained by the comparison can reflect the increase and decrease of the products associated with each company at two adjacent sampling moments. Therefore, the online / offline status of each product can be accurately determined based on the increase and decrease, and compared with the traditional method of manually determining the online / offline status of each product, the present application can greatly improve the recognition efficiency of the product online / offline status. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 FIG. is a product environment diagram of the product online / offline status recognition method in an embodiment;
[0031] Figure 2 FIG. is a schematic flowchart of the product online / offline status recognition method in an embodiment;
[0032] Figure 3 FIG. is a schematic diagram of determining the product online / offline status based on the list set in an embodiment;
[0033] Figure 4 FIG. is a schematic diagram of comparing the associated product lists in an embodiment;
[0034] Figure 5 FIG. is a schematic diagram of the company details page in an embodiment;
[0035] Figure 6 FIG. is a schematic overall flowchart of the product online / offline status recognition method in an embodiment;
[0036] Figure 7 FIG. is a structural block diagram of the product online / offline status recognition device in an embodiment;
[0037] Figure 8 FIG. is an internal structure diagram of the computer equipment in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] The product online / offline status recognition method provided by the embodiments of the present application can be used for products such as Figure 1In the product environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or on other network servers. Both the terminal 102 and the server 104 can be used alone to execute the product listing and delisting status recognition method, and the terminal 102 and the server 104 can be jointly used to execute the product listing and delisting status recognition method. The following takes the terminal 102 and the server 104 jointly used to execute the product listing and delisting status recognition method as an example for illustration. The user can set the sampling interval time through the terminal 102, and then the terminal 102 can send the sampling interval time to the server 104, so that the server 104 can collect the associated product list to obtain the initial data. Every time an interval of a sampling interval time passes, the collection of the associated product list is restarted, and the newly collected associated product list is compared with the associated product list collected at the previous sampling moment, and the listing and delisting status of the product is determined based on the comparison result. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0040] It should be noted that the "first", "second" and similar terms used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. Unless the context clearly indicates otherwise, the singular forms "a", "an" or "the" and similar terms do not indicate a quantity limitation, but indicate the existence of at least one. The quantities referred to as "multiple" or "multiple copies" in the embodiments of this application all refer to the quantity of "at least two". For example, "multiple" means "at least two", and "multiple copies" means "at least two copies".
[0041] In one of the embodiments, as Figure 2 shown, a product listing and delisting status recognition method is provided. Taking this method for a product on a computer device as an example for illustration, the computer device can be Figure 1 the terminal or the server in. The product listing and delisting status recognition method includes the following steps:
[0042] Step 202, obtain a historical list set; the historical list set includes at least one historical associated product list corresponding to each company; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes the product identifiers corresponding to each product associated with the corresponding company.
[0043] Among them, the list set includes at least one associated product list corresponding to each company, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company. For example, the associated product list can be specifically: [{"product identifier": "1660289707"}, {"product identifier": "1467006461"}, {"product identifier": "156704261"}].
[0044] The products associated with a company refer to the products that have an associated relationship with the company. For example, the products associated with a company are specifically the products developed by the company, or the products belonging to the company. The products can be specifically application programs, or commodities. For example, application programs available for users to download on the application mall, or commodities available for users to purchase on the e-commerce platform.
[0045] Specifically, when it is necessary to identify the on-shelf and off-shelf status, the computer device can obtain the historical list set, which refers to the list set collected at the previous sampling moment. Therefore, the historical associated product list included in the historical list set refers to the associated product list collected for the corresponding company at the previous sampling moment. For example, the historical list set includes the historical associated product list collected for Company A yesterday, the historical associated product list collected for Company B, and the historical associated product list collected for Company C.
[0046] In one embodiment, referring to Figure 3 , the task of identifying the on-shelf and off-shelf status of products can be started as a daily task, that is, the list set can be collected on a daily basis. For example, for the first sampling moment (the first day), the user can input the target products for which the on-shelf and off-shelf status needs to be monitored in the computer device, determine the companies associated with these target products, obtain the associated product lists corresponding to these companies respectively, and obtain the list set. When entering the next sampling moment, that is, when entering the second day, the list set collected at the first sampling moment can be used as the historical list set, and then the historical list set can be compared with the current list set collected on the second day, and the on-shelf and off-shelf status of the products can be determined based on the comparison result. It is easy to understand that when entering the next sampling moment, that is, when entering the third day, the list set collected on the second day can be used as the historical list set, and so on iteratively. Figure 3 FIG. shows a schematic diagram of determining the on-shelf and off-shelf status of products based on the list set in one embodiment.
[0047] Step 204, for each company among at least one company, at the current sampling moment, obtain the corresponding current associated product list according to the company identifier of the company.
[0048] Specifically, at the current sampling moment, for each company in at least one company, the corresponding associated product list of the company can be obtained according to the company identifier. For the convenience of description, the associated product list collected at the current sampling moment is hereinafter referred to as the current associated product list. Exemplarily, the historical list set includes historical associated product lists collected for three companies A, B, and C. Then, at the current sampling moment, based on the company identifier of Company A, the current associated product list corresponding to Company A can be obtained, and based on the company identifier of Company B, the current associated product list corresponding to Company B can be obtained, and based on the company identifier of Company C, the current associated product list corresponding to Company C can be obtained. The current associated product lists corresponding to Companies A, B, and C respectively constitute the current list set.
[0049] In one embodiment, the computer device can search for products associated with the company in the e - commerce mall based on the company identifier, and extract the product identifiers to obtain the current associated product list corresponding to the company. Taking Company A as an example, the identifier of Company A can be entered in the search bar of the application mall. Thus, the application mall can display the company details page of Company A, and all the products associated with Company A are displayed on the company details page. Then, the computer device can generate the current associated product list corresponding to Company A based on the products displayed on the company details page. Or, for Company A, the identifier of Company A can be entered in the search bar of the application mall. Then, the search engine can use the identifier of Company A as a keyword to search for products in the application mall and display the search results. For each search result, the computer device can simulate a click operation on the search result to enter the search details page corresponding to the search result, and determine the products related to Company A based on the content displayed on the search details page. For example, the search details page can be the product details page of a certain product, such as the product details page of Product a. When the key statement "manufacturing company: Company A" appears in the product details page, then this product (for example, Product a) can be considered as a product related to Company A.
[0050] Step 206: Take the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, and compare the lists in the list pair to obtain the comparison result corresponding to the list pair.
[0051] Specifically, the product list data is collected multiple times at specific intervals. By comparing the product list sampled most recently with the product list data sampled last time, the product list change data can be obtained. For the sake of convenient description, the associated product list collected at the last sampling moment is called the historical associated product list, and the associated product list collected at the most recent sampling moment is called the current associated product list. When comparing the historical associated product list corresponding to the same company with the current associated product list, the historical associated product list and the current associated product list corresponding to the same company can be taken as a pair of list pairs, so as to compare the historical associated product list and the current associated product list in the list pair. During the comparison process, the computer device can traverse each product identifier in the current associated product list. For the currently traversed product identifier, it is determined whether the currently traversed product identifier exists in the historical associated product list. If not, it is determined that the product corresponding to the currently traversed product identifier is a newly added product. Also, traverse the product identifiers in the historical associated product list, and determine whether the currently traversed product identifier exists in the current associated product list. If not, it is determined that the product corresponding to the currently traversed product identifier is a reduced product. After traversing both the current associated product list and the historical associated product list, the comparison result can be obtained. Among them, the comparison result can indicate the newly added product identifiers and the reduced product identifiers.
[0052] Exemplarily, referring to Figure 4 , the collection interval is one day for multiple collections, and the associated product lists of three companies, Company A, Company B, and Company C, are collected. The data collected at the last sampling moment includes product a1, a2 collected by Company A, product b1, b2 collected by Company B, and product c1, c2 collected by Company C; the data collected at the current sampling moment includes product a1, a2 collected by Company A, product b1 collected by Company B, and product c1, c2, c3 collected by Company C. Comparing the two collected associated product lists can obtain the comparison result. The details of the result are that the associated product list of Company A has not changed during the two samplings; the associated product list of Company B has reduced product b2 during the two samplings; the associated product list of Company C has newly added product c3 during the two samplings. It is easy to understand that the collection interval here can also be other time intervals. For example, collection in units of weeks, months, or quarters. The comparison interval here does not have to be the same as the collection interval. The appropriate comparison interval can be selected according to the analysis dimension to obtain the comparison result. Avoid interference from frequent product listing and delisting events in the analysis of a long time dimension. Figure 4 shows a schematic diagram of the comparison of the associated product list in an embodiment.
[0053] In one embodiment, data collection may also encounter failures. For example, the computer device running the data collection task may malfunction, the object to be collected may not be able to provide the collected data normally, or the device storing the collected data may fail. When a collection failure occurs, the collected data of the previous collection cycle may be missing. In this scenario, the comparison object for the data collection task should be the collected data of the most recent successful sampling in history compared with the currently collected data.
[0054] Step 208, for each comparison result, determine the on-shelf and off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0055] Specifically, by comparing the historical associated product list and the current associated product list, a comparison result can be obtained. For example, the comparison result records the newly added product identifiers, the reduced product identifiers, and the product identifiers that remain unchanged. Based on the comparison result, the on-shelf and off-shelf status of each product can be determined. For example, for the product identifiers that remain unchanged, since the product was sampled in the e-commerce mall at both the previous sampling moment and the current sampling time, it can be determined that the product corresponding to the product identifier that remains unchanged has always been in the on-shelf state. For the newly added product identifiers, since the product was not sampled at the previous sampling moment but was sampled at the current sampling moment, it can be determined that the product corresponding to the product identifier has changed from the off-shelf state to the on-shelf state. For the reduced product identifiers, since the product was sampled at the previous sampling moment but not at the current sampling moment, it can be determined that the product corresponding to the product identifier has changed from the on-shelf state to the off-shelf state.
[0056] In one embodiment, after obtaining the comparison result, the detailed data of these products can also be obtained, and based on the detailed data, the on-shelf and off-shelf status of the products can be further confirmed.
[0057] In the above product on-shelf and off-shelf status recognition method, by obtaining the historical list set and the current list set, the historical associated product list and the current associated product list corresponding to the same company can be compared to obtain a comparison result. By obtaining the comparison result, since the historical list set and the current list set are list sets collected at two adjacent sampling moments, the comparison result obtained by the comparison can reflect the addition and reduction of the products associated with each company at two adjacent sampling moments. Therefore, the on-shelf and off-shelf status of each product can be accurately determined based on the addition and reduction situations. Compared with the traditional method of manually determining the on-shelf and off-shelf status of each product, the present application can greatly improve the recognition efficiency of the product on-shelf and off-shelf status.
[0058] In one embodiment, the corresponding current associated product list is obtained according to the company logo of the company, including: obtaining a preset splicing link of the company details page, splicing the company logo of the company with the splicing link of the company details page to obtain a spliced company details page link; entering the company details page corresponding to the company based on the spliced company details page link; generating the current associated product list corresponding to the company according to the page data of the company details page corresponding to the company.
[0059] Specifically, when it is necessary to obtain the current associated product list based on the company logo, the computer device can obtain the pre-stored splicing link of the company details page. Among them, the splicing link of the company details page can be an incomplete link. When the splicing link of the company details page is spliced with the company logo, a complete link can be obtained, and this link can be used to open a certain page in the e-commerce mall. For example, it can open a certain company details page in the e-commerce mall. For the convenience of description, the complete link obtained after splicing the splicing link of the company details page and the company logo is hereinafter referred to as the spliced company details page link.
[0060] Further, the computer device can enter the company details page in the e-commerce mall through an HTTP request and based on the spliced company details page link, and obtain the current associated product list corresponding to the current company based on the content displayed in the company details page. Exemplarily, the e-commerce mall is usually a global application mall platform or an e-commerce platform, and the format of the link of the company details page in its platform is fixed and generally includes parameters such as a link header, a company logo, the language category of the returned content (such as Chinese, English), and the country to which the company's associated products belong. Therefore, the splicing link of the company details page can be determined based on the format of the link of the company details page in this platform. For example, the splicing link of the company details page can be specifically Https: / / play.XX.com / store / apps / dev?id=&hl=en&gl=us, where Https: / / play.XX.com / store / apps / dev? is the link header, id represents the company logo, hl represents the language, and gl represents the country to which the associated products belong. Therefore, the obtained company logo can be added after "id=", and a complete link can be obtained.
[0061] Further, the computer device can splice the address of the company details page through the company logo and the splicing link of the company details page, and obtain all the data of the company details page through an HTTP request. Then obtain the corresponding associated product list data from the data of the company details page. The list data needs to be persistently stored and can be stored in a database or other computer programs with persistent storage.
[0062] The database stores all historical collection data, facilitating subsequent comparison according to different cycles. The stored data content can be [{"collection time": "2025-01-01", "company identifier": "1001", "product identifier": "1467006461"}, {"collection time": "2025-01-01", "company identifier": "1001", "product identifier": "156704261"}].
[0063] Considering that the web structure and access interface of the company details page may change over time, the links here are found to be unusable and need to be updated to the correct addresses in a timely manner. When the data structure of the details page changes, the program processing logic also needs to be updated in a timely manner.
[0064] In one of the embodiments, when entering the company details page, the computer device can obtain the product identifier based on a preset keyword. For example, referring to Figure 5 , when the product is an application and the e-commerce mall is an application mall, the displayed company details page can be as Figure 5 shown. It can locate a product list based on the first preset keyword "ipad&iphone" and another product list based on the second preset keyword "Mac", and then extract the product identifiers in each product list and store them in the same list to obtain the current associated product list corresponding to the company. Figure 5 Shows a schematic diagram of the company details page in one of the embodiments.
[0065] In the above embodiment, only a simple splicing operation is required to obtain the link for accessing the company details page, and thus quickly access the company details page based on this link, which improves the access efficiency of the company details page.
[0066] In one of the embodiments, determining the on-shelf and off-shelf statuses of the products corresponding to the respective product identifiers in the current associated product list according to the comparison result includes: when the comparison result indicates that the current associated product list in the corresponding list pair is in a state of decreasing product identifiers, obtaining the decreased product identifiers; obtaining the splicing link of the product details page; splicing the decreased product identifiers with the splicing link of the product details page to obtain the link of the decreased product details page; and determining the on-shelf and off-shelf status of the product corresponding to the decreased product identifier according to the link of the decreased product details page.
[0067] Specifically, after the acquisition program compares the current associated product list with the historical associated product list, it will obtain the product identifiers that have decreased in the current associated product list. At this time, the current associated product list is in a state where the product identifiers have decreased. At this time, it is necessary to further determine the reason for the missing product identifiers in the current associated product list from the product details page, so as to determine the online / offline status of the products corresponding to the decreased product identifiers based on this reason. Specifically, similar to the company details page, the e-commerce mall can display product content through the product details page. The computer device can obtain detailed product information through the product details page, including whether the product is offline, or whether the associated company of the product has been changed. Exemplarily, the link of the product details page generally has a format, including parameters such as the link header, product identifier, language category to which the product belongs (such as Chinese, English), and country to which the product belongs, etc. Therefore, the spliced link of the product details page can be determined based on the format of the link of the product details page. For example, the spliced link of the product details page can specifically be Https: / / play.XX.com / us / / apps / details?id=&hl=en&gl=us, where id identifies the product identifier.
[0068] The computer device can add the decreased product identifier after "id=" to obtain a complete link, and this complete link is called the decreased product details page link. Further, the computer device can send an HTTP request and obtain all the data of the product details page based on the decreased product details page link. Then, based on all the data of the product details page obtained, determine the online / offline status of the products corresponding to the decreased product identifiers.
[0069] In the above embodiment, only a simple splicing operation is required to obtain the link for accessing the product details page, so as to quickly access the product details page based on this link, thus improving the access efficiency of the product details page. Due to the improved access efficiency, the determination efficiency of the online / offline status of the products can also be improved based on the improved access efficiency.
[0070] In one of the embodiments, determining the online / offline status of the products corresponding to the decreased product identifiers according to the decreased product details page link includes: when it fails to enter the product details page corresponding to the decreased product identifier based on the decreased product details page link, it is determined that the product corresponding to the decreased product identifier is in the offline state; when it successfully enters the product details page corresponding to the decreased product identifier based on the decreased product details page link, determine the online / offline status of the products corresponding to the decreased product identifiers according to the product details page corresponding to the decreased product identifier.
[0071] Specifically, for the product identifiers that are reduced in the comparison, it is necessary to further confirm the online / offline status of the products by querying the results of the product detail pages. When entering the product detail page based on the reduced product detail page link, several situations may be encountered, including but not limited to the e-commerce platform directly returning a prompt message indicating that the page access fails, or returning a message indicating that the product does not exist or that the product has been taken off the shelf. In these scenarios, the computer device determines that due to the invalidation of the product detail page, the product corresponding to the reduced product identifier in the current associated product list has been taken off the shelf. The computer device records the product status as "off the shelf" and records the relevant event time and details.
[0072] When successfully entering the product detail page based on the reduced product detail page link, the computer device can determine the online / offline status of the product corresponding to the reduced product identifier based on the information displayed in the product detail page. For example, when the product is an application program and the keyword "downloadable" is written in the product detail page, it is determined that the product corresponding to the reduced product identifier is in the online state.
[0073] In this embodiment, by further determining the online / offline status of the product corresponding to the reduced product identifier according to the product detail page link, the accuracy of determining the online / offline status can be improved.
[0074] In one of the embodiments, when successfully entering the product detail page corresponding to the reduced product identifier based on the reduced product detail page link, determining the online / offline status of the product corresponding to the reduced product identifier according to the product detail page corresponding to the reduced product identifier includes: when successfully entering the product detail page corresponding to the reduced product identifier, determining whether the product download button in the product detail page corresponding to the reduced product identifier is available; when the product download button is not available, determining that the product corresponding to the reduced product identifier is in the offline state.
[0075] Specifically, when the computer device successfully enters the product detail page corresponding to the reduced product identifier based on the reduced product detail page link, the computer device can confirm whether there is a product download button in the product detail page. When there is a product download button, it is determined that the product corresponding to the reduced product identifier is in the online state. When it is found that there is no product download button in the product detail page corresponding to the reduced product identifier, or there is a product download button but the product download button is prohibited, or the URL associated with the product download button has been deleted, it is determined that the product file cannot be downloaded based on this product detail page. At this time, it can be considered that the product download button is not available, and the product corresponding to the reduced product identifier has been taken off the shelf and is in the offline state.
[0076] In one embodiment, when there is a product download button on the product details page and the product file can be normally downloaded by clicking the product download button, it is determined that the product corresponding to the reduced product identifier is in the shelved state. Alternatively, the product is temporarily determined to be in the unshelved state, but the shelving state of the product needs to be further confirmed through subsequent steps.
[0077] In one embodiment, the content of the product details page of each platform may change, and the change of the content will cause the method of obtaining the download button object by parsing the crawler data to fail. When the product is an application, it can be determined whether the application can still provide normal services by judging whether the download hyperlink on the product details page can normally download the application installation package file. For example, the Android application installation package file has the suffix apk, and the Apple application installation package file has the suffix pka. In addition to judging whether the application installation file can be normally downloaded, some platforms will notify users that the application has been taken offline by means of an active page prompt, and such prompts can be obtained according to the platform content interface to accurately judge whether the application has been taken offline.
[0078] In this embodiment, by further determining the shelving state of the product based on the product download button, the determined shelving state is more accurate.
[0079] In one embodiment, the above method further includes: when the product download button is available, extracting the changed company identifier from the product details page corresponding to the reduced product identifier; splicing the changed company identifier with the link of the company details page to obtain the changed company details page link; entering the company details page corresponding to the changed company identifier based on the changed company details page link; generating the current associated product list corresponding to the changed company identifier according to the page data of the company details page corresponding to the changed company identifier; and adding the current associated product list corresponding to the changed company identifier to the current list set.
[0080] Specifically, when the computer device determines that the product corresponding to the reduced product identifier can be normally downloaded based on the product details page corresponding to the reduced product identifier, it is also necessary to further confirm whether the company associated with the product has changed. If there is a change and the changed company is not in the current set of collected companies, it is also necessary to further collect the list of products associated with the changed company. Specifically, by querying the product details page and parsing the data in the product details page, the company identifier of the company currently associated with the product corresponding to the reduced product identifier is obtained. For the convenience of description, the product corresponding to the reduced product identifier is hereinafter referred to as the reduced product. Exemplarily, the company identifier can be located and extracted in the product details page based on a preset keyword, and this company identifier is the company identifier of the company associated with the reduced product at the current moment.
[0081] Further, the computer device compares the extracted company logo with the company logo collected at the historical moment to confirm whether the company associated with the reduced product has changed. If there is no change, it is necessary to mark the abnormal data collected this time, record it, and then manually confirm the reason for the reduction of the product logo later; if there is a change, it can be confirmed that the reduction of the product logo is caused by the change of the affiliated company, and the reduced product is in the shelved state.
[0082] Further, for the convenience of description, when the extracted company logo is inconsistent with the company logo collected at the historical moment, the extracted company logo is called the changed company logo. The computer device splices the changed company logo with the splicing link of the company details page to obtain the changed company details page link. The computer device can enter the company details page corresponding to the changed company logo through the changed company details page link, and extract the current associated product list corresponding to the changed company logo from the company details page, and store the current associated product list corresponding to the changed company logo in the current list set to further expand the current list set. It is easy to understand that when entering the next sampling moment, the current associated product list corresponding to the changed company logo is used as the historical associated product list for comparison.
[0083] In one embodiment, to determine the company currently associated with the reduced product, in addition to obtaining it from the product details page, it can also be obtained from the application installation package. The application installation package usually has information such as certificates, and the company detailed information in the certificate is obtained by decompressing the application installation package.
[0084] In the above embodiment, when it is determined that the company has changed, by generating the changed company details page link, the current associated product list corresponding to the changed company logo can be obtained based on the changed company details page link, and then the current list set can be supplemented based on the current associated product list corresponding to the changed company logo, making the current list set more comprehensive and accurate.
[0085] In one embodiment, according to the comparison result, the shelf status of each product corresponding to each product logo in the corresponding current associated product list is determined, including: when the comparison result indicates that the current associated product list in the corresponding list pair is in the state of increasing product logo, obtain the increased product logo; obtain the splicing link of the product details page; splice the increased product logo with the splicing link of the product details page to obtain the increased product details page link; according to the increased product details page link, determine the shelf status of the product corresponding to the increased product logo.
[0086] Specifically, after the computer device compares the current associated product list with the historical associated product list, it will obtain the product identifiers added in the current associated product list. At this time, the current associated product list is in a state where product identifiers are added. For the added product identifiers, it is necessary to splice the added product identifiers with the product detail page link to obtain the added product detail page link. For the sake of description, the product corresponding to the added product identifier is hereinafter referred to as the newly added product. Further, the computer device enters the product detail page of the newly added product through the added product detail page link, and further determines the online / offline status of the newly added product based on this product detail page. For example, when successfully entering the product detail page based on the product detail page link, and there is a product download button on this product detail page, it is determined that the newly added product is in the online state.
[0087] In this embodiment, by generating the added product detail page link, the online / offline status of the newly added product can be accurately determined based on the added product detail page link.
[0088] In one of the embodiments, refer to Figure 6 , Figure 6The figure shows a schematic diagram of the overall process of the product listing and delisting status recognition method in an embodiment. Using this method to determine the online and offline status of a product requires a prerequisite, that is, importing the company corresponding to the product and the list of associated products associated with the company into the table as the initial data. This program is started as a daily task. When the data comes in, the following steps can be carried out for judgment: Step 1: Compare the currently obtained list of associated products with the historical list of associated products in the database; when the product identifiers in the currently obtained list of associated products decrease, the following three conditional judgments of Step 3, Step 4, and Step 5 can be carried out. Step 3: When the product identifiers in the currently obtained list of associated products decrease, extract the decreased product identifiers, and check whether the product details corresponding to the decreased product identifiers can be opened through link splicing. If the product details page cannot be opened, it proves that the product corresponding to the decreased product identifier has been delisted; Step 4: When the product details page can still be opened, check whether the disabled element (disabled form element) in the details page contains a product download button (that is, whether the product download button is available). If not, it proves that the product corresponding to the decreased product identifier has been delisted; Step 5: When the product details page still contains a product download button, it proves that the product corresponding to the decreased product identifier is still in the listed state, but it is not associated with the company of the initial data, which proves that the company associated with the product has changed. Then, the company identifier of the product details page can be directly obtained, and through link splicing, enter the company details page to obtain the currently associated product list of the changed company, and import it into the current list set as the initial data. When the product identifiers in the currently obtained list of associated products increase, the processes of Step 7 and Step 8 can be carried out. Step 7: Extract the increased product identifiers; Step 8: Through link splicing, open the product details page corresponding to the currently obtained list of associated products, directly extract the product status from the product details page, update the corresponding product listing and delisting status, and update the product information. Step 9, when it is determined that the product has been delisted, the corresponding product association list can be updated, and the product identifiers of the delisted products can be deleted.
[0089] In the above embodiment, through the above product online and offline status recognition method, the offline status data that cannot be directly obtained can be obtained, so that the online and offline judgment is more accurate. In addition, it is possible to avoid repeatedly fetching product details data. Only when the product identifiers decrease or increase, the product details data is fetched, saving service resources.
[0090] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0091] Based on the same inventive concept, an embodiment of the present application further provides a product on-shelf and off-shelf status recognition device for implementing the product on-shelf and off-shelf status recognition method described above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the product on-shelf and off-shelf status recognition device provided below can refer to the limitations on the product on-shelf and off-shelf status recognition method in the above text, and will not be repeated here.
[0092] In one embodiment, as Figure 7 shown, a product on-shelf and off-shelf status recognition device 700 is provided, including: a data acquisition module 702, a comparison module 704, and a status determination module 706, where:
[0093] The data acquisition module 702 is configured to acquire a historical list set; the historical list set includes at least one historical associated product list corresponding to each company; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company; for each company in at least one company, at the current sampling moment, a corresponding current associated product list is acquired according to the company identifier of the company;
[0094] The comparison module 704 is configured to use the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, and compare the lists in the list pair to obtain a comparison result corresponding to the list pair;
[0095] The status determination module 706 is configured to, for each comparison result, determine the on-shelf and off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0096] In one embodiment, the data acquisition module 702 is configured to acquire a preset splicing link of the company details page, splice the company identifier of the company with the splicing link of the company details page to obtain a spliced company details page link; enter the company details page corresponding to the company based on the spliced company details page link; generate a current associated product list corresponding to the company according to the page data of the company details page corresponding to the company.
[0097] In one embodiment, the status determination module 706 is further configured to, when the comparison result indicates that the current associated product list in the corresponding list pair is in a state of decreasing product identifiers, acquire the decreased product identifiers; acquire a preset splicing link of the product details page; splice the decreased product identifiers with the splicing link of the product details page to obtain a decreased product details page link; determine the online / offline status of the product corresponding to the decreased product identifiers according to the decreased product details page link.
[0098] In one embodiment, the status determination module 706 is further configured to, when it fails to enter the product details page corresponding to the decreased product identifiers based on the decreased product details page link, determine that the product corresponding to the decreased product identifiers is in an offline state; when it successfully enters the product details page corresponding to the decreased product identifiers based on the decreased product details page link, determine the online / offline status of the product corresponding to the decreased product identifiers according to the product details page corresponding to the decreased product identifiers.
[0099] In one embodiment, the status determination module 706 is further configured to, when it successfully enters the product details page corresponding to the decreased product identifiers, determine whether the product download button in the product details page corresponding to the decreased product identifiers is available; when the product download button is unavailable, determine that the product corresponding to the decreased product identifiers is in an offline state.
[0100] In one embodiment, the status determination module 706 is further configured to, when the product download button is available, extract a changed company identifier from the product details page corresponding to the decreased product identifiers; splice the changed company identifier with the splicing link of the company details page to obtain a changed company details page link; enter the company details page corresponding to the changed company identifier based on the changed company details page link; generate a current associated product list corresponding to the changed company identifier according to the page data of the company details page corresponding to the changed company identifier; add the current associated product list corresponding to the changed company identifier to the current list set.
[0101] In one embodiment, the status determination module 706 is further configured to, when the comparison result indicates that the current associated product list in the corresponding list pair is in the product identifier addition state, obtain the added product identifier; obtain the spliced link of the product details page; splice the added product identifier and the spliced link of the product details page to obtain the added product details page link; and determine the online / offline status of the product corresponding to the added product identifier according to the added product details page link.
[0102] Each module in the above product online / offline status identification device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0103] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 8 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store product online / offline status identification data. The input / output interface of the computer device is used for the processor to exchange information with external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a product online / offline status identification method.
[0104] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for identifying the shelf status of a product. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad set on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0105] Those skilled in the art can understand that Figure 8 the structure shown in
[0106] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device on which the product of the solution of the present application is located. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0107] Obtain a historical list set; the historical list set includes at least one historical associated product list corresponding to each company; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes the product identifiers corresponding to each product associated with the corresponding company;
[0108] For each company in at least one company, at the current sampling moment, obtain the corresponding current associated product list according to the company identifier of the company;
[0109] Take the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, compare the lists in the list pair, and obtain the comparison result corresponding to the list pair;
[0110] For each comparison result, determine the online / offline status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0111] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0112] Obtain a historical list set; the historical list set includes historical associated product lists corresponding to at least one company respectively; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company;
[0113] For each company in at least one company, at the current sampling moment, obtain the corresponding current associated product list according to the company identifier of the company;
[0114] Take the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, compare the lists in the list pair, and obtain the comparison result corresponding to the list pair;
[0115] For each comparison result, determine the online / offline status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0116] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0117] Obtain a historical list set; the historical list set includes historical associated product lists corresponding to at least one company respectively; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company;
[0118] For each company in at least one company, at the current sampling moment, obtain the corresponding current associated product list according to the company identifier of the company;
[0119] Take the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, compare the lists in the list pair, and obtain the comparison result corresponding to the list pair;
[0120] For each comparison result, determine the online / offline status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
[0121] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.
[0122] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., and are not limited thereto.
[0123] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.
[0124] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for identifying the on-shelf and off-shelf status of a product, characterized in that, The method includes: Obtaining a historical list set; the historical list set includes historical associated product lists corresponding to at least one company respectively; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes product identifiers corresponding to each product associated with the corresponding company; For each company among the at least one company, at the current sampling moment, obtaining a corresponding current associated product list according to the company identifier of the company; Taking the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, and comparing the lists in the list pair to obtain a comparison result corresponding to the list pair; For each comparison result, determining the on-shelf or off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
2. The method according to claim 1, wherein The obtaining of the corresponding current associated product list according to the company identifier of the company includes: Obtaining a preset splicing link of the company details page, and splicing the company identifier of the company with the splicing link of the company details page to obtain a spliced company details page link; Entering the company details page corresponding to the company based on the spliced company details page link; Generating the current associated product list corresponding to the company according to the page data of the company details page corresponding to the company.
3. The method according to claim 1, wherein The determining of the on-shelf or off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result includes: When the comparison result indicates that the current associated product list in the corresponding list pair is in a state of decreasing product identifiers, obtaining the decreased product identifiers; Obtaining a preset splicing link of the product details page; Splicing the decreased product identifiers with the splicing link of the product details page to obtain a decreased product details page link; Determining the on-shelf or off-shelf status of the product corresponding to the decreased product identifiers according to the decreased product details page link.
4. The method according to claim 3, wherein The determining of the on-shelf or off-shelf status of the product corresponding to the decreased product identifiers according to the decreased product details page link includes: When it fails to enter the product details page corresponding to the decreased product identifiers based on the decreased product details page link, determining that the product corresponding to the decreased product identifiers is in the off-shelf state; When it successfully enters the product details page corresponding to the decreased product identifiers based on the decreased product details page link, determining the on-shelf or off-shelf status of the product corresponding to the decreased product identifiers according to the product details page corresponding to the decreased product identifiers.
5. The method according to claim 4, wherein The when it successfully enters the product details page corresponding to the decreased product identifiers based on the decreased product details page link, determining the on-shelf or off-shelf status of the product corresponding to the decreased product identifiers according to the product details page corresponding to the decreased product identifiers includes: When successfully entering the product details page corresponding to the decreased product identifiers, determining whether the product download button in the product details page corresponding to the decreased product identifiers is available; When the product download button is unavailable, determining that the product corresponding to the decreased product identifiers is in the off-shelf state.
6. The method according to claim 5, wherein The method further includes: When the product download button is available, extract the changed company logo from the product details page corresponding to the reduced product identifier; Concatenate the changed company logo and the company details page link to obtain the changed company details page link; Based on the changed company details page link, enter the company details page corresponding to the changed company logo; Generate the current associated product list corresponding to the changed company logo according to the page data of the company details page corresponding to the changed company logo; Add the current associated product list corresponding to the changed company logo to the current list set.
7. The method according to claim 1, wherein The determining the on-shelf or off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result includes: When the comparison result indicates that the current associated product list in the corresponding list pair is in the product identifier addition state, obtain the added product identifier; Obtain the product details page concatenation link; Concatenate the added product identifier and the product details page concatenation link to obtain the added product details page link; Determine the on-shelf or off-shelf status of the product corresponding to the added product identifier according to the added product details page link.
8. An apparatus for identifying the on-shelf and off-shelf status of a product, characterized in that The device includes: A data acquisition module for acquiring a historical list set; the historical list set includes at least one historical associated product list corresponding to each company; the historical associated product list refers to the associated product list collected at the previous sampling moment, and the associated product list includes the product identifiers corresponding to each product associated with the corresponding company; for each company in the at least one company, at the current sampling moment, obtain the corresponding current associated product list according to the company identifier of the company; A comparison module for using the historical associated product list and the current associated product list corresponding to the same company as a pair of list pairs, and comparing the lists in the list pair to obtain the comparison result corresponding to the list pair; A status determination module for, for each comparison result, determining the on-shelf or off-shelf status of the product corresponding to the product identifier in the corresponding list pair according to the comparison result.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.