Material search management method and system, and storage medium
By embedding a browser in the client and utilizing WebSocket, Ajax requests, and data compression technologies, the material information of the e-commerce platform is automatically organized, solving the problem of low efficiency in collecting material information across multiple platforms and realizing an efficient material search and order matching process.
Patent Information
- Application Number
- CN202310308726.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-03-28
AI Technical Summary
When purchasing materials on e-commerce platforms, users need to collect and organize material information on each platform individually, resulting in low efficiency and convenience.
A browser is embedded in the client and communicates with the server via WebSocket connection. The search request is compressed using Ajax requests, MessagePack format serialization and LZ4 algorithm. The server organizes and returns the material list. The web page content is analyzed by combining XPath and Regular technology to automatically match material information and display it on the browser page.
It enables the rapid and unified display of material information from various e-commerce platforms, eliminating the need for users to input, browse, and organize information one by one, thus improving the efficiency and convenience of material searching and reducing the professional knowledge requirements for order matching personnel.
Smart Images

Figure CN116304349B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of material management technology, and in particular to a material search and management method, system and storage medium. Background Technology
[0002] An e-commerce platform is a platform that provides online transaction negotiation for businesses or individuals. An enterprise e-commerce platform is a virtual network space built on the Internet for conducting business activities and a management environment that ensures the smooth operation of business; it is an important place for coordinating and integrating the orderly, interconnected, and efficient flow of information, goods, and funds. Enterprises and merchants can fully utilize the shared resources provided by e-commerce platforms, such as network infrastructure, payment platforms, security platforms, and management platforms, to effectively and cost-efficiently conduct their business activities.
[0003] Currently, the process for users to purchase materials on e-commerce platforms is as follows: open the shopping platform, enter keywords / terms, browse the material information attached to each link one by one, and choose one to purchase; when users need to organize all online sales information of a certain material, they need to follow the above process to collect and organize the material information on each e-commerce platform.
[0004] Therefore, the existing technology still needs to be improved and perfected. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a material search and management method, system and storage medium, which aims to solve the problem that users need to collect and organize material information one by one on each e-commerce platform when purchasing materials, which is not convenient and efficient.
[0006] The technical solution of the present invention is as follows:
[0007] A material search management method, comprising:
[0008] A browser is pre-embedded in the client, and a WebSocket connection is established between the client and the server;
[0009] The browser receives the material model number entered by the user in the webpage search box and sends a search request to the client via an Ajax request;
[0010] The client serializes the search request in MessagePack format, compresses it using the LZ4 algorithm, and sends the compressed search request to the server.
[0011] The server receives the compressed search request and, based on the pre-configured search platform information, inserts the links corresponding to the platforms to be searched into the search task list, and sends the platform links in the search task list to the client one by one.
[0012] The browser sends an HTTP request to the target platform based on the received platform link, crawls the web page content after the target platform responds, and sends the crawled web page content to the server.
[0013] After receiving the page content, the server sends new platform links to the client, repeating this process until all platform links in the search task list are sent to the client. The server then analyzes and organizes the received web page content using XPath and Regular techniques. After all platforms corresponding to the platform links in the search task list have been searched, a material table containing specific material information and corresponding supplier information is generated and sent back to the client.
[0014] The client receives and saves the material list, and then displays the material list on the webpage of the browser.
[0015] The advantages of the above solution are as follows: Unlike the existing method of manually searching and organizing materials one by one, this invention embeds a browser in the client beforehand. This allows the browser to initiate a search request to the client via Ajax when the user enters the material model in the webpage search box. Through the established WebSocket connection between the client and server, the client can send the search request to the server. The server then inserts platform links into the search task list based on pre-configured search platform information. The client then sends HTTP requests to each target platform and crawls the webpage content. Finally, the server organizes the crawled webpage content from all target platforms to obtain a material list, which is then displayed on the browser page embedded in the client. The entire process fully utilizes the browser's ability to collect user input, send HTTP requests to target platforms, and crawl webpage content, as well as the server's high-performance processing capabilities for large amounts of data. This allows for the rapid and unified display of content from various e-commerce platforms on the same page in the same browser, eliminating the need for users to manually input, browse, record, and organize information, thus improving the efficiency and convenience of material searching. It also solves the problem of low convenience and efficiency for users purchasing materials from various e-commerce platforms, which previously required collecting and organizing material information from each platform individually.
[0016] In a further preferred embodiment, the material search management method further includes:
[0017] The client sends the received material list to the allocation platform;
[0018] The order matching staff will upload the Bill of Materials (BOM) corresponding to the materials to be purchased to the order matching platform;
[0019] The order matching platform pushes the BOM table and material table to the BOM algorithm matching program through the API interface provided by the BOM algorithm matching program.
[0020] The BOM algorithm matching program parses each row and column of the BOM table, extracts keywords row by row according to the parsing rules, selects products in the material table according to the classification mapping rules and replacement rules, and sends the selection results to the client.
[0021] The client receives and stores the selection result, and then displays the selection result on the webpage of the browser.
[0022] The above solution is effective because the materials to be procured involve a wide variety of models, brands, packages, and parameters, and the parameter descriptions for many materials are different, as are the parameter substitution rules for the same type. Therefore, in the past, the order matching process required order makers to have relatively professional knowledge and spend a lot of time, resulting in extremely low efficiency. This invention automatically collects material information and then uses a BOM algorithm matching program to parse the material information to be procured in the BOM table. According to the classification mapping rules and substitution rules, it can automatically match products in the material table, improving the order matching efficiency after material information retrieval and reducing the professional knowledge requirements for order makers.
[0023] In a further preferred embodiment, the BOM algorithm matching program parses each row and column of the BOM table, extracts keywords row by row according to the parsing rules, selects products in the material table according to the classification mapping rules and replacement rules, and sends the selection results to the client. The steps also include: the BOM algorithm matching program provides matching result prompts based on the parsing results of the BOM table, and sends the matching result prompts to the client to be displayed on the browser page.
[0024] The effect of the above solution is that: the non-standard BOM table leads to the information provided by the user not being completely accurate or complete, such as incomplete model numbers or missing parameters. Therefore, the prompts in the matching results are also particularly important. Clear prompts can help users accurately identify errors in the BOM table and quickly solve problems (BOM text: surface mount capacitor, 10%, 0402, parsing result prompt: missing necessary parameters capacitance value, rated voltage).
[0025] In a further preferred embodiment, the material is an electronic component, and the material search and management method further includes the following steps:
[0026] Product information for various electronic components is collected in advance, including model, brand, package and parameters. A basic data environment is built, and display information of electronic components from multiple e-commerce platforms is collected. Unit conversion rules, package conversion rules and brand representation rules are defined.
[0027] The above solution is effective because, due to the wide variety of electronic components (capacitors, resistors, diodes, transistors, connectors, etc.), there is no unified standard for parameter notation, and there are strict rules for parameter substitution between the same type (high precision for surface mount capacitors, 1% for low precision, 5% for high voltage, 25V for high voltage, etc.). Purchasing personnel must have in-depth professional knowledge of electronic components to ensure proper order matching. This invention, by pre-collecting information to build basic data and defining various rules, achieves automatic product matching under complex electronic component representation methods, thus improving the convenience of electronic component matching.
[0028] In a further preferred embodiment, the material is an electronic component, and the material search management method further includes the steps of: pre-collecting various BOM tables and defining parsing rules for extracting model, brand, package and parameters from various BOM tables.
[0029] The above solution is effective because: BOM tables come from different users and have diverse formats and contents. When matching orders, the main focus is on the product information provided in the BOM table, such as model, brand, package, and parameters. This invention, by pre-configuring parsing rules, enables the BOM algorithm matching program to parse various information of electronic components from various BOM tables, thereby making product matching and selection more accurate.
[0030] A system for implementing the above-mentioned material search and management method includes: a browser, a client, and a server, wherein the browser is embedded in the client, and a WebSocket connection is established between the client and the server;
[0031] The browser is used to receive the material model entered by the user in the webpage search box, initiate a search request to the client via an Ajax request; send an HTTP request to the target platform according to the received platform link, crawl the webpage content after the target platform responds, and send the crawled webpage content to the server; and present the material list fed back by the server.
[0032] The client is used to serialize the search request in MessagePack format, compress it using the LZ4 algorithm, and send the compressed search request to the server.
[0033] The server receives compressed search requests and, based on pre-configured search platform information, inserts links corresponding to the platforms to be searched into the search task list, and sends the platform links in the search task list to the client one by one; it also receives the page content and sends new platform links to the client, repeating this process until all platform links in the search task list are sent to the client; and it analyzes and organizes the received web page content using XPath and Regular techniques. After all platforms corresponding to the platform links in the search task list have been searched, it organizes the information into a material table containing specific material information and corresponding supplier information, and then feeds the obtained material table back to the client.
[0034] Since the system includes all the technical features of the material search and management method, it also has all the technical effects of the aforementioned material search and management method, which will not be elaborated further.
[0035] In a further preferred embodiment, the material search and management system further includes: a matching platform and a BOM algorithm matching program;
[0036] The client is also used to send the received material list to the allocation platform, receive and store the selection results, and present the selection results on the webpage of the browser;
[0037] The order matching platform is used to push the BOM table and material table uploaded by the order matching staff to the BOM algorithm matching program through the API interface provided by the BOM algorithm matching program.
[0038] The BOM algorithm matching program is used to parse each row and column of the BOM table, extract keywords row by row according to the parsing rules, select products in the material table according to the classification mapping rules and replacement rules, and send the selection results to the client.
[0039] In a further preferred embodiment, the BOM algorithm matching program is also used to provide a matching result prompt based on the parsing result of the BOM table, and send the matching result prompt to the client to be displayed on the browser page.
[0040] A storage medium storing a computer program, which, when executed by a processor, implements the steps of the material search and management method described above. The storage medium includes all the technical features of the material search and management method described above, and therefore also possesses all the technical effects of the method, which will not be elaborated further.
[0041] Unlike existing methods that require manual searching and organization of materials one by one, this invention embeds a browser in the client-side. This allows the browser to initiate a search request to the client via Ajax when the user enters the material model in the webpage search box. Through a pre-established WebSocket connection between the client and server, the client sends the search request to the server. The server then inserts platform links into the search task list based on pre-configured search platform information. The client then sends HTTP requests to each target platform and crawls the webpage content. Finally, the server organizes the crawled webpage content from all target platforms to obtain a material list, which is then displayed on the browser page embedded in the client. This entire process fully utilizes the browser's ability to collect user input, send HTTP requests to target platforms, and crawl webpage content, as well as the server's high-performance processing capabilities for large amounts of data. It can quickly and uniformly display the content from various e-commerce platforms on the same page in a single browser, eliminating the need for users to manually input, browse, record, and organize materials, thus improving the efficiency and convenience of material searching. Attached Figure Description
[0042] Figure 1 This is a flowchart of a material search and management method in a preferred embodiment of the present invention. Detailed Implementation
[0043] This invention provides a material search and management method, system, and storage medium. To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0044] The terminology used in this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a” and “the” used in this invention and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0045] It should be understood that although the terms first, second, third, etc., may be used in this invention to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if," as used herein, can be interpreted as "when," "when," or "in response to determination."
[0046] This invention provides a material search and management method, such as... Figure 1 As shown, it includes:
[0047] S10. Embed a browser in the client beforehand and establish a WebSocket connection between the client and the server.
[0048] WebSocket is a network transport protocol that enables full-duplex communication over a single TCP connection, residing in the application layer of the OSI model. WebSocket simplifies data exchange between clients and servers, allowing servers to proactively push data to clients. In the WebSocket API, the browser and server only need to complete a single handshake to establish a persistent connection and perform bidirectional data transmission. Therefore, this invention, by pre-embedding a browser in the client and establishing a WebSocket connection between the client and server, enables the browser, client, and server to form a unified and readily usable system. This allows users to perform simpler operations than browsing materials on a single platform: simply open the browser, enter the material model, and browse the material list to complete the collection and organization of materials.
[0049] S20. The browser receives the material model entered by the user in the webpage search box and sends a search request to the client via an Ajax request.
[0050] AJAX, short for "Asynchronous JavaScript and XML," refers to a technology where the browser initiates requests asynchronously via JavaScript to partially update a page. The characteristics of Ajax requests are: partial updates, no change in the browser's address bar, no discarding of the original page content, and requests for a small amount of information from the target page rather than the entire page. The reasons for choosing Ajax requests are twofold: firstly, to reduce the amount of data requested, thereby improving the efficiency of material information collection; and secondly, to reduce data noise on the server side when processing material information, thus improving the efficiency of material information processing.
[0051] S30. The client serializes the search request in MessagePack format, compresses it using the LZ4 algorithm, and sends the compressed search request to the server.
[0052] MessagePack is a high-efficiency binary serialization format that allows data exchange between multiple languages (C, Java, Ruby, Python, PHP, etc.). Its data format is similar to JSON, but it optimizes storage for numbers, multi-byte characters, and arrays, reducing unnecessary characters and the additional storage space required for characterization. Choosing to serialize search requests using MessagePack improves communication efficiency between the client and server, and allows the client to forward commands, requests, and data between the browser and server without language conversion limitations, making it more convenient. Furthermore, this invention uses the LZ4 algorithm to compress the serialized search request, minimizing communication latency between the client and server, further improving communication efficiency.
[0053] S40. The server receives the compressed search request and, based on the pre-configured search platform information, inserts the links corresponding to the platforms to be searched into the search task list, and sends the platform links in the search task list to the client one by one.
[0054] The search platform here refers to an e-commerce platform, or more precisely, the e-commerce platform that the user wants to search for. Since the main business and regional characteristics of merchants on each e-commerce platform differ, when searching for materials, requests are not sent to all search platforms. Instead, the target platform is determined based on pre-set parameters and the keywords entered by the user. Only then will the server send links to platforms that meet the criteria to the client. This reduces the number of requests while increasing the speed of obtaining target page content, and also reduces noise in the crawled webpage content, improving the efficiency of material information processing. Therefore, this invention improves the efficiency of material searching by pre-configuring search platform information.
[0055] S50: The browser sends an HTTP request to the target platform based on the received platform link, crawls the web page content after the target platform responds, and sends the crawled web page content to the server.
[0056] HTTP is a standard for client-server requests and responses (TCP). The client is the end user, and the server is the website. Using a web browser, web crawler, or other tools, the client initiates an HTTP request to a specified port on the server. In this invention, when the client receives the server's request, the browser embedded in the client can automatically initiate an HTTP request based on the received platform link and automatically crawl the page content. Since the server's search request is based on user-input keywords, the browser can directly use a web crawler to crawl the target page content, further improving the efficiency of material search.
[0057] S60. After receiving the page content, the server sends new platform links to the client, repeating this process until all platform links in the search task list are sent to the client. The server then analyzes and organizes the received web page content using XPath and Regular techniques. After all platforms corresponding to the platform links in the search task list have been searched, a material table containing specific material information and corresponding supplier information is generated and sent back to the client.
[0058] XPath, short for XMLPathLanguage, is a language for finding information in XML documents. Regular expressions describe a string matching pattern, which can be used to check if a string contains a certain substring, replace matching substrings, or extract substrings that meet certain conditions from a string. After receiving the crawled page content on the server side, XPath technology can be used to find material-related information in the page content, and regular expressions can be used for further filtering to ensure that the compiled data is complete and accurate. Moreover, this invention utilizes server-side resources to compile a material list, allowing the client to simply use a browser to display the material list.
[0059] S70. The client receives and saves the material list, and displays the material list on the webpage of the browser.
[0060] In a further preferred embodiment of the present invention, the material search management method further includes:
[0061] S80: The client sends the received material list to the allocation platform.
[0062] The order matching platform is a program independent of the client and server in this invention. It is not embedded in the client and server. Therefore, depending on the actual situation, the client and the order matching platform can be flexibly configured on the same or different carriers to improve ease of use.
[0063] S90. The order clerk uploads the BOM (Bill of Materials) corresponding to the materials to be purchased to the order matching platform.
[0064] A Bill of Materials (BOM) is a document that describes the product structure in a data format. It is a computer-readable product structure data file. The BOM is usually provided by the customer, which will not be elaborated upon here. However, it is understandable that in the traditional order matching process, after receiving the BOM from the customer, the salesperson sends it to the order matching clerk. The clerk needs to find suitable models based on the parameters provided in the BOM, combine various supply channels, process the BOM, and then return it to the salesperson, who then provides a quote and sends it back to the customer. If online inventory is involved in the order matching process, the clerk needs to spend a lot of time searching for material information from various e-commerce platforms, compiling a material list, and then manually matching it for the products. However, using the solution provided in the further preferred embodiment of this invention, the order matching clerk only needs to find the suitable model and enter keywords in the client's browser to obtain the material list, and then upload the BOM to the order matching platform. This eliminates the need for high-level professional knowledge and a large amount of manual operation, improving the efficiency and convenience of order matching.
[0065] S100, the order matching platform pushes the BOM table and material table to the BOM algorithm matching program through the API interface provided by the BOM algorithm matching program.
[0066] In practical implementation, the BOM algorithm relies on material information. Taking electronic components as an example, the BOM algorithm depends on a large amount of electronic component product information (model, brand, package, parameters, etc.). A basic data environment is built by collecting electronic component product information from various online channels. As the number of channels increases, the basic data will gradually improve over time. Because there are many types and models of electronic components, and the product information from different channels lacks a unified standard, a set of standards can be defined, including unit conversions (e.g., capacitance: 1F = 1000μF, 121 = 120pF, 1pF = 10⁹, 4.7pF = 47⁹, 0.1μF = 10⁴, etc.; resistance: 1502 = 15K). Ω, 6R80 = 6.8Ω, R047 = 0.047Ω, 101 = 100Ω, 102 = 1KΩ, etc.), package conversion (imperial and metric packages: 0201 = 0603, 0402 = 1005, 0603 = 1608, 0805 = 2012, 1206 = 3216, 1201 = 3225, 1812 = 4832, 2010 = 5025, 2512 = 6432, etc.), brand standardization (YAGEO = YAGEO, STMicroelectronics = ST = ST), etc. While including these, the included data should be standardized according to the defined specifications and stored in the basic data environment.
[0067] Since the BOM (Bill of Materials) forms come from different users, their formats and contents vary. When matching orders, we mainly focus on the product information provided in the BOM forms, such as model, brand, package, and parameters. We need to develop a set of rules for extracting product information such as model, brand, package, and parameters from the forms. First, our sales staff collected various styles of BOM forms from multiple customers. By observing the styles and contents of these BOM forms, we initially developed a set of parsing rules for extracting product information such as model, brand, package, and parameters from the BOM forms (for example, BOM text: 831R91127KR0201 General purpose thick film resistor, 127K, + / -1%, R0402, 1 / 16W.YAGEO C0402FR-07127KL, parsing rule result: resistance 127kΩ, accuracy 1%, power 1 / 16W, package 0201, brand YAGEO, model RC0402FR-07127KL). These rules will be gradually improved as more BOM forms are uploaded by users.
[0068] S110. The BOM algorithm matching program parses each row and column of the BOM table, extracts keywords row by row according to the parsing rules, selects products in the material table according to the classification mapping rules and replacement rules, and sends the selection results to the client.
[0069] S120. The client receives and stores the selection result, and presents the selection result on the webpage of the browser.
[0070] Therefore, due to the large variety of models, brands, packages, and parameters involved in the materials to be purchased, and the different ways of writing parameters for many materials, as well as the different rules for parameter substitution between the same types, the previous order allocation process required order locators to have relatively professional knowledge and spend a lot of time, resulting in extremely low efficiency. This invention automatically collects material information and then uses a BOM algorithm matching program to parse the information of the materials to be purchased in the BOM table. According to the classification mapping rules and substitution rules, it can automatically match products in the material table, improving the order allocation efficiency after material information retrieval and reducing the professional knowledge requirements for order locators.
[0071] In a further preferred embodiment of the present invention, S110 further includes: the BOM algorithm matching program providing a matching result prompt based on the parsing result of the BOM table, and sending the matching result prompt to the client for display on the browser's page. The provided result prompt may include: completely correct, brand mismatch, or missing parameters, etc.
[0072] Inconsistent BOM (Bill of Materials) information can lead to inaccurate or incomplete data provided by users, such as missing model numbers or parameters. Therefore, clear prompts in the matching results are crucial. Clear prompts allow users to accurately identify errors in the BOM and quickly resolve issues (BOM text: SMD capacitor, 10%, 0402; parsing result prompt: missing necessary parameters capacitance value and rated voltage).
[0073] The present invention also provides a system for implementing the above material search and management method, comprising: a browser, a client, and a server, wherein the browser is embedded in the client, and a WebSocket connection is established between the client and the server, as described in the above method embodiment, and will not be repeated here.
[0074] The browser is used to receive the material model entered by the user in the web page search box, initiate a search request to the client via an Ajax request; send an HTTP request to the target platform according to the received platform link, crawl the web page content after the target platform responds, and send the crawled web page content to the server; and present the material list fed back by the server, as described in the above method embodiment, which will not be repeated here.
[0075] The client is used to serialize the search request in MessagePack format, compress it using the LZ4 algorithm, and send the compressed search request to the server, as described in the above method embodiment, and will not be repeated here.
[0076] The server receives compressed search requests and, based on pre-configured search platform information, inserts links corresponding to the platforms to be searched into the search task list, and sends the platform links in the search task list to the client one by one; it also receives the page content and sends new platform links to the client, repeating this process until all platform links in the search task list are sent to the client; and it analyzes and organizes the received web page content using XPath and Regular techniques. After all platforms corresponding to the platform links in the search task list have been searched, it organizes the information into a material table containing specific material information and corresponding supplier information, and feeds the obtained material table back to the client. The specific implementation is as described in the above method embodiment, and will not be repeated here.
[0077] Since the system includes all the technical features of the material search and management method, it also has all the technical effects of the aforementioned material search and management method, which will not be elaborated further.
[0078] In a further preferred embodiment of the present invention, the material search and management system further includes: a matching platform and a BOM algorithm matching program, as described in the above method embodiments, and will not be repeated here.
[0079] The client is also used to send the received material list to the allocation platform, and to receive and store the selection results, and to present the selection results on the webpage of the browser, as described in the above method embodiment, and will not be repeated here;
[0080] The order matching platform is used to push the BOM table and material table uploaded by the order matching staff to the BOM algorithm matching program through the API interface provided by the BOM algorithm matching program, as described in the above method embodiment, and will not be repeated here.
[0081] The BOM algorithm matching program is used to parse each row and column of the BOM table, extract keywords row by row according to the parsing rules, select products in the material table according to the classification mapping rules and replacement rules, and send the selection results to the client. The specific method is as described in the above embodiment, and will not be repeated here.
[0082] In a further preferred embodiment of the present invention, the BOM algorithm matching program is also used to provide a matching result prompt based on the parsing result of the BOM table, and send the matching result prompt to the client to be displayed on the browser page, as described in the above method embodiment, and will not be repeated here.
[0083] A system for implementing a material search management method includes a memory and a processor. The memory stores a material search management program, and the processor runs the material search management program to implement the material search management method as described in any one of claims 1 to 8. The system includes all the technical features of the material search management method and therefore possesses all the technical effects of the aforementioned material search management method, which will not be elaborated further.
[0084] A storage medium storing a computer program, which, when executed by a processor, implements the steps of the material search and management method described above. The storage medium includes all the technical features of the material search and management method described above, and therefore also possesses all the technical effects of the method, which will not be elaborated further.
[0085] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAM bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0086] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this specification.
[0087] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A material search and management method, characterized in that, include: A browser is pre-embedded in the client, and a WebSocket connection is established between the client and the server; The browser receives the material model entered by the user in the webpage search box and sends a search request to the client via an Ajax request; The client serializes the search request in MessagePack format, compresses it using the LZ4 algorithm, and sends the compressed search request to the server. The server receives the compressed search request and, based on the pre-configured search platform information, inserts the links corresponding to the platforms to be searched into the search task list, and sends the platform links in the search task list to the client one by one. The browser sends an HTTP request to the target platform based on the received platform link, crawls the web page content after the target platform responds, and sends the crawled web page content to the server. After receiving the webpage content, the server sends new platform links to the client, repeating this process until all platform links in the search task list are sent to the client. The server then analyzes and organizes the received webpage content using XPath and Regular techniques. After all platforms corresponding to the platform links in the search task list have been searched, the server organizes the information into a material table containing specific material information and corresponding supplier information, and then feeds the material table back to the client. The client receives and saves the material list, and then displays the material list on the webpage of the browser.
2. The material search and management method according to claim 1, characterized in that, The material search and management method also includes: The client sends the received material list to the allocation platform; The order matching staff will upload the Bill of Materials (BOM) corresponding to the materials to be purchased to the order matching platform; The order matching platform pushes the BOM table and material table to the BOM algorithm matching program through the API interface provided by the BOM algorithm matching program. The BOM algorithm matching program parses each row and column of the BOM table, extracts keywords row by row according to the parsing rules, selects products in the material table according to the classification mapping rules and replacement rules, and sends the selection results to the client. The client receives and stores the selection result, and then displays the selection result on the webpage of the browser.
3. The material search and management method according to claim 2, characterized in that, The steps of the BOM algorithm matching program parsing each row and column of the BOM table, extracting keywords row by row according to the parsing rules, selecting products in the material table according to the classification mapping rules and replacement rules, and sending the selection results to the client also include: the BOM algorithm matching program providing matching result prompts based on the parsing results of the BOM table, and sending the matching result prompts to the client to be displayed on the browser page.
4. The material search and management method according to claim 1, characterized in that, The material is an electronic component, and the material search and management method further includes the following steps: Product information for various electronic components is collected in advance, including model, brand, package and parameters. A basic data environment is built, and display information of electronic components from multiple e-commerce platforms is collected. Unit conversion rules, package conversion rules and brand representation rules are defined.
5. The material search management method according to claim 1, characterized in that, The material is an electronic component, and the material search and management method further includes the steps of: pre-collecting various BOM tables and defining parsing rules for extracting model, brand, package and parameters from various BOM tables.
6. A system for implementing the material search and management method as described in any one of claims 1 to 5, characterized in that, include: The system includes a browser, a client, and a server, wherein the browser is embedded in the client, and a WebSocket connection is established between the client and the server. The browser is used to receive the material model entered by the user in the webpage search box, initiate a search request to the client via an Ajax request; send an HTTP request to the target platform according to the received platform link, crawl the webpage content after the target platform responds, and send the crawled webpage content to the server; and present the material list fed back by the server. The client is used to serialize the search request in MessagePack format, compress it using the LZ4 algorithm, and send the compressed search request to the server. The server receives compressed search requests and, based on pre-configured search platform information, inserts links corresponding to the platforms to be searched into the search task list, and sends the platform links in the search task list to the client one by one; it also receives web page content and sends new platform links to the client, repeating this process until all platform links in the search task list have been sent to the client; and it analyzes and organizes the received web page content using XPath and Regular techniques. After all platforms corresponding to the platform links in the search task list have been searched, it organizes the information into a material table containing specific material information and corresponding supplier information, and then feeds the obtained material table back to the client.
7. The material search and management system according to claim 6, characterized in that, The material search and management system also includes: a matching platform and a BOM algorithm matching program; The client is also used to send the received material list to the allocation platform, receive and store the selection results, and present the selection results on the webpage of the browser; The order matching platform is used to push the BOM table and material table uploaded by the order matching staff to the BOM algorithm matching program through the API interface provided by the BOM algorithm matching program. The BOM algorithm matching program is used to parse each row and column of the BOM table, extract keywords row by row according to the parsing rules, select products in the material table according to the classification mapping rules and replacement rules, and send the selection results to the client.
8. The material search and management system according to claim 7, characterized in that, The BOM algorithm matching program is also used to provide matching result prompts based on the parsing results of the BOM table, and send the matching result prompts to the client to be displayed on the browser page.
9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the material search and management method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Vertical search engine and method for searching contrast association shopping information
CN102968495A
Access request verification method and device, storage medium and electronic device
CN110958239A