A calculation method and device
Through standardized processing and data cleaning of user price adjustment behavior logs, combined with resampling algorithms and confidence level parameters, the price range of building materials is determined, which solves the problem of inaccurate calculation results of clustering algorithms in the existing technology and achieves more accurate prices. Interval calculation.
Patent Information
- Application Number
- CN202010583497.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-23
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-06-23
AI Technical Summary
When the existing technology uses clustering algorithms, the range of results for calculating the price range of building materials is too large and not accurate enough. It is especially difficult to accurately calculate when the data set values are continuous.
By obtaining user price adjustment behavior logs, standardization processing and data cleaning are performed, and the resampling algorithm and confidence level parameters are used to determine the predicted price range, eliminate outliers, and calculate a reasonable price range.
It achieves more accurate calculation of building material price ranges and solves the problem of inaccurate results of clustering algorithms on continuous data sets.
Smart Images

Figure CN111737317B
Abstract
Description
Technical Field
[0001] The present invention relates to a data processing technology, and in particular to a calculation method and device. Background Art
[0002] In the field of engineering cost, calculating the reasonable price range of building materials is a scenario application of data mining based on the results of price adjustment behavior log cleaning. Its purpose is to explore the reasonable price range of each building material in different regions, engineering formats, and material specifications and attributes, which can provide data reference for some factors affecting material prices and end-user material selection and pricing. The reasonable price range of building materials means that for a large number of construction projects in the same region and the same engineering format, the price fluctuations of the same building material selected in the cost stage should be within one or several relatively stable ranges within a time period. The materials within this price range are also the materials that cost users often choose to use; some materials have several price ranges because the materials themselves have a grade division due to differences in materials, brands, and manufacturing processes. This is particularly evident in the field of decoration.
[0003] In terms of price range estimation, existing technologies mostly use clustering algorithms. However, in some data sets with relatively continuous values, the price range results calculated by the clustering algorithm are too large and not accurate enough. Summary of the invention
[0004] To achieve the above-mentioned purpose, the technical solution of the embodiment of the present invention is implemented as follows: According to one aspect of the embodiment of the present invention, a measurement method and device are provided, and the method includes: obtaining a user price adjustment behavior log; based on the classification result of the user price adjustment behavior log, standardizing the user behavior record to determine a standardized data set; obtaining a non-abnormal data set from the standardized data set, and determining a predicted price range based on a resampling algorithm and confidence level parameters.
[0005] In the above scheme, the user behavior record is standardized according to the classification result of the user price adjustment behavior log to determine a standardized data set, including: detecting the variety attribute value in the user price adjustment behavior log through keyword matching and regular expressions to obtain the detection result; if the detection result is no match, the cleaning fails and the user price adjustment behavior log is saved to the database; if the detection result is a match, the value of the material specification is extracted for processing.
[0006] In the above scheme, if the detection result is a match, the value of the material specification is extracted for processing, including: extracting the specific attribute values of the user price adjustment behavior log one by one through the rules of the regular expression; judging whether the specific attribute values need to be reorganized or converted to obtain a judgment result; if the judgment result is necessary, unifying the non-standard units into standard units to obtain a standardized data set, and saving it to the database.
[0007] In the above scheme, the user behavior records are standardized according to the classification results of the user price adjustment behavior logs. After the standardized data set is determined, it also includes: extracting data of a preset time period from the standardized data set and filtering to obtain a new data set; if the new data set is greater than or equal to 50, sorting the new data set, and using the quartile method to remove 20% of the data that may have outliers at both ends to obtain the non-abnormal data set.
[0008] In the above scheme, the predicted price range is determined according to the resampling algorithm and the confidence level parameter, including: obtaining the non-abnormal data set; randomly selecting n records from the n data of the non-abnormal data set to obtain the latest data set; sorting the latest data set, setting the positions of the upper and lower quartiles with the confidence level parameter, extracting the data on the upper and lower quartiles, recording them as the values of the upper and lower limits of the interval, and putting them into the upper and lower limit arrays respectively.
[0009] In the above scheme, after putting the upper and lower limit arrays respectively, it also includes: judging whether the lengths of the upper and lower arrays meet the preset lengths; if not, continuing to randomly select n records from the n data in the non-abnormal data set.
[0010] In the above scheme, judging whether the lengths of the upper and lower arrays meet the preset lengths also includes: if the preset lengths are met, averaging the upper and lower limit arrays respectively; and obtaining a reasonable average price range based on the averages.
[0011] In the above scheme, before obtaining the user price adjustment behavior log, it includes: obtaining sample data; merging the name and attribute description information of the sample data, wherein the sample data includes: building material data and non-building material data; performing word segmentation processing to generate new records; vectorizing the new records, and training them through a text classification algorithm to form a classification model.
[0012] According to another aspect of an embodiment of the present invention, a calculation device is provided, comprising: an acquisition unit for acquiring a user price adjustment behavior log; a cleaning unit for standardizing the user behavior record according to a classification result of the user price adjustment behavior log to determine a standardized data set; and a calculation unit for acquiring a non-abnormal data set from the standardized data set, and determining a predicted price range according to a resampling algorithm and a confidence level parameter.
[0013] According to another aspect of an embodiment of the present invention, a calculation device is provided, which includes: a memory, a processor, and a responsive program stored in the memory and executed by the processor, wherein the processor responds to any of the steps of the calculation method described above when executing the responsive program.
[0014] The present invention provides a method and device for calculating, which obtains a user's price adjustment behavior log; performs standardization processing on the user's behavior record according to the classification result of the user's price adjustment behavior log to determine a standardized data set; obtains a non-abnormal data set from the standardized data set, and determines a predicted price range according to a resampling algorithm and a confidence level parameter. The price range within a reasonable range is calculated more accurately through the resampling algorithm and the confidence level parameter. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of an implementation flow of a calculation method provided in an embodiment of the present invention;
[0016] Figure 2 Another implementation flow diagram provided for an embodiment of the present invention;
[0017] Figure 3 Another implementation flow diagram provided for an embodiment of the present invention;
[0018] Figure 4 Another implementation flow diagram provided for an embodiment of the present invention;
[0019] Figure 5 Another implementation flow diagram provided for an embodiment of the present invention;
[0020] Figure 6 Another implementation flow diagram provided for an embodiment of the present invention;
[0021] Figure 7 Another implementation flow diagram provided for an embodiment of the present invention;
[0022] Figure 8 Another implementation flow diagram provided for an embodiment of the present invention;
[0023] Fig. 9 The structure of the measuring device in the embodiment of the present invention is shown in FIG. Figure 1 . DETAILED DESCRIPTION
[0024] In order to more thoroughly understand the features and technical contents of the present invention, the implementation of the present invention is described in detail below in conjunction with the accompanying drawings. The attached drawings are only for reference and explanation, and are not used to limit the present invention.
[0025] Figure 1 A schematic diagram of the implementation flow of a calculation method provided in an embodiment of the present invention is provided, the purpose of which is to perform offline data cleaning and data mining on the price adjustment behavior log, such as Figure 1 As shown, the method includes:
[0026] Step S101, obtaining a user price adjustment behavior log;
[0027] The user's price adjustment behavior log is non-standardized data before classification, that is, the data in the user's price adjustment behavior log needs to be converted into the same data format, file format, etc. as the sample data.
[0028] Step S102, performing standardization processing on the user behavior records according to the classification result of the user price adjustment behavior log to determine a standardized data set;
[0029] Furthermore, the classifier trained by the offline user price adjustment behavior log is classified and processed; according to the classification results, the data cleaning script / rule under the corresponding classification is found, and the information of the user price adjustment behavior log data is extracted and converted, and the price adjustment material data with inconsistent descriptions and semi-structured is converted into standardized and structured record data with unified names for storage. According to a dimensional combination of materials, a batch of data is extracted from the accumulated result data, and the quartile method of the box plot is used to filter out the data that may be abnormal.
[0030] Furthermore, for example, data cleaning is performed on the behavior logs of building materials: first, the desensitized behavior logs of users adjusting the price of building materials during the cost stage are classified and processed through the trained building material secondary category classifier, and then the corresponding cleaning script is taken out from the building material data cleaning script library according to the classification results, and then according to the set rules, the standard name, variety, characteristics, specifications, models, units, prices, regions, and engineering formats of building materials are extracted and converted from the behavior logs to obtain structured and standardized description data of building material price adjustments and save them in the database. If the result of the classifier processing is not in the secondary category, the record is marked and stored back in the database.
[0031] Step S103, obtaining a non-abnormal data set from the standardized data set, and determining a predicted price range according to a resampling algorithm and confidence level parameters.
[0032] Furthermore, according to a dimensional combination of materials, a batch of data is extracted from the accumulated result data, and the quartile method of the box plot is used to filter out data that may be abnormal. An adjustable confidence interval parameter is added on the basis of the resampling algorithm (Bootstraping) to calculate the reasonable price range of a material under the above dimensional combination. The reasonable price range of building materials is calculated. Although this embodiment is an offline processing method for cleaning log data, by slightly modifying the output method in the step processing, real-time data cleaning can also be achieved for other scenarios, such as making real-time recommendations based on user operations.
[0033] In another embodiment, if Figure 2 As shown, according to the classification result of the user price adjustment behavior log, the user behavior record is standardized to determine a standardized data set, including:
[0034] Step S201, detecting the product attribute value in the user price adjustment behavior log by keyword matching and regular expression to obtain the detection result;
[0035] Furthermore, a set of regular expressions is used to detect whether the input data can be matched. If there is a match, it can be determined that the current input data belongs to a material type under the current secondary category. Taking "single-leaf solid wood decorative door" as an example, the matching regular expression can be written as "^(?=.*[original hard birch red rubber cherry silver silk real acacia Eucalyptus cypress pine grapefruit zebra maple elm sycamore sandalwood catalpa pear toon poplar cypress linden oak] wood)(?=.*decorative door)(?=.*single leaf).*$", which can match various common wooden single-leaf decorative doors. The detection order of a set of matching rules is sorted by the length of the matching results, with the principle of "longer first, shorter last, and exit when matched".
[0036] Step S202: If the detection result is no match, the cleaning fails, and the user price adjustment behavior log is saved to the database;
[0037] Furthermore, if the detection result of step S201 does not match, that is, the variety has no value, it is said that the classifier is not paired or the extraction rules in step S201 are not fully covered. Then the current record is marked as failed to match, and the record is saved in the database for manual intervention and optimization processing in the future.
[0038] Step S203, if the detection result is a match, extracting the value of the material specification for processing;
[0039] Further, if there is a value for the variety extracted in step S201, extract the value of the material specification. This step still uses a set of regular expressions as the detection rules to extract the height / length, width, and thickness of a single solid wood door from the input data, such as "(?i)(\d+\.\d+|\d+)[cmwh长宽高厚\s]*[xX*×]\s*(\d+\.\d+|\d+)[cmwh长宽高厚\s]*[xX*×]\s*(\d+\.\d+|\d+)[cmwh长宽高厚\s]*". If a match can be made, extract the three numerical values, sort the numerical values, and reorganize and output "height × width × thickness" according to the convention; if no match can be made, then sequentially use other rules backward to detect whether there are numerical values for "height" and "width".
[0040] In another embodiment, as Figure 3 shown, if the detection result is a match, extract the value of the material specification for processing, including:
[0041] Step S301, extract the specific attribute values of the user price adjustment behavior log item by item according to the rules of the regular expression;
[0042] Further, according to the variety result, detect and extract other attribute values of the current variety.
[0043] Step S302, determine whether the specific attribute value needs to be reorganized or converted to obtain a judgment result;
[0044] Further, according to the extracted attribute values, whether conversion and reorganization are required. For example, if the input data in step 303 is "2m high 1.2m wide 45mm thick", the ideal output result is "2000×1200×45", but without converting the unit of the numerical value, the output result will be "45×2×1.2", which is obviously incorrect; at this time, conversion needs to be performed according to the unit coefficient of the numerical value and output in the unified standard unit "mm".
[0045] Step S303, if the judgment result is yes, unify the non-standard unit into the standard unit to obtain a standardized data set and save it to the database;
[0046] Further, convert the pricing unit of the material and unify some non-standard units into the standard unit. Still taking the solid wood door as an example, in the field of project cost, generally the unit is "㎡", but some users use the unit "set" provided by the supplier during compilation. At this time, conversion needs to be performed according to the actual area of the door to calculate the installation quantity of the door area.
[0047] After the processing of the above steps, the cleaning process of a piece of material data is completed, and the database access interface saves the cleaned result to the data warehouse for subsequent data mining use.
[0048] In another embodiment, if Figure 4 As shown, according to the classification result of the user price adjustment behavior log, the user behavior record is standardized, and after the standardized data set is determined, it also includes:
[0049] Step S401, extracting data of a preset time period from the standardized data set and filtering it to obtain a new data set;
[0050] Furthermore, the present invention is a pre-processing step for calculating the reasonable price range, which is used to remove outliers through the quartile algorithm before calculation. The reason why this part of the content is not included in data cleaning is that in implementation, each time a category of material is taken from the data warehouse, and then a dimension combination is made in the memory according to different attribute characteristics, and then a data subset copy of a dimension combination to be calculated is extracted from the material data loaded into the memory. The operation of removing outliers is performed on the subset copy, which has no effect on the original cleaning result.
[0051] Step S402, if the new data set is greater than or equal to 50, the new data set is sorted, and 20% of the data with possible outliers at both ends are removed by quartile method to obtain the non-outlier data set;
[0052] Furthermore, whether outliers need to be removed depends on the amount of data in the subset copies. If the number is greater than or equal to 50, the quartile method is used to remove 20% of the data before and after; otherwise, the calculation is terminated because the interval results calculated with too little data will have a large deviation.
[0053] In another embodiment, Figure 5 As shown, the predicted price range is determined according to the resampling algorithm and the confidence level parameter, including:
[0054] Step S501, obtaining the non-abnormal data set;
[0055] Furthermore, a data set from which outliers have been removed is taken, and two arrays Au and Al are preset to store the upper and lower limit results of the intermediate calculations.
[0056] Step S502, randomly selecting n records from the n data of the non-abnormal data set to obtain the latest data set;
[0057] Furthermore, n records are randomly selected from a data set containing n records. After each selection, the selected data is not taken out of the data set. After the operation, a new data set Sn containing n records will be obtained.
[0058] Step S503, sorting the latest data set, setting the positions of the upper and lower quartiles with confidence level parameters, extracting the data on the upper and lower quartiles, recording them as the values of the upper and lower limits of the interval, and putting them into the upper and lower limit arrays respectively;
[0059] Furthermore, the data set Sn is sorted from small to large, the positions of the upper and lower quartiles are set using the confidence level parameter, and the data on the upper and lower quartiles are extracted, recorded as the upper and lower limit values of an interval and inserted into the defined Au and Al arrays.
[0060] In another embodiment, Figure 6 As shown, and put into the upper and lower limit arrays respectively, it also includes:
[0061] Step S601, determining whether the lengths of the upper and lower arrays meet a preset length;
[0062] Further, steps S502-S503 are repeated 500 times to determine whether the preset length is met.
[0063] Step S602: If the preset length is not met, then continue to randomly select n records from the n data in the non-abnormal data set.
[0064] In another embodiment, Figure 7 As shown, judging whether the lengths of the upper and lower arrays meet the preset lengths also includes:
[0065] Step S701, if the preset length is met, then average the upper and lower limit arrays respectively;
[0066] Step S702, obtaining the predicted price range according to the average value;
[0067] Furthermore, take the arrays Au and Al, calculate the average values of Au and Al respectively, and record them as the reasonable price range of one dimensional combination of the current material.
[0068] In summary, the present invention provides a method for cleaning building material data and testing a reasonable price range of building materials using the cleaning results. The classifier model is trained using the data of the own labeled material secondary category in combination with the collected non-material data as a training sample data set, so that the accuracy of the classification of the user price adjustment behavior log is significantly improved; the specification attribute extraction script / rule library accumulated in the field of building materials is used to clean and convert the cost user behavior log, avoiding the entity recognition method that cannot be carried out due to the lack of labeled data, and solving the problem that the price adjustment log brings difficulties to data mining due to the unstructured problem; and it realizes the elimination of outliers for a finer-grained combined data set, and calculates the reasonable price range through multiple rounds of resampling algorithms and confidence interval detection methods, solving the problem that the price range calculated by the clustering algorithm is too large when the data set values are relatively continuous.
[0069] In another embodiment, Figure 8 As shown, before obtaining the user price adjustment behavior log, the following steps are included:
[0070] Step S801, acquiring sample data, and merging the name and attribute description information of the sample data, wherein the sample data includes: building material data and non-building material data;
[0071] Furthermore, the sample data includes “building material data that has been marked and classified in the own business database” and “non-building material information data collected and entered”, and all non-building material data are marked as “other”.
[0072] Step S802, perform word segmentation processing to generate a new record;
[0073] Step S803, vectorizing the new record and training it through a text classification algorithm to form a classification model;
[0074] Furthermore, a multi-classification regression prediction algorithm, no matter what is input, the classifier will calculate the possible probability of belonging to each classification, sort the probabilities and take the classification corresponding to the maximum probability as the result output. If the training data set is all building materials, when the user inputs non-building material data, there will always be a classification result output, which is always wrong at this time; in order to avoid this situation, non-building material data is added to the training data set as negative sample data, so as to reduce the wrong prediction results when the user inputs unexpected data. Another key point is data enhancement processing, using the building material synonym library accumulated by the own business system and the common user input typos comparison table, the results after word segmentation are replaced with several rounds of random numbers, so as to obtain the data training set, so that the training set can be enhanced, and the trained classifier can adapt to more unknown and similar descriptive word input.
[0075] In another embodiment, the device includes: an acquisition unit for acquiring a user price adjustment behavior log; a cleaning unit for standardizing the user behavior record according to the classification result of the user price adjustment behavior log to determine a standardized data set; a measurement unit for acquiring a non-abnormal data set from the standardized data set, and determining a predicted price range according to a resampling algorithm and a confidence level parameter.
[0076] In another embodiment, the device includes: a memory, a processor, and a responsive program stored in the memory and executed by the processor, wherein the processor responds to the steps of the measurement method when executing the responsive program.
[0077] Fig. 9 The structure of the measuring device in the embodiment of the present invention is shown in FIG. Figure 1 ,like Fig. 9 As shown, the measuring device 500 can be a handle, a mouse, a trackball, a mobile phone, a smart pen, a smart watch, a smart ring, a smart bracelet, a smart glove, etc. Fig. 9 The computing device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and a user interface 503. The various components in the computing device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Fig. 9 Various buses are labeled as bus system 505 .
[0078] The user interface 503 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0079] It can be understood that the memory 502 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 302 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memories.
[0080] The memory 502 in the embodiment of the present invention is used to store various types of data to support the operation of the measurement device 500. Examples of these data include: any computer program used to operate on the measurement device 500, such as an operating system 5021 and an application 5022; music data; animation data; book information; video, drawing information, etc. Among them, the operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 can include various applications, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program that implements the method of the embodiment of the present invention can be included in the application 5022.
[0081] The method disclosed in the above embodiment of the present invention can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 501 or the instruction in the form of software. The above processor 501 can be a general processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 501 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be combined to execute. The software module can be located in a storage medium, which is located in the memory 502. The processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0082] In an exemplary embodiment, the measuring device 500 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.
[0083] Specifically, when the processor 501 runs the computer program, it executes: obtaining a user price adjustment behavior log; standardizing the user behavior record according to the classification result of the user price adjustment behavior log to determine a standardized data set; obtaining a non-abnormal data set from the standardized data set, and determining a predicted price range according to a resampling algorithm and a confidence level parameter.
[0084] When the processor 501 runs the computer program, it also executes: based on the classification result of the user price adjustment behavior log, standardizing the user behavior record to determine a standardized data set, including: detecting variety attribute values in the user price adjustment behavior log through keyword matching and regular expressions to obtain detection results; if the detection result is no match, the cleaning fails and the user price adjustment behavior log is saved to the database; if the detection result is a match, the value of the material specification is extracted for processing.
[0085] When the processor 501 runs the computer program, it also executes: if the detection result is a match, extracting the value of the material specification for processing, including: extracting the specific attribute values of the user price adjustment behavior log one by one through the rules of the regular expression; judging whether the specific attribute values need to be reorganized or converted, and obtaining a judgment result; if the judgment result is necessary, unifying the non-standard units into standard units, obtaining a standardized data set, and saving it to the database.
[0086] When the processor 501 runs the computer program, it also executes: based on the classification result of the user price adjustment behavior log, standardizing the user behavior record, and after determining the standardized data set, it also includes: extracting data of a preset time period from the standardized data set and filtering to obtain a new data set; if the new data set is greater than or equal to 50, sorting the new data set, and using the quartile method to remove 20% of the data that may have outliers at both ends to obtain the non-abnormal data set.
[0087] When the processor 501 runs the computer program, it also executes: determining the predicted price range based on the resampling algorithm and the confidence level parameter, including: obtaining the non-abnormal data set; randomly selecting n records from the n data of the non-abnormal data set to obtain the latest data set; sorting the latest data set, setting the positions of the upper and lower quartiles with the confidence level parameter, extracting the data on the upper and lower quartiles, recording them as the values of the upper and lower limits of the interval, and putting them into the upper and lower limit arrays respectively.
[0088] When the processor 501 runs the computer program, it also executes: and after putting the upper and lower limit arrays respectively, it also includes: judging whether the lengths of the upper and lower arrays meet the preset lengths; if they do not meet the preset lengths, continue to randomly select n records from the n data in the non-abnormal data set.
[0089] When the processor 501 runs the computer program, it also executes: determining whether the lengths of the upper and lower arrays meet a preset length, and also includes: if the preset length is met, averaging the upper and lower limit arrays respectively; and obtaining the predicted price range based on the average value.
[0090] When the processor 501 runs the computer program, it also executes: before obtaining the user price adjustment behavior log, it includes: obtaining sample data; merging the name and attribute description information of the sample data, wherein the sample data includes: building material data and non-building material data; performing word segmentation processing to generate new records; vectorizing the new records, and training them through a text classification algorithm to form a classification model.
[0091] In an exemplary embodiment, the present invention also provides a computer-readable storage medium, such as a memory 502 including a computer program, and the computer program can be executed by a processor 501 of a data processing device 500 to complete the steps of the aforementioned method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, FlashMemory, magnetic surface memory, optical disk, or CD-ROM; or it can be various devices including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc.
[0092] A computer-readable storage medium stores a computer program, which, when executed by a processor, performs the following steps: obtaining a user price adjustment behavior log; performing standardization processing on the user behavior record according to the classification result of the user price adjustment behavior log to determine a standardized data set; obtaining a non-abnormal data set from the standardized data set, and determining a predicted price range according to a resampling algorithm and a confidence level parameter.
[0093] When the computer program is executed by the processor, the computer program further executes: based on the classification result of the user price adjustment behavior log, the user behavior record is standardized to determine a standardized data set, including:
[0094] The variety attribute values in the user price adjustment behavior log are detected by keyword matching and regular expressions to obtain a detection result; if the detection result is no match, the cleaning fails and the user price adjustment behavior log is saved to a database; if the detection result is a match, the material specification value is extracted for processing.
[0095] When the computer program is executed by the processor, the computer program also executes: if the detection result is a match, extracting the value of the material specification for processing, including: extracting the specific attribute value of the user price adjustment behavior log one by one according to the rule of the regular expression; judging whether the specific attribute value needs to be reorganized or converted to obtain a judgment result; if the judgment result is necessary, unifying the non-standardized units into standard units to obtain a standardized data set, and saving it to the database.
[0096] When the computer program is executed by the processor, the program also executes: based on the classification result of the user price adjustment behavior log, the user behavior record is standardized, and after the standardized data set is determined, the program also includes: extracting data of a preset time period from the standardized data set and filtering it to obtain a new data set; if the new data set is greater than or equal to 50, the new data set is sorted, and 20% of the data that may have abnormal values at both ends are eliminated by the quartile method to obtain the non-abnormal data set.
[0097] When the computer program is executed by the processor, the processor also executes: determining the predicted price range according to the resampling algorithm and the confidence level parameter, including: obtaining the non-abnormal data set; randomly selecting n records from the n data of the non-abnormal data set to obtain the latest data set; sorting the latest data set, setting the positions of the upper and lower quartiles with the confidence level parameter, extracting the data on the upper and lower quartiles, recording them as the values of the upper and lower limits of the interval, and putting them into the upper and lower limit arrays respectively.
[0098] When the computer program is executed by the processor, it also executes: and after putting the upper and lower limit arrays respectively, it also includes: judging whether the lengths of the upper and lower arrays meet the preset lengths; if the preset lengths are not met, then continuing to randomly select n records from the n data of the non-abnormal data set.
[0099] When the computer program is executed by the processor, the computer program also executes: determining whether the lengths of the upper and lower arrays meet the preset lengths, and further includes: if the preset lengths are met, averaging the upper and lower limit arrays respectively; and obtaining the predicted price range based on the average values.
[0100] When the computer program is run by the processor, it also executes: before obtaining the user price adjustment behavior log, it includes: obtaining sample data; merging the name and attribute description information of the sample data, wherein the sample data includes: building material data and non-building material data; performing word segmentation processing to generate new records; vectorizing the new records, and training them through a text classification algorithm to form a classification model.
[0101] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A calculation method, characterized in that: The method comprises: Obtain user price adjustment behavior logs; According to the classification result of the user price adjustment behavior log, the user price adjustment behavior log data is standardized to determine a standardized data set; Obtaining a non-abnormal data set from the standardized data set, and determining a predicted price range based on a resampling algorithm and a confidence level parameter; Wherein, determining the predicted price range according to the resampling algorithm and the confidence level parameter includes: Randomly select n records from the non-abnormal data set to obtain the latest data set; Sorting the latest data set, setting the positions of the upper and lower quartiles with confidence level parameters, extracting the data on the upper and lower quartiles, recording them as the values of the upper and lower limits of the interval, and putting them into the upper and lower limit arrays respectively; Determine whether the lengths of the upper and lower limit groups meet the preset lengths; If the preset length is not met, continue to randomly select n records from the non-abnormal data set; If the preset length is met, the upper and lower limit arrays are averaged respectively; The predicted price range is obtained according to the average value.
2. The method according to claim 1, characterized in that: According to the classification result of the user price adjustment behavior log, the user price adjustment behavior log data is standardized to determine a standardized data set, including: Detecting the product attribute value in the user's price adjustment behavior log by keyword matching and regular expressions to obtain the detection result; If the detection result is no match, the cleaning fails, and the user price adjustment behavior log is saved to the database; If the detection result is a match, the value of the material specification is extracted for processing.
3. The method according to claim 2, characterized in that If the test result is a match, the value of the material specification is extracted for processing, including: Extracting specific attribute values of the user price adjustment behavior log one by one according to the rule of the regular expression; Determine whether the specific attribute value needs to be reorganized or converted, and obtain a determination result; If the judgment result is that it is necessary, the non-standard units are unified into standard units to obtain a standardized data set, and the standardized data set is saved in the database.
4. The method according to claim 3, characterized in that: According to the classification result of the user price adjustment behavior log, the user price adjustment behavior log data is standardized, and after the standardized data set is determined, the method further includes: Extracting data of a preset time period from the standardized data set and filtering them to obtain a new data set; If the new data set is greater than or equal to 50, the new data set is sorted, and 20% of the data with possible abnormal values at both ends are removed by quartile method to obtain the non-abnormal data set.
5. The method according to claim 1, characterized in that: Before obtaining the user price adjustment behavior log, the following steps are included: Get sample data; Merging the name and attribute description information of the sample data, wherein the sample data includes: building material data and non-building material data; Perform word segmentation processing to generate new records; The new records are vectorized and trained through a text classification algorithm to form a classification model.
6. A measuring device, characterized in that: The device comprises: An acquisition unit, used to acquire a user's price adjustment behavior log; A cleaning unit, configured to perform standardization processing on the user price adjustment behavior log data according to the classification result of the user price adjustment behavior log, and determine a standardized data set; A calculation unit, used to obtain a non-abnormal data set from the standardized data set, and determine a predicted price range according to a resampling algorithm and a confidence level parameter; Wherein, the measuring unit is also used for: Randomly select n records from the non-abnormal data set to obtain the latest data set; Sorting the latest data set, setting the positions of the upper and lower quartiles with confidence level parameters, extracting the data on the upper and lower quartiles, recording them as the values of the upper and lower limits of the interval, and putting them into the upper and lower limit arrays respectively; Determine whether the upper and lower limit array lengths meet the preset lengths; If the preset length is not met, continue to randomly select n records from the non-abnormal data set; If the preset length is met, the upper and lower limit arrays are averaged respectively; The predicted price range is obtained according to the average value.
7. A measuring device, characterized in that: The device comprises: a memory, a processor and a responsive program stored in the memory and executed by the processor, wherein the processor responds to the steps of the measurement method according to any one of claims 1 to 5 when executing the responsive program.
