Quick query method for thermosensitive cashier paper product facilitating auxiliary quotation
By using web crawlers to retrieve the original information of thermal POS paper products, and querying the matching degree using the specifications and parameters in the data table, the database is automatically updated. This solves the problem of slow information synchronization during the quoting process for thermal POS paper products, and achieves an efficient and accurate quoting process.
Patent Information
- Application Number
- CN202511112252.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-11-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the current process of quoting prices for thermal cash register products, manual data collection and database queries are inefficient, market information cannot be synchronized in a timely manner, and the information crawled by web crawlers is incomplete, resulting in low quotation efficiency, especially for new products or alternatives.
By crawling web pages to retrieve raw information about production materials, querying the matching degree of specifications in the data table, automatically updating the database, recording the specifications of new products or alternatives, and updating the quotation data according to the necessity and matching degree of the matched parameters, the information is synchronized and accurate.
It automates the pricing process for thermal cash register products, enables rapid querying and information synchronization, improves pricing efficiency, ensures the accuracy and timeliness of information, and reduces labor costs.
Smart Images

Figure CN120929495A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a method for quickly querying thermal cash register products to facilitate quotations. Background Technology
[0002] Thermal POS paper products come in various types and are suitable for different scenarios, including supermarkets, medical facilities, logistics, catering, and offices. Different scenarios require thermal POS paper products with different characteristics or performance. Therefore, the raw materials used in the production of thermal POS paper products need to have various specifications and parameters when quoting and purchasing them.
[0003] Currently, price quotations often require manual labor to collect market prices of raw materials with different specifications, perform database queries, and input the information. This results in low quoting efficiency and an inability to synchronize with market information on raw materials in a timely manner. Although web crawling technology can be used to retrieve relevant market price information for raw materials, the information retrieved by web crawlers is often incomplete, missing, or has different specifications than the raw materials used in previous quotations (e.g., the emergence of new or substitute raw materials). To improve quoting efficiency, manual labor is still needed to verify and sort the retrieved information, as well as query and input local data. This is especially true when new raw materials (or substitute raw materials) need to be sorted for quoting reference, as manual database queries and data input are slow. Therefore, conventional methods cannot quickly and effectively synchronize information from the internet to the local database. Summary of the Invention
[0004] To address the aforementioned issues, this invention provides a method for quickly querying thermal cash register products to facilitate quotations.
[0005] The present invention provides a method for quickly querying thermal cash register products to facilitate quotations, employing the following technical solution: One embodiment of the present invention provides a method for quickly querying thermal cash register paper products to facilitate quotations. The method includes the following steps: The data table stores multiple price quotes for the same raw material, each consisting of several specifications; several original information records for the same raw material are retrieved from the internet. D1: Query the specifications contained in each original information in each quotation data in the data table, and record the specifications that are found and those that are not found as hit parameters and miss parameters, respectively; for the hit parameters obtained from different quotation data for each original information, the difference in the query matching degree of the hit parameters is used as a reference indicator for each original information. D2: Take the largest number of original data points from the reference indicators as new quote data and store them in the data table; when several original data points are retrieved again and D1 is executed again; D3: Based on the distribution of missing parameters in all quotation data within the data table, determine the query necessity of each specification parameter; based on the query necessity and matching degree of the hit parameters in each newly added quotation data, update the reference indicators of each newly added quotation data. Among all original information and all newly added quotation data, select the original information with the largest reference indicators and re-add them as newly added quotation data, and store them back into the data table to maximize the query necessity of all specification parameters and the matching degree of all hit parameters in all quotation data within the data table.
[0006] Preferably, the specific steps for using the differences in query matching degree of the hit parameters obtained from different quotation data for each piece of original information as a reference indicator for each piece of original information are as follows: For each piece of original information, when the category difference of the query matching degree of all the hit parameters is greater than the preset threshold, the quote data is recorded as the target data, and the category with the smallest average query matching degree among all the hit parameters is recorded as the target category. For any quote data outside the target data, for all hit parameters of each original information in the quote data, the difference between the query match degree of all hit parameters included in the target category and the average query match degree in the target category is recorded as the first difference of any quote data outside the target data. The maximum value of the first difference among all the quote data outside the target data is denoted as the target data hit parameter query difference, and the average value of the hit parameter query differences of all target data is denoted as the reference index for each piece of original information.
[0007] Preferably, the specific steps for obtaining the query necessity of each specification parameter based on the distribution of missing parameters in all quotation data within the data table using all original information are as follows: For any specification parameter, when querying all quotation data, obtain all original information and find the ratio of the number of times the specification parameter is used as a missing parameter to the number of records of all original information, denoted as x; obtain the average query matching degree y when the specification parameter is used as a hit parameter. The query necessity is negatively correlated with x and positively correlated with y.
[0008] Preferably, the specific steps for updating the reference indicators of each newly added quote data based on the query necessity and matching degree of the hit parameters in each newly added quote data are as follows: For each piece of original information, obtain all hit parameters in each newly added quote data, and get the average of the query necessity of all hit parameters and the matching degree of all hit parameters, which is denoted as the first average. For all the original information, the mean of the first mean obtained is denoted as the adjustment coefficient for each newly added quotation data; the updated reference indicator is positively correlated with the adjustment coefficient.
[0009] Preferably, among all the original information and all the newly added quotation data, the original information with the largest reference indicators is re-added as new quotation data and stored again in the data table. This maximizes the necessity of querying all specification parameters and the matching degree of all hit parameters in all quotation data in the data table. The specific steps include the following: After the newly obtained quotation data is re-stored into the data table, and before fetching several original information entries again, D3 is executed repeatedly. After each re-execution of D3, the updated evaluation index is obtained based on the query necessity of all specification parameters and the query matching degree of all hit parameters in all specification parameters. The newly obtained quotation data is stored in the data table when the updated evaluation index reaches its maximum value.
[0010] Preferably, the query matching degree of the hit parameter is the difference between the value of the hit parameter in each quotation data and the value of the hit parameter in each piece of original information.
[0011] Preferably, all original information, excluding the newly added quotation data, with reference indicators lower than a preset reference threshold is recorded as synchronization information; for any synchronization information and all hit parameters obtained from any quotation data in the data table, when the average query matching degree of all hit parameters is greater than a first preset threshold, the synchronization information is updated into the quotation data.
[0012] Preferably, when the category difference of the query matching degree of all hit parameters is greater than a preset threshold, the quote data is recorded as target data, and the category with the smallest average query matching degree among all hit parameters is recorded as the target category. The specific steps include the following: K-Means clustering is performed on the query matching degree of all hit parameters to obtain two categories. The category with the highest average query matching degree is denoted as the first category, and the average query matching degree of the first category is denoted as F1. The category with the lowest average query matching degree is denoted as the second category, and the average query matching degree of the second category is denoted as F2. When (F1-F2) / (F1+F2) is greater than a preset threshold, the quotation data is denoted as the target data. For any target data, the second category of the target data is denoted as the target category.
[0013] Preferably, the step of obtaining the updated evaluation index includes: Obtain the mean G1 of the query necessity of all specification parameters, and the mean G2 of the query matching degree of all hit parameters among all specification parameters. Denote G1+G2 as the update evaluation index.
[0014] Preferably, for each piece of original information, the difference between the query match degree of all hit parameters in the target category and the average query match degree in the target category is recorded as the first difference of any quote data outside the target data. The specific steps include the following: For any quote data outside the target data, the mean of the query match rate of each original information among all the hit parameters of the quote data and all hit parameters included in the target category is denoted as A. The difference between A and the average query match rate in the target category is denoted as the first difference of any quote data outside the target data.
[0015] The beneficial effects of the technical solution of the present invention are: This invention utilizes raw material information captured from the internet to query and update data tables in a database, avoiding the problems of slow query speed and low information synchronization efficiency caused by manually verifying and sorting raw information and querying data tables in the database one by one for information confirmation.
[0016] Specifically, this invention retrieves the specification parameters contained in each original piece of information from each quotation data entry in the data table, and records the retrieved and unretrieved specification parameters as hit parameters and miss parameters, respectively. For the hit parameters obtained from different quotation data entries for each original piece of information, the differences in the query matching degree of the obtained hit parameters are used as reference indicators for each original piece of information. The original pieces of information with the largest reference indicators are added as new quotation data and stored in the data table. This process is used, on the one hand, to record the production raw materials (or production raw materials with new specification parameters) of new products that appear in the market but have not yet been recorded in the database, providing rich reference data for subsequent quotation processes.
[0017] Furthermore, this invention updates the reference indicators of each newly added quotation data based on the query necessity and matching degree of the hit parameters in each new quotation data, and re-acquires the new quotation data and re-stores it into the data table, thereby maximizing the query necessity and the matching degree of all hit parameters. This process takes into account that since the original information and the newly added quotation data may lack some specification parameters (i.e., there are missing parameters), even if several quotation data are added to the data table, there is a possibility that the subsequently retrieved original information may still not be accurately and reliably synchronized to the data table. This process, by updating the newly added quotation data, ensures that the query necessity of the hit parameters and the matching degree of all hit parameters are maximized. This ensures that the newly added quotation data not only provides rich reference for the subsequent quotation process as raw materials for the production of new products, but is also easily queried and hit by the original information, allowing the retrieved original information to be more effectively synchronized and updated to the data table.
[0018] Compared to the existing practice of manually querying databases for information entry, this invention enables automated and rapid querying of data tables in the database and effective synchronous updates. Effective synchronous updates refer to the ability to synchronize as much raw material information from the internet as possible into the database tables, ensuring that the synchronized information is relevant for later pricing and improves pricing efficiency. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the steps of a method for quickly querying thermal cash register products to facilitate quotations, as provided in one embodiment of the present invention. Detailed Implementation
[0021] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a method for quickly querying thermal cash register products that facilitates assisted pricing, based on the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0023] The following description, in conjunction with the accompanying drawings, details a specific scheme for a method of quickly querying thermal cash register products that facilitates quotations, provided by the present invention.
[0024] Example 1: Please see Figure 1 The diagram illustrates a flowchart of a method for quickly querying thermal cash register products to facilitate quotations, according to an embodiment of the present invention. The method includes the following steps: Step S101: Store the raw materials and pricing information related to the production of thermal cash register paper products into a data table in the database. Each pricing data entry consists of several specification parameters.
[0025] The thermal POS paper products in this embodiment come in various types and are suitable for different scenarios, including supermarkets, medical facilities, logistics, catering, and offices. Different scenarios require thermal POS paper products with different characteristics or performance. For example, kitchen and cold storage scenarios require additional waterproof / oil-proof / high-temperature resistant coatings; office and medical scenarios use UV inks to ensure adhesion; and different scenarios tend to purchase thermal POS paper products with different durability or prices.
[0026] Therefore, the raw materials and production processes for the thermal POS paper products in this embodiment are diverse. For the same raw material, multiple specifications are required during quoting and procurement to facilitate the production of thermal POS paper products for different scenarios. For example, as one of the raw materials for thermal POS paper products, the purity of the wood pulp, the fiber type, the paper strength, the smoothness, the air permeability, the pH, and even the width of the paper roll all have different requirements when producing thermal POS paper products for different scenarios. Similarly, raw materials such as color developers, fillers, and adhesives require different specifications when producing thermal POS paper products for different scenarios. When purchasing the same raw material for thermal POS paper products, raw materials with different specifications need to be purchased. Since raw materials with different specifications have different prices from different suppliers, this embodiment needs to formulate multiple quotation data, each consisting of several specifications. As an example, for the raw material of raw paper, some fields (i.e., specifications) of two quotation data for raw paper in the database table are shown in the following table:
[0027] The data tables in the database contain fields that specify several parameters of the raw materials used in production. Each price quote in the data table has different parameter values. The data tables in this embodiment also contain other fields, such as the lowest market price and the highest market price, which will not be shown in detail here. In this embodiment, there must be at least one price quote for the same raw material in the data tables.
[0028] Step S102: Retrieve several pieces of original information about the same production raw material from the Internet, and query the specification parameters contained in each piece of original information in each quotation data in the data table. Record the queried and unqueried specification parameters as hit parameters and unhit parameters, respectively.
[0029] One comparative implementation involves staff (e.g., purchasing personnel) proactively inquiring about prices at relevant suppliers' physical stores (or factories) or searching for raw material prices online. They then compile and record the market prices of these raw materials, query the local database one by one based on the recorded information, and synchronously update the data tables in the database. This facilitates the development of quotations and procurement plans based on the data tables.
[0030] In this comparative example, the entire quotation process relies too heavily on the information gathering capabilities of staff, and on manual queries and data entry into the database. On the one hand, this increases the investment of human resources and time costs, and on the other hand, it makes it impossible to update the quotation data in the data table in a timely manner. For example, it is impossible to update the market price of each quotation data in a timely manner. More importantly, it is impossible to discover new raw materials for production in the market (or substitutes for existing raw materials), which makes it impossible to make reasonable quotations efficiently.
[0031] In this embodiment, web crawler technology is used to capture information about each type of production raw material in real time from the Internet (referred to as raw information). Based on this raw information, the quotation data in the data table is automatically updated in a timely manner. Compared with manual data collection, manual database query and information entry, this embodiment can quickly query the database based on the captured raw information and efficiently synchronize information, which is beneficial to the efficiency of subsequent quotation.
[0032] Specifically, several pieces of raw information about the same production raw material are retrieved from the Internet, such as all the raw information about the same production raw material retrieved every other day, and this raw information is stored in Redis.
[0033] For any original message in Redis, the jieba word segmentation technology is used to extract all keywords of the original message. These keywords may contain the specification parameters of the raw materials in the data table. In this embodiment, the specification parameters contained in each original message are queried in each quotation data in the data table (that is, whether the specification parameters in each quotation data appear in all the keywords). The queried specification parameters (that is, the specification parameters that exist in all keywords) are recorded as hit parameters, and the specification parameters that are not queried are recorded as miss parameters.
[0034] For each matched parameter, a query match score is obtained. This score describes whether the value of the matched parameter in the data table is the same as or similar to the value in the original information. A higher match score indicates that the value of the matched parameter in the data table is the same as or similar to the value in the original information. A lower match score indicates that the value of the matched parameter in the data table differs significantly from the value in the original information.
[0035] Step S103: For each piece of original information, the hit parameters obtained from different price data are used as reference indicators for each piece of original information, based on the differences in the query matching degree of the hit parameters. The original information with the largest reference indicators are added as new price data and stored in the data table.
[0036] The reference index for each piece of original information indicates whether the content included in the original information can be used to update the market price of each quotation in the data table, or whether it can be used as the specification parameters of raw materials (or substitutes for raw materials) for new products. When the reference index is large, it indicates that the query matching degree of the hit parameters of this original information varies significantly across different quotation data, meaning there are no identical quotation data entries where the query matching degree of all hit parameters for that quotation data is high. In this case, the original information is less likely to be used to update the same quotation data (e.g., it cannot be used to update the highest and lowest market prices of the same quotation data), and the content included in this original information is more likely to be used as raw materials for new products. When the reference index is small, it indicates that the query matching degree of the hit parameters of this original information reaches a high value in one quotation data entry. In this case, it is considered that the original information and the quotation data describe the same specification of product. The market price contained in this original information is used to update the highest and lowest market prices in that quotation data. In this case, the content included in this original information is less likely to be used as raw materials for new products.
[0037] For the most significant (e.g., 10) raw data points, retrieve the value of each raw data point under each hit parameter (along with the included market price). Insert a new row of quote data into the data table, and fill in these values into the corresponding fields of the newly inserted row (e.g., the fields corresponding to the hit parameters). Redis retains this raw information. Specifically, if a value for each hit parameter is missing (or not present), its value is marked as null (indicating an empty value or non-existence).
[0038] At this point, the most significant original data points are added as new pricing data and stored in the data table. The purpose is twofold: firstly, to record the raw materials (or substitutes for new specifications) of new products appearing in the market but not yet recorded in the database, thus providing rich reference data for subsequent pricing processes.
[0039] On the other hand, considering that some specification parameters (i.e., missing parameters) may be missing in the raw information captured by the Internet of Things, there may be erroneous updates when updating the market price in the raw information to the quotation data based on the query matching degree of the hit parameters; adding quotation data to the data table will help to update the market price in the raw information to the specific quotation data more accurately in the future, and avoid the market price in the quotation data being incorrect and losing the reference value of the quotation.
[0040] As an optional example, for each piece of original information, the difference in query matching degree of the obtained hit parameters from different quotation data is used as a reference indicator for each piece of original information. The methods include: For each piece of original information in Redis, the matching parameters obtained from each quote in the data table (see step S102) are used to perform K-Means clustering on the query matching degree of all matching parameters, resulting in two categories. The category with the highest average query matching degree is denoted as the first category, and the average query matching degree of the first category is denoted as F1. The category with the lowest average query matching degree is denoted as the second category, and the average query matching degree of the second category is denoted as F2. When (F1-F2) / (F1+F2) is greater than the threshold th (th=0.1 in this embodiment), it indicates that there is a significant difference in query matching degree for the quote data, and each piece of original information cannot match all the matching parameters of the quote data simultaneously. The quote data is then designated as the target data.
[0041] Retrieve all target data from all quote data within the data table.
[0042] For any target data, the second category of the target data is denoted as the target category; for any quotation data outside the target data, obtain all the hit parameters of each original information in the quotation data, obtain all the hit parameters included in the target category (denoted as the hit parameter set), the mean of the query matching degree of these hit parameters in the target category (i.e., in the hit parameter set) is denoted as A, and the difference between A and the mean of the query matching degree in the target category is denoted as the first difference of any quotation data outside the target data.
[0043] For all quotes outside the target data, there is a first difference. The maximum value of these first differences is recorded as the query difference of the hit parameters in the target data. The larger the query difference of the hit parameters, the higher the query matching degree of the hit parameters in the target data. This means that the hit parameters with relatively high query matching degree in other quotes have relatively low query matching degree in the target data.
[0044] Similarly, the difference in the hit parameters of all target data is obtained, and the average of the difference in the hit parameters of all target data is recorded as the reference index for each piece of original information.
[0045] Specifically, when the target data does not exist, the newly added quotation data is no longer retrieved. Instead, step S102 is executed again, which means that the original information is retrieved from the Internet again and the hit parameters and non-hit parameters are obtained.
[0046] Specifically, if all hit parameters of all quote data other than the target data are not in the target category, then the target data is no longer considered. If all target data exist and all hit parameters are not in the target category, then step S102 is executed again.
[0047] Step S104: After retrieving several more pieces of original information, obtain the query necessity of each specification parameter based on the distribution of the missing parameters in all the quotation data in the data table.
[0048] In this embodiment, after retrieving several pieces of original information (still stored in Redis), the necessity of querying each specification parameter is determined based on the distribution differences of the missing parameters in all the quotation data in the data table for all the original information in Redis.
[0049] The query necessity parameter describes the missing information for different specifications within a data table after new quote data has been added, specifically the distribution of cases where each specification parameter in the quote data is not found when each specification parameter is queried from all original information within the data table after new quote data has been added.
[0050] The lower the necessity of the query, the more likely that even after adding new quotation data, each specification parameter may not be found in all quotation data, or even not at all, or there is no need to query it; this leads to the problem of incorrect synchronization updates of existing quotation data information (such as the specification information and market price information of new products).
[0051] The greater the necessity of the query, the higher the probability that each specification parameter can be found in all the quotation data, or even that the specification parameter can be found in all the quotation data, or that there is a need to query it. This further indicates that after adding quotation data to the data table, each specification parameter is meaningful to query (specifically, it is feasible and beneficial to subsequent quotation reference to update the market price and other information of the quotation data by querying each specification parameter).
[0052] It should be noted that after retrieving several pieces of original information, it is necessary to re-obtain the hit parameters and miss parameters, as well as the reference indicators for each piece of original information, according to steps S102 and S103, and then use the above method to obtain the necessity of the query.
[0053] It should also be noted that the original information in this embodiment refers to all the original information in Redis. When S102 and S103 are re-executed in this step (and in all subsequent steps), the original information used refers to all the original information stored in Redis (including the original information retrieved from history), and the quotation data used refers to all the quotation data stored in the data table (including newly added quotation data). In particular, in this embodiment, Redis is cleared once a week.
[0054] As an optional example, the query necessity for each specification parameter is determined based on the distribution differences of the missing parameters across all quote data within the data table, including: For any specification parameter, the ratio of the number of times the specification parameter is a missed parameter to the total number of records of all original information when retrieving all quotation data is denoted as x. x describes the distribution of missed parameters among different original information records when retrieving quotation data. The larger x is, the more prevalent this situation is in most query processes. Let exp(-x) denote the query necessity for each specification parameter, and exp() represent an exponential function with the natural constant as its base.
[0055] As a preferred example, the query necessity for each specification parameter is determined based on the distribution of missing parameters across all quotation data within the data table, including: For any given specification parameter, when retrieving all raw information from all quotation data, the ratio of the number of times this specification parameter was a missed parameter to the total number of records in the raw information is denoted as x. Obtain the average query match rate y when the specification parameter is used as the hit parameter, and use y / (x+1) as the query necessity. The purpose of adding 1 to the denominator is to avoid a denominator of 0. In the process, a higher query match rate when the specification parameter is hit and fewer times it is not hit indicate a greater query necessity.
[0056] Step S105: Update the reference indicators of each newly added quotation data according to the query necessity and matching degree of the hit parameters in each newly added quotation data. Among all the original information and all the newly added quotation data, the original information with the largest reference indicators are re-used as newly added quotation data and re-stored into the data table.
[0057] In step S103, several pieces of raw information are selected from the captured raw information based on reference indicators and stored in a data table as newly added quotation data. This data records the raw materials (or raw materials with new specifications) for new products that have appeared in the market but have not yet been recorded in the database, providing rich reference for subsequent quotation processes. However, considering that some specifications may be missing (i.e., missing parameters) in the raw information captured from the Internet of Things (including the newly added quotation data), there may be erroneous updates when updating the market prices in the raw information to the quotation data based on the query matching degree of the hit parameters. In order to update the market prices in the raw information to the specific quotation data more accurately after adding quotation data to the data table, and to avoid the market prices in the quotation data being incorrect and losing their reference significance, this embodiment needs to update the newly added quotation data in the data table as raw information is continuously captured.
[0058] Specifically, the reference indicators for each newly added quote are updated based on the query necessity and matching degree of the hit parameters in each quote. Among all the original information and all the newly added quotes, the original information with the largest reference indicators are reused as newly added quotes and stored in the data table again.
[0059] One issue considered is that the reference indicators obtained in step S103 are based on the difference in the matching degree of the hit parameters. However, since the original information and newly added quotation data may lack some specification parameters (i.e., there are missing parameters), even if several quotation data are added to the data table, there is still a situation where the subsequently retrieved original information cannot accurately and reliably synchronize information (such as the specification parameters and market prices of newly added raw materials) to the data table. Based on this, this embodiment updates the reference indicators of each newly added quotation data according to the query necessity and matching degree of the hit parameters in each newly added quotation data, and re-obtains the newly added quotation data based on the updated reference indicators.
[0060] As an example, the reference metrics for each new quote are updated based on the query necessity and matching degree of the hit parameters in each new quote, including: For all raw information in Redis, each raw information receives several hit parameters in each newly added quote data. Since each specification parameter corresponds to a query necessity, each hit parameter also corresponds to a query necessity.
[0061] For each piece of raw information in Redis, obtain all the hit parameters in each newly added quote data, and get the average of the query necessity of all hit parameters and the matching degree of all hit parameters, which is denoted as the first average.
[0062] Specifically, if no hit parameters are obtained, the reference indicators for newly added quote data will not be updated.
[0063] For all the original information in Redis, the average of the corresponding first mean is denoted as the adjustment factor for each newly added quote data. The larger the adjustment factor, the greater the necessity of querying the newly added quote data (i.e., it can be queried by most of the original information) and the higher the query matching degree. In this case, it means that the newly added quote data can still be used as the specification parameters of the raw materials (or substitutes) for the new product, and it should be retained in the data table. When the adjustment factor is smaller, it should be removed from the data table.
[0064] It should be noted that since the adjustment coefficient is obtained based on the query of all raw information in Redis after the newly added quotation data is updated, the reference indicators for the newly added quotation data need to be updated using the adjustment coefficient. The updated reference indicators are positively correlated with the adjustment coefficient. The reference indicators for raw information other than the newly added quotation data are obtained according to step S103.
[0065] For all reference metrics of original information in Redis (including updated reference metrics corresponding to newly added quote data), the original information of a maximum number of these reference metrics (e.g., 10) is used as newly added quote data and stored again in the data table. If the newly obtained quote data already exists in the data table, it will not be stored again.
[0066] As an example, the reference indicators for newly added pricing data need to be updated using adjustment factors. The updated reference indicators are positively correlated with the adjustment factors, including: The updated reference index R = (1 + w) × R0, where R0 represents the original reference index, w represents the relative adjustment coefficient, w = w0 - r, where w0 represents the adjustment coefficient, and r represents the preset baseline parameter. In this embodiment, r = 0.4; in other embodiments, it can be set to other values, and this embodiment does not impose specific limitations. When w0 - r is greater than 0, it indicates that R0 is increased; when w0 - r is less than 0, it indicates that R0 is decreased.
[0067] Thus, this embodiment updates the data table using the newly captured original information (i.e., updates the newly added quotation data). Subsequently, after each capture of original information, the data table is continuously updated with newly added quotation data.
[0068] In this embodiment, the newly added quotation data in the data table is used as a reference for subsequent quotations. For example, it can be used to refer to the specifications and market prices of raw materials for new product production to determine whether they can be purchased. Specifically, quoting and purchasing based on the data table is a well-known technique, and this embodiment will not elaborate or limit it.
[0069] This concludes the example.
[0070] Example 2: After completing step S105, and before the original information of the same production raw material has been captured (e.g., less than one day), step S105 is repeated. The general process is as follows: for the newly acquired quotation data, and after these quotation data are stored in the data table, all the original information in Redis is used to query each newly acquired quotation data in the data table to obtain the hit parameters and non-hit parameters, and to obtain the query necessity and matching degree of the hit parameters (which has been described in detail in Example 1). Then, the query necessity and matching degree of the hit parameters are used to update the reference indicators of each newly acquired quotation data in the data table, and then several newly acquired quotation data are obtained again and stored in the data table.
[0071] Then, obtain the mean G1 of the query necessity of all specification parameters obtained in the process, and the mean G2 of the query matching degree of all hit parameters in the specification parameters. G1+G2 is recorded as the update evaluation index.
[0072] Then repeat the process described above in this embodiment until the original information is captured again. Then, store all the newly added quotation data obtained when the evaluation index is at its maximum into the data table (the previously acquired newly added quotation data is deleted from the data table).
[0073] This process updates the newly added quotation data to ensure the necessity of querying the hit parameters and the matching degree of all hit parameters as high as possible. This makes the newly added quotation data not only a rich reference for the subsequent quotation process as raw materials for the production of new products, but also easy to be queried and hit by the original information, which can make the captured original information more effectively updated to the data table.
[0074] Example 3: During the implementation of all the above embodiments, all original information in Redis is synchronously updated to the data table, specifically including: Each piece of original information corresponds to a reference indicator; all original information (excluding original information that is used as newly added quotation data) whose reference indicator is less than the reference threshold (e.g., less than 0.3) is recorded as synchronization information.
[0075] For any synchronized message and any quote data in the database (including newly added quote data), if the average query match rate of all hit parameters is greater than a first preset threshold (e.g., greater than 0.7), the market price contained in the synchronized message is updated in the quote data. For example, if the market price contained in the synchronized message is greater than the maximum market price stored in the quote data, the maximum market price stored in the quote data is replaced with the market price contained in the synchronized message. If the market price contained in the synchronized message is less than the minimum market price stored in the quote data, the minimum market price stored in the quote data is replaced with the market price contained in the synchronized message.
[0076] Specifically, if the synchronized information does not include a market price (i.e., when a market price is missing), it will not be updated in that quote data.
[0077] Example 4: The query match degree of the hit parameter represents the difference between the value of the hit parameter in each quote data and the value of the hit parameter in each original information.
[0078] As an example, methods for obtaining the query match degree of the hit parameters include: Get the value of the hit parameter in each quote data, denoted as k1. Get the value of the hit parameter in each original information, denoted as k2. Get the mean of k1 and k2. The ratio of (k1-k2) to the mean is recorded as the query matching degree.
[0079] As another example, when k1 and k2 are ranges (or sets), the intersection and union of k1 and k2 is compared to the query match score. Specifically, if the range of values has no upper or lower limit, then k1 or k2 is considered as the lower or upper limit of the range, and the query match score is obtained using the above example.
[0080] As another example, the query match score is set to 0 when either k1 or k2 is non-existent or marked as null.
[0081] Example 5: This embodiment uses neural network technology to query the hit and miss parameters contained in each piece of original information from each quote data. This addresses the problem of inaccurate keyword extraction by jieba word segmentation technology caused by numerous interfering words, diverse meanings, and complex semantic structures (e.g., diverse units and dimensions, and significant differences in sentence structure from the quote data) within the original information. Specifically, it includes: Each quote data (including specifications and their values) and each piece of raw information are output into the Transformer neural network. The output includes a word that is synonymous with each specification parameter contained in each piece of raw information, as well as the value of that word in the raw information (keeping the same unit as the value of the specification parameter in the quote data).
[0082] If a specification parameter has at least one synonym, it is recorded as a hit parameter; otherwise, it is recorded as a miss parameter.
[0083] The training method for Transformer neural networks is as follows: Take any one piece of raw data and any one piece of quotation data as a sample. Manually label each specification parameter with synonyms found in the raw information (marked as a space if no synonym exists), and label the values with the same unit (marked as null if no corresponding value exists in the raw information). Use the labeling results as the sample's label. All the obtained samples and labels constitute the dataset.
[0084] In some embodiments, the values of the specification parameters in the original information are no longer marked. Instead, the query matching degree of the specification parameters is directly marked. The range of the marked query matching degree is {0, 0.1, 0.1, ..., 0.9}. The larger the marked query matching degree, the closer the value of the specification parameter in the quotation data is to the value in the original information. When there is no value (or the value is marked as null), the query matching degree is marked as 0.
[0085] Using this dataset, a Transformer neural network is trained using the mean squared error loss function and stochastic gradient descent. It should be noted that in this embodiment, values marked as null are treated as the constant -1000000 during training; in other embodiments, they can also be treated as other constants, and this embodiment is not limited to this.
[0086] Transformer neural networks are a well-known technology. For example, models such as GPT4 contain Transformer neural networks. This embodiment will not elaborate on its network structure and specific training process.
[0087] In other embodiments, the GPT4 model can be used directly to obtain the hit parameters (and their values) and the miss parameters.
[0088] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for quickly querying thermal cash register products to facilitate quotations, characterized in that, The method includes the following steps: The data table stores multiple price quotes for the same raw material, each consisting of several specifications; several original information records for the same raw material are retrieved from the internet. D1: Query the specifications contained in each original information in each quotation data in the data table, and record the specifications that are found and those that are not found as hit parameters and miss parameters, respectively; for the hit parameters obtained from different quotation data for each original information, the difference in the query matching degree of the hit parameters is used as a reference indicator for each original information. D2: Take the largest number of original data points from the reference indicators as new quote data and store them in the data table; when several original data points are retrieved again and D1 is executed again; D3: Based on the distribution of missing parameters in all quotation data within the data table, determine the query necessity of each specification parameter; based on the query necessity and matching degree of the hit parameters in each newly added quotation data, update the reference indicators of each newly added quotation data. Among all original information and all newly added quotation data, select the original information with the largest reference indicators and re-add them as newly added quotation data, and store them back into the data table to maximize the query necessity of all specification parameters and the matching degree of all hit parameters in all quotation data within the data table.
2. The method for quickly querying thermal cash register products to facilitate quotations, as described in claim 1, is characterized in that... The specific steps involved in using the differences in query matching degree of the obtained hit parameters for each piece of original information from different price data as a reference indicator for each piece of original information are as follows: For each piece of original information, when the category difference of the query matching degree of all the hit parameters is greater than the preset threshold, the quote data is recorded as the target data, and the category with the smallest average query matching degree among all the hit parameters is recorded as the target category. For any quote data outside the target data, for all hit parameters of each original information in the quote data, the difference between the query match degree of all hit parameters included in the target category and the average query match degree in the target category is recorded as the first difference of any quote data outside the target data. The maximum value of the first difference among all the quote data outside the target data is denoted as the target data hit parameter query difference, and the average value of the hit parameter query differences of all target data is denoted as the reference index for each piece of original information.
3. The method for quickly querying thermal cash register products to facilitate quotations, as described in claim 1, is characterized in that... The specific steps for determining the query necessity of each specification parameter based on the distribution of missing parameters in all quotation data within the data table using all original information are as follows: For any specification parameter, when querying all quotation data, obtain all original information and find the ratio of the number of times the specification parameter is used as a missing parameter to the number of records of all original information, denoted as x; obtain the average query matching degree y when the specification parameter is used as a hit parameter. The query necessity is negatively correlated with x and positively correlated with y.
4. The method for quickly querying thermal cash register products to facilitate quotations, as described in claim 1, is characterized in that... The specific steps involved in updating the reference indicators for each newly added quote based on the query necessity and matching degree of the hit parameters in each quote are as follows: For each piece of original information, obtain all hit parameters in each newly added quote data, and get the average of the query necessity of all hit parameters and the matching degree of all hit parameters, which is denoted as the first average. For all the original information, the mean of the first mean obtained is denoted as the adjustment coefficient for each newly added quotation data; the updated reference indicator is positively correlated with the adjustment coefficient.
5. The method for quickly querying thermal cash register products to facilitate quotations, as described in claim 1, is characterized in that... From all the original information and all the newly added quotation data, the original information with the largest reference indicators is re-added as new quotation data and stored again in the data table. This maximizes the necessity of querying all specifications and parameters in all quotation data and the matching degree of all hit parameters. The specific steps include the following: After the newly obtained quotation data is re-stored into the data table, and before fetching several original information entries again, D3 is executed repeatedly. After each re-execution of D3, the updated evaluation index is obtained based on the query necessity of all specification parameters and the query matching degree of all hit parameters in all specification parameters. The newly obtained quotation data is stored in the data table when the updated evaluation index reaches its maximum value.
6. The method for quickly querying thermal cash register products to facilitate quotations, as described in claim 1, is characterized in that... The query matching degree of the hit parameter is the difference between the value of the hit parameter in each quotation data and the value of the hit parameter in each original information.
7. The method for quickly querying thermal cash register products to facilitate quotations, as described in claim 1, is characterized in that... All original information, excluding newly added quotation data and whose reference indicators are less than the preset reference threshold, is recorded as synchronization information. For any synchronization information and all hit parameters obtained from any quotation data in the data table, when the average query matching degree of all hit parameters is greater than the first preset threshold, the synchronization information is updated to the quotation data.
8. The method for quickly querying thermal cash register products to facilitate quotations, as described in claim 2, is characterized in that... When the category difference of the query matching degree of all hit parameters is greater than a preset threshold, the quote data is recorded as target data, and the category with the smallest average query matching degree among all hit parameters is recorded as the target category. The specific steps include the following: K-Means clustering is performed on the query matching degree of all hit parameters to obtain two categories. The category with the highest average query matching degree is denoted as the first category, and the average query matching degree of the first category is denoted as F1. The category with the lowest average query matching degree is denoted as the second category, and the average query matching degree of the second category is denoted as F2. When (F1-F2) / (F1+F2) is greater than a preset threshold, the quotation data is denoted as the target data. For any target data, the second category of the target data is denoted as the target category.
9. The method for quickly querying thermal cash register products to facilitate auxiliary quotation as described in claim 5, characterized in that, The steps for obtaining the updated evaluation metrics include: Obtain the mean G1 of the query necessity of all specification parameters, and the mean G2 of the query matching degree of all hit parameters among all specification parameters. Denote G1+G2 as the update evaluation index.
10. The method for quickly querying thermal cash register products to facilitate quotations, as described in claim 8, is characterized in that... For each piece of original information, the difference between the query match rate of all hit parameters in the target category and the average query match rate in the target category is recorded as the first difference of any quote data outside the target data. The specific steps include the following: For any quote data outside the target data, the mean of the query match rate of each original information among all the hit parameters of the quote data and all hit parameters included in the target category is denoted as A. The difference between A and the average query match rate in the target category is denoted as the first difference of any quote data outside the target data.