Scoring data detection method and device and storage medium
By acquiring sample rating data from the rating recommendation matrix and calculating the true probability to identify fake ratings, the problem of fake rating detection in recommendation systems is solved, and the reliability of recommendation systems is improved.
Patent Information
- Application Number
- CN202410627830.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-11-21
AI Technical Summary
Existing technologies cannot effectively detect fake ratings in recommendation systems, causing these systems to fail to accurately recommend information and to be unable to defend against attackers poisoning the recommendation system.
By acquiring multiple sample rating data from the rating recommendation matrix, the true probability of each sample rating data is determined based on the user ratings of the products in the sample rating data. The true probability is calculated using Euclidean distance or cosine similarity, and fake rating data is identified, deleted, or marked.
It effectively detects fake data in the rating recommendation matrix, improves the reliability of the recommendation system, and prevents attackers from feeding fake data into the recommendation system.
Smart Images

Figure CN120996885A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and in particular to a method, apparatus and storage medium for detecting scoring data. Background Technology
[0002] With the advent of the information age, users face massive amounts of data and struggle to accurately obtain the information they want. To address this issue, major internet providers have launched various types of recommendation systems.
[0003] Recommendation systems face numerous security threats while recommending information. For example, attackers can inject a large number of false ratings into the system to affect its credibility, preventing it from accurately recommending information to users. Currently, there are no effective methods to detect and identify false ratings in recommendation systems, making it impossible to defend against attackers' attempts to poison the system. Summary of the Invention
[0004] This application provides a method, apparatus, and storage medium for detecting rating data, which solves the problem that current methods cannot effectively detect false ratings in recommendation systems and can effectively detect false rating data in the rating recommendation matrix of a recommendation system.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] In a first aspect, this application provides a method for detecting rating data, the method comprising: acquiring multiple sample rating data in a rating recommendation matrix; the rating recommendation matrix including rating data of M users for multiple products in a recommendation system; M being a positive integer; determining the true probability of each sample rating data based on the user rating data for products in the sample rating data; the true probability being used to characterize the degree of authenticity of the sample rating data; and detecting false rating data in the rating recommendation matrix based on the true probability of each sample rating data.
[0007] In conjunction with the first aspect mentioned above, in one possible implementation, the method further includes: performing multiple iterative sampling on the rating recommendation matrix according to a preset sampling rule to obtain multiple sample rating data; the preset sampling rule is to collect rating data of N users on multiple products each time as a sample rating data; N is a positive integer; M is greater than N.
[0008] In conjunction with the first aspect mentioned above, in one possible implementation, the method further includes: for each iteration of sampling, dividing the rating recommendation matrix according to different users to obtain C partitions; C is a positive integer; randomly discarding D partitions from the C partitions to obtain N partitions; D is a positive integer; the difference between C and D is N; and determining the rating data corresponding to the N partitions as a sample rating data.
[0009] In conjunction with the first aspect mentioned above, in one possible implementation, the method further includes: inputting sample rating data into a preset recommendation algorithm to obtain a first rating vector corresponding to each user and a second rating vector corresponding to each product; and determining the true probability of the sample rating data based on the first rating vectors corresponding to N users and the second rating vectors corresponding to multiple products.
[0010] In conjunction with the first aspect mentioned above, in one possible implementation, the method further includes: calculating the Euclidean distance between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product; and determining the true probability of the sample rating data based on the Euclidean distance.
[0011] In conjunction with the first aspect mentioned above, in one possible implementation, the method further includes: the true probability Poison(Si) of the sample rating data satisfies the following formula:
[0012]
[0013] Where D is the Euclidean distance, vi is the first rating vector, and vj is the second rating vector.
[0014] In conjunction with the first aspect mentioned above, in one possible implementation, the method further includes: calculating the cosine similarity between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product; and determining the true probability of the sample rating data based on the cosine similarity.
[0015] In conjunction with the first aspect mentioned above, in one possible implementation, the method further includes: determining the sample rating data with the highest true probability as the fake data in the rating recommendation matrix.
[0016] Secondly, this application provides a rating data detection device, which includes: a communication unit and a processing unit; the communication unit is used to acquire multiple sample rating data in a rating recommendation matrix; the rating recommendation matrix includes rating data of M users for multiple items in the recommendation system; M is a positive integer; the processing unit is used to determine the true probability of each sample rating data based on the user rating data for the items in the sample rating data; the true probability is used to characterize the authenticity of the sample rating data; the processing unit is also used to detect false rating data in the rating recommendation matrix based on the true probability of each sample rating data.
[0017] In conjunction with the second aspect above, in one possible implementation, the communication unit is specifically used to perform multiple iterative samplings on the rating recommendation matrix by the processing unit according to a preset sampling rule to obtain multiple sample rating data; the preset sampling rule is to collect the rating data of N users on the multiple products each time as a sample rating data; N is a positive integer; M is greater than N.
[0018] In conjunction with the second aspect above, in one possible implementation, the processing unit is specifically used for: for each iteration of sampling, dividing the rating recommendation matrix according to different users to obtain C partitions; C is a positive integer; randomly discarding D partitions from the C partitions to obtain N partitions; D is a positive integer; the difference between C and D is N; and determining the rating data corresponding to the N partitions as a sample rating data.
[0019] In conjunction with the second aspect above, in one possible implementation, the processing unit is specifically used to: input sample rating data into a preset recommendation algorithm to obtain a first rating vector corresponding to each user and a second rating vector corresponding to each product; and determine the true probability of the sample rating data based on the first rating vectors corresponding to N users and the second rating vectors corresponding to multiple products.
[0020] In conjunction with the second aspect above, in one possible implementation, the processing unit is specifically used to: calculate the Euclidean distance between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product; and determine the true probability of the sample rating data based on the Euclidean distance.
[0021] In conjunction with the second aspect above, in one possible implementation, the true probability Poison(Si) of the sample rating data satisfies the following formula:
[0022]
[0023] Where D is the Euclidean distance, vi is the first rating vector, and vj is the second rating vector.
[0024] In conjunction with the second aspect above, in one possible implementation, the processing unit is specifically used to: calculate the cosine similarity between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product; and determine the true probability of the sample rating data based on the cosine similarity.
[0025] In conjunction with the second aspect above, in one possible implementation, the processing unit is specifically used to: determine the sample rating data with the highest true probability as fake data in the rating recommendation matrix.
[0026] Thirdly, this application provides a scoring data detection apparatus, which includes: a processor and a communication interface; the communication interface and the processor are coupled, and the processor is used to run computer programs or instructions to implement the scoring data detection method as described in the first aspect and any possible implementation of the first aspect.
[0027] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a terminal, cause the terminal to perform a method for detecting scoring data as described in the first aspect and any possible implementation thereof.
[0028] Fifthly, this application provides a computer program product containing instructions that, when run on a scoring data detection device, causes the false scoring data detection device to execute the scoring data detection method as described in the first aspect and any possible implementation thereof.
[0029] In a sixth aspect, this application provides a chip including a processor and a communication interface coupled to the processor. The processor is used to run computer programs or instructions to implement a method for detecting scoring data as described in the first aspect and any possible implementation thereof.
[0030] Specifically, the chip provided in this application also includes a memory for storing computer programs or instructions.
[0031] It should be noted that the aforementioned computer instructions may be stored, in whole or in part, on a computer-readable storage medium. This computer-readable storage medium may be packaged together with the processor of the device, or it may be packaged separately from the processor of the device; this application does not impose any limitation on this.
[0032] In a seventh aspect, this application provides a rating data detection system, comprising: a recommendation system and a data server, wherein the data server is used to execute the rating data detection method as described in the first aspect and any possible implementation thereof.
[0033] The descriptions of aspects two through seven in this application can be referenced to the detailed description of aspect one; and the beneficial effects of the descriptions of aspects two through seven can be referenced to the analysis of the beneficial effects of aspect one, which will not be repeated here.
[0034] In this application, the name of the detection device for the aforementioned scoring data does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear under other names. As long as the function of each device or functional module is similar to that of this application, it falls within the scope of the claims of this application and its equivalents.
[0035] These or other aspects of this application will become more readily apparent in the following description.
[0036] The above solution offers at least the following advantages: Based on the above technical solution, the rating data detection method provided in this application acquires multiple sample rating data from the rating recommendation matrix. Then, for each sample rating data, the true probability of each sample rating data is determined based on the user's rating data for the product within the sample rating data. Since the true probability represents the probability that the sample rating data is fake data, fake data in the rating recommendation matrix can be effectively detected based on the true probability of each sample rating data. The above technical solution can effectively detect false rating data in the rating recommendation matrix through the true probability of sample rating data, solving the current problem of not being able to effectively detect fake ratings in recommendation systems. This allows for timely detection of attackers injecting fake data into the recommendation system, improving the reliability of the recommendation system. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the architecture of a scoring data detection system provided in an embodiment of this application;
[0038] Figure 2 A schematic diagram of the hardware structure of a scoring data detection device provided in an embodiment of this application;
[0039] Figure 3 A flowchart illustrating a method for detecting scoring data provided in an embodiment of this application;
[0040] Figure 4 A schematic diagram of a rating recommendation matrix provided in an embodiment of this application;
[0041] Figure 5 A schematic diagram of another rating recommendation matrix provided in an embodiment of this application;
[0042] Figure 6 A flowchart illustrating another method for detecting scoring data provided in this application embodiment;
[0043] Figure 7 This is a schematic diagram of a scoring data detection device provided in an embodiment of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0045] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0046] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.
[0047] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0048] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0049] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0050] With the advent of the information age, users face massive amounts of data and struggle to accurately obtain the information they want. To address this issue, major internet providers have launched various types of recommendation systems.
[0051] Recommendation systems face numerous security threats while recommending information. For example, attackers can inject a large number of fake ratings into the system to affect its authenticity, causing it to fail to accurately recommend information to users. However, currently, there is no way to detect fake ratings in recommendation systems. To date, there are no effective methods for detecting and identifying fake ratings in recommendation systems, thus failing to defend against attackers' attempts to poison the system.
[0052] Therefore, the rating data detection method provided in this application obtains multiple sample rating data from a rating recommendation matrix. Then, for each sample rating data, the true probability of each sample rating data is determined based on the user's rating data for the product within the sample rating data. Since the true probability represents the probability that the sample rating data is fake data, fake data in the rating recommendation matrix can be effectively detected based on the true probability of each sample rating data. The above technical solution can effectively detect false rating data in the rating recommendation matrix through the true probability of sample rating data, solving the problem that current methods cannot effectively detect fake ratings in recommendation systems. This allows for timely detection of attackers injecting fake data into the recommendation system, improving the reliability of the recommendation system.
[0053] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0054] Figure 1 This is a schematic diagram of the architecture of a scoring data detection system provided in an embodiment of this application. Figure 1 As shown, the detection system for this rating data includes: a recommendation system 101 and a data server 102.
[0055] The recommendation system 101 and the data server 102 are connected via a communication link. This communication link can be a wired communication link or a wireless communication link, and this application does not limit it in this way.
[0056] In one possible implementation, the recommender system 101 is used to send a rating recommendation matrix to the data server 102.
[0057] It's important to note that Recommender System 101 is essentially an information recommendation system that can recommend various products to users. When recommending products, it can base recommendations on user ratings. Therefore, attackers could inject fake data into the recommendation system to affect its accuracy.
[0058] Recommender system 101 can collect rating information from different users for different products, thereby establishing a rating recommendation matrix. Based on the rating recommendation matrix, recommender system 101 can predict the trends of each product and make targeted product recommendations to users. Furthermore, the recommender system can also establish an evaluation system to evaluate the recommendation performance of recommender system 101.
[0059] In one possible implementation, the data server 102 is used to obtain the rating recommendation matrix in the recommendation system 101, and predict the false data in the rating recommendation matrix based on the rating data of each user for each product in the rating recommendation matrix.
[0060] Optionally, the data server 102 may be located in the recommendation system 101, or it may be a separate device from the recommendation system 101. This application does not limit this.
[0061] When implemented in hardware, the various modules in data server 102 can be integrated into, for example... Figure 2 The hardware structure of the device for detecting the scoring data shown is implemented. Specifically, as... Figure 2 As shown, the basic hardware structure of the scoring data detection device is introduced.
[0062] Figure 2 This is a schematic diagram of the hardware structure of a scoring data detection device provided in an embodiment of this application. Figure 2 As shown, the device for detecting the scoring data includes at least one processor 201, a communication line 202, and at least one communication interface 204, and may also include a memory 203. The processor 201, memory 203, and communication interface 204 can be connected via the communication line 202.
[0063] The processor 201 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0064] Communication line 202 may include a path for transmitting information between the aforementioned components.
[0065] The communication interface 204 is used to communicate with other devices or communication networks. It can use any transceiver-like device, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.
[0066] The memory 203 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of including or storing desired program code having the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0067] In one possible design, the memory 203 can exist independently of the processor 201, meaning the memory 203 can be an external memory of the processor 201. In this case, the memory 203 can be connected to the processor 201 via a communication line 202 to store execution instructions or application code, and its execution is controlled by the processor 201 to implement the scoring data detection method provided in the following embodiments of this application. In another possible design, the memory 203 can also be integrated with the processor 201, meaning the memory 203 can be an internal memory of the processor 201. For example, the memory 203 can be a cache, which can be used to temporarily store some data and instruction information.
[0068] As one possible implementation, processor 201 may include one or more CPUs, for example Figure 2 CPU0 and CPU1 in the example. As another possible implementation, the scoring data detection device may include multiple processors, such as... Figure 2 The processors 201 and 207 are included. As another possible implementation, the scoring data detection device may also include an output device 205 and an input device 206.
[0069] It should be noted that the various embodiments of this application can be referenced or learned from each other. For example, the same or similar steps, method embodiments, system embodiments and device embodiments can be referenced from each other without limitation.
[0070] Figure 3 A flowchart illustrating a scoring data detection method provided in this application embodiment, which can be applied to, for example... Figure 2 The device used to detect the scoring data shown. (As shown in the example) Figure 3As shown, the method includes the following S301-S303.
[0071] S301. Obtain the rating data of multiple samples in the rating recommendation matrix.
[0072] The rating recommendation matrix includes rating data from M users for multiple products in the recommendation system, where M is a positive integer.
[0073] In one example, such as Figure 4 As shown, the rating and recommendation matrix can include ratings from users 1, 2, 3, 4, and 5 for products 1, 2, 3, 4, 5, and 6, respectively.
[0074] In one possible implementation, the rating recommendation matrix is iteratively sampled multiple times according to a preset sampling rule to obtain multiple sample rating data.
[0075] The preset sampling rule is to collect rating data from N users for multiple products each time as a sample rating data, where N is a positive integer and M is greater than N.
[0076] In one example, the rating recommendation matrix is randomly sampled s times according to a preset sampling rule to obtain s sample rating data.
[0077] For example, such as Figure 5 As shown, taking s as 3 and the preset sampling rule as collecting the rating data of two users for each product as a sample rating data, the rating recommendation matrix can include sample rating data 1, sample rating data 2, and sample rating data 3.
[0078] Among them, sample rating data 1 consists of ratings for each product by user 1 and user 2 respectively; sample rating data 2 consists of ratings for each product by user 2 and user 3 respectively; and sample rating data 3 consists of ratings for each product by user 4 and user 5 respectively.
[0079] Specifically, for each iteration of sampling, the rating recommendation matrix is divided into C partitions according to different users; D partitions from the C partitions are randomly discarded, resulting in N partitions; and the rating data corresponding to the N partitions is determined as a sample rating data.
[0080] Where C is a positive integer; D is a positive integer; and the difference between C and D is N.
[0081] In one example, let's say C is 6, D is 4, and N is 2. The rating recommendation matrix is divided into 6 partitions based on different users. Each partition contains rating data for each product. Then, 4 partitions are randomly discarded, leaving 2 partitions. The rating data in these remaining 2 partitions, i.e., the rating data for each product from the two users, constitutes a single sample rating data.
[0082] S302. Based on the user rating data for products in the sample rating data, determine the true probability of each sample rating data.
[0083] Among them, the true probability is used to characterize the authenticity of the sample rating data.
[0084] In one possible implementation, for each sample rating data point, a pre-defined recommendation algorithm is used to obtain a first rating vector corresponding to each user and a second rating vector corresponding to each product in each sample rating data point. Then, based on the first and second rating vectors, false ratings for each sample are determined.
[0085] Specifically, the process of determining the true probability of each sample score data can be referred to the embodiments described in S601-S602, which will not be repeated here.
[0086] S303. Based on the true probability of each sample rating data, detect false rating data in the rating recommendation matrix.
[0087] In one possible implementation, a higher true probability indicates that the sample score data is less authentic.
[0088] In one example, the sample rating data with the highest probability of being true is identified as the false data in the rating recommendation matrix.
[0089] In another example, the true probability of a score above a preset threshold is determined, and the sample score data corresponding to the true probability above the preset threshold is determined to be false score data.
[0090] In another possible implementation, the lower the true probability, the more realistic the sample data is.
[0091] In one example, the sample rating data with the lowest probability of being true is identified as the inauthentic data in the rating recommendation matrix.
[0092] In another example, the true probability below a preset threshold is determined, and the sample score data corresponding to the true probability below the preset threshold is determined to be false score data.
[0093] Furthermore, depending on business needs, the false rating data can be deleted or marked to facilitate the distinction between false and true rating data.
[0094] Optionally, parameter C can be adjusted, and the embodiments described in S301-S303 above can be executed multiple times. The changing trend of the true probability can be observed as parameter C is adjusted.
[0095] In one example, the true probability initially decreases and then increases as the parameter C increases. Therefore, the sample rating data corresponding to the lowest true probability likely contains the most false data.
[0096] Based on the above technical solution, the rating data detection method provided in this application obtains multiple sample rating data from a rating recommendation matrix. Then, for each sample rating data, the true probability of each sample rating data is determined based on the user's rating data for the product within the sample rating data. Since the true probability represents the probability that the sample rating data is fake data, fake data in the rating recommendation matrix can be effectively detected based on the true probability of each sample rating data. The above technical solution can effectively detect false rating data in the rating recommendation matrix through the true probability of sample rating data, solving the problem that current methods cannot effectively detect fake ratings in recommendation systems. This allows for timely detection of attackers injecting fake data into the recommendation system, improving the reliability of the recommendation system.
[0097] As one possible embodiment of this application, combined with Figure 3 ,like Figure 6 As shown, the process by which the rating data detection device in S302 determines the true probability of each sample rating data based on the user's rating data for the product in the sample rating data can be implemented through the following S601-S602.
[0098] S601. Input the sample rating data into the preset recommendation algorithm to obtain the first rating vector for each user and the second rating vector for each product.
[0099] In one example, target user ratings for target products are mapped onto a two-dimensional coordinate system to obtain the rating points corresponding to the rating data. Then, the vector from the origin of the two-dimensional coordinate system to the rating point is determined as the vector corresponding to the rating data. Next, the vector mapped to the X-axis is used as the first rating vector, and the vector mapped to the Y-axis is used as the second rating vector.
[0100] In this two-dimensional coordinate system, the X-axis corresponds to the coordinate axis where the user is located, and the Y-axis corresponds to the coordinate axis where the product is located.
[0101] In another example, other recommendation algorithms that determine rating vectors can be used to convert sample rating data into a first rating vector for each user and a second rating vector for each product. This application does not limit this.
[0102] S602. Based on the first rating vector corresponding to N users and the second rating vector corresponding to multiple products, determine the true probability of the sample rating data.
[0103] In one possible implementation, based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product, the Euclidean distance between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product is calculated; based on the Euclidean distance, the true probability of the sample rating data is determined.
[0104] Specifically, the true probability Poison(Si) of the sample rating data satisfies the following formula:
[0105]
[0106] Where D is the Euclidean distance, vi is the first rating vector, and vj is the second rating vector.
[0107] In another possible implementation, based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product, the cosine similarity between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product is calculated; based on the cosine similarity, the true probability of the sample rating data is determined.
[0108] Specifically, the true probability Poison(Si) of the sample rating data satisfies the following formula:
[0109]
[0110] Where C is the cosine similarity, vi is the first score vector, and vj is the second score vector.
[0111] Based on the above technical solution, the sample rating data is input into a preset recommendation algorithm to obtain a first rating vector for each user and a second rating vector for each product. Based on the first rating vectors for N users and the second rating vectors for multiple products, the true probability of the sample rating data is determined. This technical solution can also obtain false ratings from the sample rating data, allowing for the subsequent identification of fraudulent data.
[0112] This application embodiment can divide the scoring data detection device into functional modules or functional units according to the above method example. For example, each function can be divided into a separate functional module or functional unit, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or in software functional modules or functional units. The module or unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0113] like Figure 7 The diagram shown is a structural schematic of a scoring data detection device 70 provided in an embodiment of this application. The scoring data detection device 70 includes a communication unit 701 and a processing unit 702.
[0114] The communication unit 701 is used to acquire multiple sample rating data from the rating recommendation matrix; the rating recommendation matrix includes rating data of M users for multiple products in the recommendation system; M is a positive integer; the processing unit 702 is used to determine the true probability of each sample rating data based on the user rating data for products in the sample rating data; the true probability is used to characterize the authenticity of the sample rating data; the processing unit 702 is also used to detect false rating data in the rating recommendation matrix based on the true probability of each sample rating data.
[0115] In one possible implementation, the communication unit 701 is specifically used to perform multiple iterative samplings on the rating recommendation matrix by the processing unit 702 according to a preset sampling rule to obtain multiple sample rating data; the preset sampling rule is to collect the rating data of N users on the multiple products each time as a sample rating data; N is a positive integer; M is greater than N.
[0116] In one possible implementation, the processing unit 702 is specifically used for: for each iteration of sampling, dividing the rating recommendation matrix according to different users to obtain C partitions; C is a positive integer; randomly discarding D partitions from the C partitions to obtain N partitions; D is a positive integer; the difference between C and D is N; and determining the rating data corresponding to the N partitions as a sample rating data.
[0117] In one possible implementation, the processing unit 702 is specifically used to: input sample rating data into a preset recommendation algorithm to obtain a first rating vector corresponding to each user and a second rating vector corresponding to each product; and determine the true probability of the sample rating data based on the first rating vectors corresponding to N users and the second rating vectors corresponding to multiple products.
[0118] In one possible implementation, the processing unit 702 is specifically used to: calculate the Euclidean distance between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product; and determine the true probability of the sample rating data based on the Euclidean distance.
[0119] In one possible implementation, the true probability Poison(Si) of the sample rating data satisfies the following formula:
[0120]
[0121] Where D is the Euclidean distance, vi is the first rating vector, and vj is the second rating vector.
[0122] In one possible implementation, the processing unit 702 is specifically used to: calculate the cosine similarity between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product; and determine the true probability of the sample rating data based on the cosine similarity.
[0123] In one possible implementation, the processing unit 702 is specifically used to: determine the sample rating data with the highest true probability as fake data in the rating recommendation matrix.
[0124] In one possible implementation, the scoring data detection device 70 may further include a storage unit 703. Figure 7 (shown in dashed box) The storage unit 703 stores a program or instruction. When the processing unit 702 executes the program or instruction, the scoring data detection device 70 can perform the scoring data detection method described in the above method embodiment.
[0125] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0126] This application provides a computer program product containing instructions that, when run on a computer, cause the computer to execute the scoring data detection method in the above method embodiments.
[0127] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the scoring data detection method in the method flow shown in the above method embodiments.
[0128] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof, or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may reside in an application-specific integrated circuit (ASIC). In the embodiments of this application, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0129] Since the scoring data detection device, computer-readable storage medium, and computer program product in the embodiments of this application can be applied to the above method, the technical effects that can be obtained can also be referred to the above method embodiments. The embodiments of this application will not be repeated here.
[0130] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0131] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0132] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0133] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting scoring data, characterized in that, The method includes: Obtain rating data from multiple samples in the rating recommendation matrix; the rating recommendation matrix includes rating data from M users for multiple products in the recommendation system; M is a positive integer; Based on the user ratings of products in the sample rating data, the true probability of each sample rating data is determined; the true probability is used to characterize the degree of authenticity of the sample rating data. Based on the true probability of each sample rating data, false rating data in the rating recommendation matrix is detected.
2. The method according to claim 1, characterized in that, The process of obtaining multiple sample rating data from the rating recommendation matrix includes: According to a preset sampling rule, the rating recommendation matrix is iteratively sampled multiple times to obtain the multiple sample rating data; the preset sampling rule is to collect the rating data of N users on the multiple products each time as a sample rating data; N is a positive integer; M is greater than N.
3. The method according to claim 2, characterized in that, The step of performing multiple iterative samplings on the rating recommendation matrix according to a preset sampling rule to obtain the multiple sample rating data includes: For each iteration of sampling, the rating recommendation matrix is divided into C partitions according to different users; C is a positive integer. Randomly discard D partitions from the C partitions to obtain N partitions; D is a positive integer; the difference between C and D is N. The rating data corresponding to the N partitions is determined as a sample rating data.
4. The method according to claim 2, characterized in that, The step of determining the true probability of each sample rating data based on user rating data for products in the sample rating data includes: The sample rating data is input into a preset recommendation algorithm to obtain a first rating vector for each user and a second rating vector for each product. Based on the first rating vectors corresponding to the N users and the second rating vectors corresponding to the multiple products, the true probability of the sample rating data is determined.
5. The method according to claim 4, characterized in that, The step of determining the true probability of the sample rating data based on the first rating vectors corresponding to the N users and the second rating vectors corresponding to the multiple products includes: Based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product, calculate the Euclidean distance between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product. The true probability of the sample score data is determined based on the Euclidean distance.
6. The method according to claim 5, characterized in that, The true probability Poison(Si) of the sample rating data satisfies the following formula: Where D is the Euclidean distance, vi is the first rating vector, and vj is the second rating vector.
7. The method according to claim 4, characterized in that, The step of determining the true probability of the sample rating data based on the first rating vectors corresponding to the N users and the second rating vectors corresponding to the multiple products includes: Based on the first rating vector corresponding to the target user and the second rating vector corresponding to the target product, calculate the cosine similarity between the first rating vector corresponding to the target user and the second rating vector corresponding to the target product. The true probability of the sample rating data is determined based on the cosine similarity.
8. The method according to claim 1, characterized in that, The step of detecting fake data in the rating recommendation matrix based on the true probability of each sample rating data includes: The sample rating data with the highest probability of being true is identified as fake data in the rating recommendation matrix.
9. A device for detecting scoring data, characterized in that, The device includes a communication unit and a processing unit; The communication unit is used to acquire multiple sample rating data from the rating recommendation matrix; the rating recommendation matrix includes rating data from M users for multiple items in the recommendation system; M is a positive integer; The processing unit is configured to determine the true probability of each sample rating data based on the user rating data for products in the sample rating data; the true probability is used to characterize the degree of authenticity of the sample rating data. The processing unit is also used to detect false rating data in the rating recommendation matrix based on the true probability of each sample rating data.
10. A device for detecting scoring data, characterized in that, include: A processor and a communication interface; the communication interface is coupled to the processor, the processor being used to run computer programs or instructions to implement the method for detecting scoring data as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computer, perform a method for detecting scoring data as described in any one of claims 1-8.
12. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed on a computer, cause the computer to perform the method for detecting scoring data as described in any one of claims 1-8.