Information association method, apparatus, device, storage medium, and product

By setting up mapping relationships and comparing hash values, the system can quickly filter and associate target quintuple information in smart device behavior data, solving the problem of low efficiency in existing technologies and achieving efficient data retrieval and association.

CN114817312BActive Publication Date: 2025-11-04QINGDAO HAIER TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210467220.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-11-04
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Existing technologies are inefficient at finding fields corresponding to specific rules in smart device behavior data, resulting in a large workload and slow speed.

Method used

By pre-setting the first mapping relationship between rule identifier, rule field and rule hash value, and the second mapping relationship between preset field and tuple information, the five-tuple information to be matched is traversed, and the target five-tuple information is filtered and associated by comparing hash values.

Benefits of technology

It quickly filters out the required target quintuple information and associates it with rule identifiers, improving efficiency and saving time, and making it easier for users to understand the correlation between data and rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114817312B_ABST
    Figure CN114817312B_ABST
Patent Text Reader

Abstract

The application provides an information association method, device, equipment, storage medium and product. The method comprises the following steps: acquiring five-tuple information to be matched, a first mapping relationship and a second mapping relationship reported by a smart device; traversing a rule identifier in the first mapping relationship, determining a hash value corresponding to the five-tuple information to be matched according to a rule field corresponding to the traversed rule identifier and the second mapping relationship; comparing the hash value to be matched with a rule hash value corresponding to the traversed rule identifier; filtering the five-tuple information to be matched according to a comparison result of the hash values, acquiring target five-tuple information reserved after filtering, and associating the target five-tuple information with a corresponding rule identifier. Not only the required target five-tuple information can be quickly filtered out, but also the required target five-tuple information can be associated with the rule identifier, which is convenient for users to understand, and the efficiency is effectively improved and the time is saved by using the comparison hash value to find the required data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the communication technology field, in particular to an information association method and device, equipment, storage medium and product. BACKGROUND

[0002] At present, there are many users using intelligent devices, and most of the users have multiple intelligent devices at home. With the increasing number of times of using the intelligent devices by the users, the intelligent devices will report behavior data. The users will upload a piece of behavior data every time they operate the intelligent devices, and a large amount of behavior data will be uploaded every day.

[0003] In order to provide better use experience for the users using the intelligent devices, the equipment manufacturers need to collect the behavior data of the users without involving the privacy of the users under the condition of the consent of the users. When the data analysts analyze the behavior data, they often need to find the behavior data meeting specific rules. The existing method is to find the fields corresponding to the specific rules from the behavior data and compare the fields one by one to find the required data.

[0004] However, the multiple comparisons in the process of finding the required data consume a large amount of time, the speed is slow, the efficiency is low, and the workload is large. SUMMARY

[0005] The present application provides an information association method, device, equipment, storage medium and product to solve the problem that the existing method finds the fields corresponding to the specific rules from the behavior data and uses the way of comparing one by one to have low efficiency.

[0006] In a first aspect, the present application provides an information association method, comprising:

[0007] obtaining five-tuple information to be matched reported by an intelligent device, obtaining a first mapping relationship of a rule identifier, a rule field and a rule hash value, and obtaining a second mapping relationship of a preset field and preset tuple information;

[0008] traversing the rule identifier in the first mapping relationship, and determining a hash value to be matched corresponding to the five-tuple information to be matched according to the rule field corresponding to the traversed rule identifier and the second mapping relationship;

[0009] comparing the hash value to be matched and the rule hash value corresponding to the traversed rule identifier;

[0010] filtering the five-tuple information to be matched according to the comparison result of the hash value, obtaining target five-tuple information reserved after filtering, and associating the target five-tuple information and the corresponding rule identifier.

[0011] In a second aspect, the present application provides an information association device, comprising:

[0012] The acquisition unit is configured to acquire five-tuple information reported by the intelligent device, acquire a first mapping relationship of a rule identifier, a rule field and a rule hash value, and acquire a second mapping relationship of a preset field and preset tuple information.

[0013] The determination unit is configured to traverse the rule identifiers in the first mapping relationship, and determine a hash value to be matched corresponding to the five-tuple information to be matched according to the rule field corresponding to the traversed rule identifier and the second mapping relationship.

[0014] The comparison unit is configured to compare the hash value to be matched and a rule hash value corresponding to the traversed rule identifier.

[0015] The determination unit is further configured to filter the five-tuple information to be matched according to a comparison result of the hash values, acquire target five-tuple information reserved after filtering, and associate the target five-tuple information and the corresponding rule identifier.

[0016] In a third aspect, the present application provides an electronic device, a processor, and a memory connected in communication with the processor.

[0017] The memory stores computer execution instructions.

[0018] The processor executes the computer execution instructions stored in the memory, so that the processor executes the method of the first aspect.

[0019] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of the first aspect.

[0020] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which is executed by the processor to implement the method of the first aspect.

[0021] The information association method, device, equipment, storage medium and product provided by the application, by acquiring the five tuple information reported by the smart device, acquiring the first mapping relationship of the rule identifier, rule field and rule hash value, and acquiring the second mapping relationship of the preset field and preset tuple information, traversing the rule identifier in the first mapping relationship, and determining the hash value corresponding to the five tuple information to be matched according to the rule field corresponding to the traversed rule identifier and the second mapping relationship, comparing the hash value to be matched with the rule hash value corresponding to the traversed rule identifier, filtering the five tuple information to be matched according to the comparison result of the hash value, acquiring the target five tuple information reserved after filtering, and associating the target five tuple information with the corresponding rule identifier. The target five tuple information is associated with the corresponding rule identifier, which not only can quickly filter out the required target five tuple information, but also can associate the required target five tuple information with the rule identifier, so that the user can understand which rule the target five tuple information is related to, and the required target five tuple information is found by comparing the hash values, which not only effectively improves the efficiency but also saves time. BRIEF DESCRIPTION OF DRAWINGS

[0022] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0023] Figure 1 is a network architecture schematic diagram of the information association method provided by the application;

[0024] Figure 2 is a flowchart of the information association method provided by the first embodiment of the application;

[0025] Figure 3 is a flowchart of the information association method provided by the second embodiment of the application;

[0026] Figure 4 is a flowchart of the information association method provided by the third embodiment of the application;

[0027] Figure 5 is a flowchart of the information association method provided by the fourth embodiment of the application;

[0028] Figure 6 is a flowchart of the information association method provided by the sixth embodiment of the application;

[0029] Figure 7 is a structural schematic diagram of the information association device provided by an embodiment of the application;

[0030] Figure 8 is a block diagram of an electronic device for implementing the information association method of the embodiments of the application.

[0031] The specific embodiments of the application have been shown by the above drawings, and will be described in more detail hereinafter. The drawings and the written description are not intended to restrict the scope of the concept of the application by any means, but to illustrate the concept of the application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0032] In order to make the person skilled in the art better understand the scheme of the present application, the technical scheme in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the person skilled in the art without creative labor should belong to the scope of protection of the present application.

[0033] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0034] In order to clearly understand the technical scheme of the present application, the scheme of the prior art will be described in detail first.

[0035] At present, there are many users using intelligent devices, and most users have multiple intelligent devices at home. With the increasing number of times that users use intelligent devices, the intelligent devices will report behavior data, and the user will upload a piece of behavior data every time the user operates an intelligent device, and a large amount of behavior data will be uploaded every day. In order to provide better use experience for users using intelligent devices, the device manufacturer needs to collect the behavior data of the user without involving the privacy of the user with the consent of the user. When the data analysis personnel analyzes the behavior data, the analysis personnel often needs to find the behavior data that meets the specific rules. The existing method is that the analysis personnel finds the field corresponding to the specific rule from the behavior data, and compares the fields one by one to find the required data.

[0036] The existing method consumes a large amount of time in the process of finding the required data, and the comparison speed is slow and the efficiency is low, resulting in a large amount of work, and the required data cannot be quickly found.

[0037] Therefore, in order to solve the problem that it is low in efficiency to find the field corresponding to a specific rule in the behavior data of the existing user and to compare one by one, the inventor finds in research that a rule is set in advance, that is, a first mapping relationship containing a rule identifier, a rule field and a rule hash value is set, and a second mapping relationship of a field and a tuple information is set, the first mapping relationship and the second mapping relationship are used to filter target quintuple information from the to-be-matched quintuple information, specifically, the to-be-matched quintuple information reported by the intelligent device, the first mapping relationship and the second mapping relationship are acquired, the rule identifier in the first mapping relationship is further traversed, and the rule field corresponding to the traversed rule identifier and the second mapping relationship are used to determine the to-be-matched hash value corresponding to the to-be-matched quintuple information; the to-be-matched hash value and the rule hash value corresponding to the traversed rule identifier are compared; the to-be-matched quintuple information is filtered according to the comparison result of the hash values, the target quintuple information reserved after filtering is acquired, and the target quintuple information and the corresponding rule identifier are further associated, which not only can quickly filter out the required target quintuple information, but also can associate the required target quintuple information with the rule identifier, so that the user can know which rule the target quintuple information is related to, and the required target quintuple information is found by comparing the hash values, which not only effectively improves the efficiency but also saves time.

[0038] Therefore, based on the above creative finding, the technical scheme of the embodiment of the present application is proposed. The network architecture and application scenario of the information association method provided by the embodiment of the present application are introduced below.

[0039] As Figure 1As shown, the information association method provided by the embodiment of the application corresponds to a network architecture including a server 1 and a smart air conditioner 2. The server 1 is in communication connection with the smart air conditioner 2. The smart air conditioner 2 reports five-tuple information, and the server 1 determines the five-tuple information reported by the smart air conditioner 2 as to-be-matched five-tuple information according to a data search instruction, wherein the data search instruction can be sent by a user through a user terminal. The server 1 acquires the to-be-matched five-tuple information reported by the smart device, a first mapping relationship and a second mapping relationship, traverses a rule identifier in the first mapping relationship, and determines a to-be-matched hash value corresponding to the to-be-matched five-tuple information according to a rule field corresponding to the traversed rule identifier and the second mapping relationship. The server 1 compares the to-be-matched hash value with a rule hash value corresponding to the traversed rule identifier. The server 1 filters the to-be-matched five-tuple information according to a comparison result of the hash values, acquires target five-tuple information reserved after filtering, associates the target five-tuple information with a corresponding rule identifier, and the server 1 outputs association information containing the target five-tuple information and the corresponding rule identifier. Not only can the required target five-tuple information be quickly filtered out, but also the required target five-tuple information can be associated with the rule identifier, which is convenient for the user to understand which rule the target five-tuple information is related to. The method of searching for the required target five-tuple information by comparing hash values not only effectively improves the efficiency but also saves time.

[0040] The embodiments of the application will be described in detail below with reference to the accompanying drawings.

[0041] Embodiment one

[0042] Figure 2 is a flowchart of the information association method provided by the embodiment one of the application, as Figure 2 shown, the execution subject of the information association method provided by the embodiment is an information association device, which is located in an electronic device, so the information association method provided by the embodiment includes the following steps:

[0043] Step 101, acquiring to-be-matched five-tuple information reported by a smart device, acquiring a first mapping relationship of a rule identifier, a rule field and a rule hash value, and acquiring a second mapping relationship of a preset field and a preset tuple information.

[0044] In this embodiment, first, the five tuple information reported by the intelligent device is acquired, wherein the five tuple information includes user tuple, time tuple, location tuple, context tuple and intent tuple. The user tuple includes user gender and user age. The time tuple is the specific time when the behavior corresponding to the intelligent device occurs. The location tuple is the location where the intelligent device is located. The intent tuple is the behavior identifier corresponding to the intelligent device. The context tuple includes the intelligent device model and weather information. The behavior corresponding to the intelligent device refers to the behavior triggered by the user to change the state of the intelligent device, for example, turning on and turning off. Further, the first mapping relationship of rule identifier, rule field and rule hash value is acquired, wherein the first mapping relationship is a first mapping relationship table of rule identifier, rule field and rule hash value pre-set, as shown in Table 1. The first mapping relationship table includes 2 rules, wherein the rule field corresponding to rule identifier 1 is composed of city, day, time and weather, the city is Beijing, the day is Monday, the time is 9:25, and the weather is sunny, and the rule hash value is as shown in Table 1. The rule field corresponding to rule identifier 2 is composed of gender, device model and behavior identifier, the gender is male, the device model is BCD-001, and the behavior identifier is 10001, and the rule hash value is as shown in Table 1. The hash value of each rule field is calculated by using MD5 algorithm, and the calculated hash value is determined as the rule hash value.

[0045] Table 1: First mapping relationship table

[0046] Rule ID Rule Field Rule Hash Value 1 Beijing, Monday, 9:25, sunny b791ef0c257466a6e1e8b4f797798fb6 2 Male, BCD-001, 10001 e013ef4afafde9fe48baa46d9a25913f

[0047] Table 2: Second mapping relationship table

[0048] Default Field Default Tuple Information Gender User Tuple Information Day of the Week Time Tuple Information Time Time Tuple Information City Location Tuple Information Action ID Intention Tuple Information Weather Context Tuple Information Device Model Context Tuple Information

[0049] The second mapping relationship is a second mapping relationship table of field name and tuple information pre-set, wherein the pre-set fields include gender, day, time, city, behavior identifier, weather, and device model, and the pre-set tuple information refers to the tuple to which the field name belongs. As shown in Table 2, the tuple information to which the gender belongs is the user tuple, the tuple information to which the day belongs is the time tuple, the tuple information to which the time belongs is the time tuple, the tuple information to which the city belongs is the location tuple, the tuple information to which the behavior identifier belongs is the intent tuple, the tuple information to which the weather belongs is the context tuple, and the tuple information to which the device model belongs is the context tuple. The pre-set five tuple information and the pre-set field can be added as needed, and are not limited to the above-mentioned fields and tuple information.

[0050] In step 102, the rule identifier in the first mapping relationship is traversed, and the hash value to be matched corresponding to the five tuple information to be matched is determined according to the rule field corresponding to the traversed rule identifier and the second mapping relationship.

[0051] In this embodiment, the first mapping relationship includes at least one rule identifier, the rule identifiers in the first mapping relationship are traversed, the hash value to be matched corresponding to the five-tuple information to be matched is determined according to the rule field corresponding to the traversed rule identifier in the first mapping relationship and the second mapping relationship, the rule field corresponding to the traversed rule identifier in the first mapping relationship is different based on the difference of the traversed rule identifier in the first mapping relationship, the hash value to be matched corresponding to the five-tuple information to be matched obtained is also different, and one five-tuple information to be matched corresponds to multiple hash values to be matched.

[0052] In step 103, the hash value to be matched and the rule hash value corresponding to the traversed rule identifier are compared.

[0053] In this embodiment, the hash value to be matched and the rule hash value corresponding to the traversed rule identifier in the first mapping relationship are compared, and it is determined whether to store or delete the five-tuple information to be matched according to the comparison result of the hash value, so as to filter the five-tuple information.

[0054] In step 104, the five-tuple information to be matched is filtered according to the comparison result of the hash value, the target five-tuple information retained after filtering is obtained, and the target five-tuple information and the corresponding rule identifier are associated.

[0055] In this embodiment, the five-tuple information to be matched is filtered according to the comparison result of the hash value, the target five-tuple information retained after filtering is obtained, and the target five-tuple information and the corresponding rule identifier are associated. The target five-tuple information is the required five-tuple information, and the purpose of association is to facilitate the user to understand which rule the target five-tuple information meets, that is, which rule the target five-tuple information corresponds to.

[0056] In this embodiment, the five-tuple information to be matched reported by the intelligent device is obtained, the first mapping relationship and the second mapping relationship are obtained, the rule identifiers in the first mapping relationship are traversed, the hash value to be matched of the five-tuple information to be matched is further determined according to the field name corresponding to the traversed rule identifier and the second mapping relationship, the hash value to be matched is compared with the rule hash value in the second mapping relationship, and then the five-tuple information to be matched is filtered according to the comparison result of the hash value, the target five-tuple information retained after filtering is obtained, and the target five-tuple information and the corresponding rule identifier are associated. Not only the required target five-tuple information can be quickly filtered out, but also the required target five-tuple information and the rule identifier can be associated, which facilitates the user to understand which rule the target five-tuple information is related to. The required target five-tuple information is found by comparing the hash values, which not only effectively improves the efficiency but also saves time.

[0057] Embodiment two

[0058] Figure 3is a flowchart of the information association method provided in Embodiment Two of the present application, as shown in Figure 3 On the basis of the information association method provided in Embodiment One of the present application, the step 102 of determining the to-be-matched hash value corresponding to the to-be-matched five-tuple information according to the rule field corresponding to the rule identifier and the second mapping relationship is further refined, and specifically includes the following steps:

[0059] In step 1021, the rule field corresponding to the rule identifier that is traversed is matched with the preset field in the second mapping relationship.

[0060] In this embodiment, the rule field corresponding to the rule identifier in the first mapping relationship that is traversed is matched with the preset field in the second mapping relationship. For example, the rule identifier of the first mapping relationship that is traversed is 1, the field corresponding to the rule identifier 1 is Beijing, Monday, 9:25, sunny, Beijing corresponds to the city, Monday corresponds to the week, 9:25 corresponds to the time, and sunny corresponds to the weather. The rule field corresponding to the rule identifier 1, i.e., Beijing, Monday, 9:25, and sunny, is matched with the preset field in the second mapping relationship to determine the preset tuple information to which the rule field belongs.

[0061] In step 1022, the to-be-matched hash value corresponding to the to-be-matched five-tuple information is determined according to the preset tuple information corresponding to the preset field matched by the rule field.

[0062] In this embodiment, the rule field can match the same field in the second preset field to determine the preset tuple information to which the preset field matched by the rule field belongs. For example, the rule field corresponding to the rule identifier 1, i.e., Beijing, Monday, 9:25, and sunny, is compared with the preset field in the second mapping relationship. The preset field matched by Beijing is the city, and the tuple information to which Beijing belongs is the location tuple information. The field matched by Monday is the week, and the tuple information to which Monday belongs is the time tuple information. The field matched by 9:25 is the time, and the tuple information to which 9:25 belongs is the time tuple information. The field matched by sunny is the weather, and the tuple information to which sunny belongs is the time tuple information. Thus, the hash value corresponding to the to-be-matched five-tuple information is calculated according to the preset tuple information to which the preset field matched by the rule field belongs, and the hash value is determined as the to-be-matched hash value. The method of comparing hash values to find the required target five-tuple information not only effectively improves the efficiency but also saves time.

[0063] Embodiment Three

[0064] Figure 4 is a flowchart of the information association method provided in Embodiment Three of the present application, as shown in Figure 4 On the basis of the information association method provided in Embodiment Two of the present application, step 1022 is further refined, and specifically includes the following steps:

[0065] Step 1022a, determine the field value corresponding to the same tuple information of the preset tuple information corresponding to the preset field matching the rule field in the five tuple information to be matched.

[0066] In this embodiment, the hash value can be obtained according to the field value, and the field value of the same tuple information of the preset tuple information corresponding to the preset field matching the rule field in the first mapping relationship in the five tuple information to be matched is determined.

[0067] Table 3: Five tuple information table

[0068]

[0069] Referring to Table 3, the user tuple information of the five tuple information to be matched of identification 1 is male, 20 years old, the time tuple information is 9:25, 2022, Monday, the location tuple information is Beijing Dongcheng District, the intent tuple information is behavior identification 001, and the context tuple information is device model BCD-001. If the traversed rule identification is 2, the fields corresponding to the rule identification are gender, device model, and behavior identification. The preset fields in the five tuple information to be matched that match the rule fields in the first mapping relationship in the second mapping table are gender, device model, and behavior identification, wherein the gender belongs to the user tuple information, the device model belongs to the context tuple information, and the behavior identification is the intent tuple information. The fields corresponding to the same tuple information of the preset tuple information corresponding to the preset fields matching the rule fields in the five tuple information to be matched are the male corresponding to the user tuple information, the device model corresponding to the context tuple information, and the behavior identification corresponding to the intent tuple information, respectively. The final determination is the field values of male, device model, and behavior identification.

[0070] Step 1022b, the corresponding field values are spliced according to the arrangement order of the rule fields corresponding to the traversed rule identification, to obtain the spliced field values.

[0071] In this embodiment, the corresponding field values are spliced according to the arrangement order of the rule fields corresponding to the traversed rule identification, for example, the rule identification is rule identification 2, the arrangement order of the rule fields corresponding to the rule identification 2 is gender, device model, and behavior identification. The corresponding field values are sorted according to the above order, and the field values are spliced to obtain the spliced field values.

[0072] Step 1022c, calculate the hash value corresponding to the spliced field value, and determine the hash value as the to-be-matched hash value corresponding to the five tuple information to be matched.

[0073] In this embodiment, the hash value corresponding to the spliced field value is calculated, the MD5 algorithm is used to calculate the hash value, and the calculated hash value is determined as the to-be-matched hash value corresponding to the to-be-matched quintuple information. The hash value of the field value is calculated, so that the required data is searched by comparing the hash values, which can effectively improve the comparison speed and save the comparison time.

[0074] Embodiment Four

[0075] Figure 5 is a flowchart of the information association method provided in Embodiment Four of the present application, as shown in Figure 5 Based on the information association method provided in Embodiment Three of the present application, step 1022a is further refined, and specifically includes the following steps:

[0076] Step 1022a1, comparing the preset tuple information corresponding to the preset field matched with the rule field with the tuple information in the to-be-matched quintuple information.

[0077] In this embodiment, the preset tuple information corresponding to the preset field matched with the rule field in the second mapping relationship is compared with the tuple information in the to-be-matched quintuple information, so as to determine the field value.

[0078] Step 1022a2, obtaining the tuple information in the to-be-matched quintuple information which is the same as the preset tuple information corresponding to the preset field matched with the rule field, and determining the field value corresponding to the tuple information as the field value corresponding to the same tuple information.

[0079] In this embodiment, the tuple information in the to-be-matched quintuple information which is the same as the preset tuple information corresponding to the preset field matched with the rule field is obtained, and the field value of the field corresponding to the tuple information is determined as the field value corresponding to the tuple information in the to-be-matched quintuple information which is the same as the preset tuple information corresponding to the preset field matched with the rule field. The required data is searched by comparing the hash values, which can effectively improve the comparison speed and save the comparison time.

[0080] Embodiment Five

[0081] Step 104 in which the to-be-matched hash value corresponding to the to-be-matched quintuple information is determined according to the rule field corresponding to the traversed rule identifier and the second mapping relationship is further refined, and specifically includes the following steps:

[0082] Step 1041, if the to-be-matched hash value is consistent with the rule hash value corresponding to the traversed rule identifier, then the to-be-matched quintuple information is determined as the target quintuple information.

[0083] In the embodiment, if the hash value to be matched is consistent with the rule hash value corresponding to the rule identifier in the first mapping relationship traversed, it indicates that the five tuple information to be matched corresponds to the rule in the first mapping relationship, and the five tuple information to be matched is the required data, and the five tuple information to be matched is determined as the target five tuple information.

[0084] In step 1042, if the hash value to be matched is inconsistent with all the rule hash values corresponding to the rule identifiers, the five tuple information to be matched is determined as non-target five tuple information.

[0085] In the embodiment, if the hash value to be matched is inconsistent with all the rule hash values corresponding to the rule identifiers in the first mapping relationship traversed, it indicates that the five tuple information to be matched does not correspond to all the rules in the first mapping relationship, and the five tuple information to be matched is not the required data, and the five tuple information to be matched is determined as non-target five tuple information, and the non-target five tuple information is further deleted. Storing the target five tuple information and deleting the non-target five tuple information can effectively save storage space.

[0086] Embodiment six

[0087] Figure 6 FIG. 1 is a flowchart of an information association method provided by an embodiment of the application, as shown in the figure, on the basis of the information association method provided by the embodiment one of the application, the step 104 of associating the target five tuple information and the corresponding rule identifier is further refined, and specifically includes the following steps: Figure 6

[0088] In step 104a, the rule identifier corresponding to the target five tuple information is determined.

[0089] In the embodiment, if the hash value to be matched is consistent with the rule hash value corresponding to the rule identifier in the first mapping relationship traversed, the rule identifier with which the hash value to be matched is consistent with the rule hash value in the first mapping relationship is determined, and the rule identifier is the rule identifier corresponding to the target five tuple information.

[0090] In step 104b, the target five tuple information is associated with the corresponding rule identifier and stored, and the association information containing the target five tuple information and the corresponding rule identifier is output.

[0091] In the embodiment, the target five tuple information is associated with the rule identifier corresponding to the target five tuple, and the association information containing the target five tuple information and the rule identifier corresponding to the target five tuple is further output, so that the user can analyze the target five tuple information and the corresponding rule of the rule identifier through the association information.

[0092] Embodiment seven

[0093] ​On the basis of the information association method provided in Embodiment Six of the present application, step 104a is further refined, and specifically includes the following steps:

[0094] Step 104a1, determining the rule identifier corresponding to all rule hash values consistent with the hash value to be matched as the rule identifier corresponding to the target five-tuple information.

[0095] In this embodiment, if the rule identifiers in the entire first mapping relationship are traversed, all rule identifiers corresponding to all rule hash values consistent with the hash value to be matched are obtained, all rule identifiers corresponding to all rule hash values consistent with the hash value to be matched are determined as the rule identifier corresponding to the target five-tuple information, the association information is further generated, and the association information is output, so as to facilitate the user to analyze the target five-tuple information and the rule corresponding to the rule identifier through the association information.

[0096] Figure 7 is a structural schematic diagram of the information association device provided in an embodiment of the present application, as shown in Figure 7 The information association device 200 provided in this embodiment includes an acquisition unit 201, a determination unit 202, and a comparison unit 203.

[0097] The acquisition unit 201 is configured to acquire the five-tuple information to be matched reported by the intelligent device, acquire the first mapping relationship of the rule identifier, the rule field, and the rule hash value, and acquire the second mapping relationship of the preset field and the preset five-tuple information. The determination unit 202 is configured to traverse the rule identifier in the first mapping relationship, and determine the hash value to be matched corresponding to the five-tuple information to be matched according to the rule field corresponding to the traversed rule identifier and the second mapping relationship. The comparison unit 203 is configured to compare the hash value to be matched with the rule hash value corresponding to the traversed rule identifier. The determination unit 202 is further configured to filter the five-tuple information to be matched according to the comparison result of the hash value, acquire the target five-tuple information reserved after the filtering, and associate the target five-tuple information with the corresponding rule identifier.

[0098] Optionally, the determination unit is further configured to match the rule field corresponding to the traversed rule identifier with the preset field in the second mapping relationship; and determine the hash value to be matched corresponding to the five-tuple information to be matched according to the preset five-tuple information corresponding to the preset field matched by the rule field.

[0099] Optionally, the determining unit is further configured to determine a field value corresponding to the same tuple information of the preset tuple information corresponding to the preset field matched with the rule field in the five-tuple information to be matched; splice the corresponding field value according to the arrangement order of the rule field corresponding to the traversed rule identifier to obtain a spliced field value; and calculate a hash value corresponding to the spliced field value, and determine the hash value as the hash value to be matched corresponding to the five-tuple information to be matched.

[0100] Optionally, the determining unit is further configured to compare the preset tuple information corresponding to the preset field matched with the rule field with the tuple information in the five-tuple information to be matched; obtain the tuple information in the five-tuple information to be matched which is the same as the preset tuple information corresponding to the preset field matched with the rule field, and determine the field value corresponding to the tuple information as the field value corresponding to the same tuple information.

[0101] Optionally, the determining unit is further configured to determine the five-tuple information to be matched as target five-tuple information if the hash value to be matched is consistent with the rule hash value corresponding to the traversed rule identifier; and determine the five-tuple information to be matched as non-target five-tuple information if the hash value to be matched is inconsistent with all the rule hash values corresponding to the traversed rule identifiers, and delete the non-target five-tuple information.

[0102] Optionally, the determining unit is further configured to determine the rule identifier corresponding to the target five-tuple information; store the target five-tuple information and the corresponding rule identifier in association, and output the association information containing the target five-tuple information and the corresponding rule identifier.

[0103] Optionally, the determining unit is further configured to determine the rule identifier corresponding to all the rule hash values consistent with the hash value to be matched as the rule identifier corresponding to the target five-tuple information.

[0104] Figure 8 is a block diagram of an electronic device for implementing the information association method of the embodiments of the present application, as shown in Figure 8 The electronic device 300 includes a processor 301 and a memory 302 communicatively connected with the processor 301.

[0105] The memory 302 stores computer execution instructions;

[0106] The processor 301 executes the computer execution instructions stored in the memory 302, so that the processor 301 executes the method provided in any one of the above embodiments.

[0107] In an exemplary embodiment, a computer readable storage medium is also provided, and the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to execute the method in any one of the above embodiments.

[0108] In an exemplary embodiment, there is also provided a computer program product comprising a computer program which, when executed by a processor, performs the method of any one of the above embodiments.

[0109] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.

[0110] It is to be understood that the application is not limited to the precise details of construction and the exemplary embodiments described above and illustrated in the drawings. The scope of the application is indicated by the appended claims rather than by the exemplary embodiments given above.

Claims

1. An information association method, characterized in that, include: The system obtains the five-tuple information to be matched reported by the smart device, obtains the first mapping relationship of rule identifier, rule field and rule hash value, and obtains the second mapping relationship of preset field and preset tuple information; the five-tuple information includes user tuple, time tuple, location tuple, context tuple and intent tuple. Traverse the rule identifiers in the first mapping relationship, and determine the hash value to be matched corresponding to the five-tuple information to be matched based on the rule field corresponding to the traversed rule identifier and the second mapping relationship; The second mapping relationship is used to indicate the correspondence between preset fields and user tuples, time tuples, location tuples, context tuples, or intent tuples; Compare the hash value to be matched with the hash value of the rule corresponding to the rule identifier that has been traversed; The information of the five-tuples to be matched is filtered according to the comparison result of the hash value, the target five-tuple information is obtained after filtering, and the target five-tuple information and the corresponding rule identifier are associated. The step of determining the hash value to be matched corresponding to the five-tuple information to be matched based on the rule field corresponding to the traversed rule identifier and the second mapping relationship includes: Match the rule field corresponding to the rule identifier encountered during the traversal with the preset field in the second mapping relationship; The hash value to be matched is determined based on the preset tuple information corresponding to the preset field matched by the rule field.

2. The method according to claim 1, characterized in that, The step of determining the hash value to be matched corresponding to the five-tuple information to be matched based on the preset tuple information corresponding to the preset field matched by the rule field includes: Determine the field values ​​of the tuple information that are identical to the preset tuple information that matches the rule field in the five-tuple information to be matched; The corresponding field values ​​are concatenated according to the order of the rule fields identified by the traversed rule identifiers, and the concatenated field values ​​are obtained. Calculate the hash value corresponding to the concatenated field value, and determine the hash value to be matched for the five-tuple information to be matched.

3. The method according to claim 2, characterized in that, The process of determining the field values ​​corresponding to the preset tuple information that matches the preset field in the five-tuple information to be matched includes: Compare the preset tuple information corresponding to the preset field that the rule field matches with the tuple information in the five-tuple information to be matched. Obtain the tuple information from the five-tuple information to be matched that is the same as the preset tuple information corresponding to the preset field that matches the rule field, and determine the field value corresponding to the tuple information as the field value corresponding to the same tuple information.

4. The method according to claim 1, characterized in that, The filtering of the five-tuple information to be matched based on the comparison result of the hash value includes: If the hash value to be matched is consistent with the rule hash value corresponding to the traversed rule identifier, then the five-tuple information to be matched is determined as the target five-tuple information; If the hash value to be matched is inconsistent with the rule hash values ​​corresponding to all the rule identifiers traversed, then the five-tuple information to be matched is determined to be non-target five-tuple information, and the non-target five-tuple information is deleted.

5. The method according to claim 1, characterized in that, The association of the target quintuple information and the corresponding rule identifier includes: Determine the rule identifier corresponding to the target quintuple information; The target quintuple information is associated with and stored with the corresponding rule identifier, and the associated information containing the target quintuple information and the corresponding rule identifier is output.

6. The method according to claim 5, characterized in that, The rule identifier corresponding to the target quintuple information includes: The rule identifier corresponding to the hash value of all rules that match the hash value to be matched is determined as the rule identifier corresponding to the target quintuple information.

7. An information association device, characterized in that, The device includes: The acquisition unit is used to acquire the five-tuple information to be matched reported by the smart device, acquire the first mapping relationship of rule identifier, rule field and rule hash value, and acquire the second mapping relationship of preset field and preset tuple information; the five-tuple information includes user tuple, time tuple, location tuple, context tuple and intent tuple; The determining unit is used to traverse the rule identifiers in the first mapping relationship and determine the hash value to be matched corresponding to the five-tuple information to be matched based on the rule field corresponding to the traversed rule identifier and the second mapping relationship; the second mapping relationship is used to indicate the correspondence between preset fields and user tuples, time tuples, location tuples, context tuples or intent tuples. The comparison unit is used to compare the hash value to be matched with the rule hash value corresponding to the traversed rule identifier; The determination unit is also used to filter the quintuple information to be matched based on the comparison result of the hash value, obtain the target quintuple information retained after filtering, and associate the target quintuple information with the corresponding rule identifier. The determining unit is specifically used to match the rule field corresponding to the traversed rule identifier with the preset field in the second mapping relationship; and to determine the hash value to be matched corresponding to the five-tuple information to be matched based on the preset tuple information corresponding to the preset field matched by the rule field.

8. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for analyzing and filtering message

    CN105871573A

  • Network traffic analysis method and apparatus, electronic device, and storage medium

    WO2022078104A1