A data security transmission method and system for smart properties
By dividing the peak period in the smart property and adjusting the Huffman tree node weight, the incoming and outgoing data of the smart property is compressed, which solves the data loss problem caused by the difference in incoming and outgoing frequency in the traditional Huffman compression algorithm during data transmission. More efficient and secure data transmission is achieved.
Patent Information
- Application Number
- CN202411017854.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-29
AI Technical Summary
When encoding smart properties with traditional Huffman compression algorithms, due to differences in the frequency of personnel entry and exit, the risk of data loss or damage during data transmission is different, and the security of data transmission cannot be effectively guaranteed.
By obtaining the access data in the building, dividing the peak periods, constructing a Huffman tree, adjusting the node weights, and combining the relative importance of each node in the Huffman tree to compress and transmit the access data.
Effectively protect individual users' private information, reduce the risk of losing important information, save transmission bandwidth and time, improve transmission efficiency, and enhance data security.
Smart Images

Figure CN118555036B
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital information transmission technology, and specifically to a data security transmission method and system for smart property management. Background Technology
[0002] Smart property management is a management system that combines information technology and Internet of Things (IoT) technology with traditional property management. When managing property through smart property management, it typically collects and transmits information on the entry and exit of residents or employees in the building. This enables the improvement of property management efficiency through information management and intelligent services, enhances building security, and protects the personal safety of residents and employees.
[0003] When smart property management systems encode the acquired personnel access information using traditional Huffman compression algorithms, the encoding results are affected by the different access frequencies of different personnel. This leads to varying risks of data loss or corruption for different personnel during data transmission, further compromising the security of data transmission. Summary of the Invention
[0004] This invention provides a data security transmission method and system for smart property management to solve existing problems.
[0005] The present invention provides a data security transmission method and system for smart property management, which adopts the following technical solution:
[0006] One embodiment of the present invention provides a data security transmission method for smart property management, the method comprising the following steps:
[0007] Get the entry and exit data of all people in the building, get the number of people leaving and entering the building at each time, and record them as the outflow and inflow at the corresponding time. Get the sequence formed by the outflow and inflow at all times within the preset time, and record them as the outflow sequence and inflow sequence, respectively. The outflow sequence and inflow sequence are collectively referred to as the outflow and inflow sequence.
[0008] Based on the distribution of the number of people entering and exiting in different time ranges within the entry and exit flow sequence, the entry and exit flow sequence is divided into several peak periods.
[0009] Construct a Huffman tree, treating each person as a node in the Huffman tree. Based on the difference between the entry and exit times of the person corresponding to each node in the Huffman tree and the peak period, as well as the number of entry and exit times, obtain the single importance of the node. Based on the difference in single importance between any node and its neighboring nodes, obtain the relative importance of each node in the Huffman tree.
[0010] Obtain the initial weight of each node in the Huffman tree, and adjust the initial weights according to the relative importance of the nodes to obtain the final weight of each node;
[0011] The entry and exit data of all personnel are compressed and transmitted by combining the final weight of each node in the Huffman tree.
[0012] Furthermore, the aforementioned peak periods include the morning peak period, the noon peak period, and the evening peak period.
[0013] Furthermore, the specific methods for obtaining the morning peak period, noon peak period, and evening peak period include:
[0014] First, based on the distribution of the number of people entering and exiting within the corresponding range at any two moments in the inflow / outflow sequence, the time coefficients for the two moments are obtained.
[0015] Then, based on the corresponding time coefficients at different times, the outflow and inflow sequences are divided to obtain the morning peak of the inflow sequence and the evening peak of the outflow sequence.
[0016] Finally, the time corresponding to the first element in the inflow sequence and the time corresponding to the last element in the outflow sequence are obtained and recorded as the start time and the end time, respectively. The average of all times from the start time to the end time is recorded as the daily average time. Combining the daily average time and the entry and exit of people between different times in the inflow and outflow sequences, the midday peak period is obtained.
[0017] Furthermore, the specific method for obtaining the time coefficients for the two time points based on the distribution of the number of people entering and exiting within the corresponding range at any two time points in the inflow / outflow sequence includes:
[0018]
[0019] in , Indicates the first inflow / outflow sequence The moment and the first The time coefficient at each moment Indicates the first inflow / outflow sequence The moment before The number of people at each time point Indicates the first inflow / outflow sequence The moment after the first moment The number of people at each time point Indicates the first inflow / outflow sequence The moment and the first The number of times contained between each time point Indicates the first inflow / outflow sequence The moment and the first Between the nth and nth moments The number of people at each time point Indicates the first inflow / outflow sequence The moment and the first The average number of people at all times between each time point. This represents the preset first parameter. This represents an exponential function with the natural constant as its base. This represents the absolute value function.
[0020] Furthermore, the specific method for dividing the outflow and inflow sequences according to the corresponding time coefficients at different times to obtain the early peak segment of the inflow sequence and the evening peak segment of the outflow sequence includes:
[0021] Based on the time coefficient and the magnitude of the two times corresponding to the time coefficient in the inflow sequence and outflow sequence respectively, the probability of the morning peak in the inflow sequence and the probability of the evening peak in the outflow sequence are obtained respectively. Combining the probability of the morning peak and the probability of the evening peak with the flow of people within the range formed by the corresponding times, the feasibility coefficient of the division of the corresponding times is obtained.
[0022] Obtain the four time points corresponding to the maximum partitioning feasibility coefficient, and denote them in ascending order as follows: , , , time interval The sequence formed by the inflow within the corresponding range in the inflow sequence is denoted as the morning peak period, and the time interval is defined as follows: The sequence of outflows within the corresponding range in the outflow sequence is denoted as the evening peak period.
[0023] Furthermore, the specific method for obtaining the midday peak period by combining the daily average time and the entry and exit data of people at different times in the inflow and outflow sequences includes:
[0024] By combining the daily average time and the entry and exit data of people at different times in the inflow and outflow sequences, the first [time value] in the inflow sequence is obtained. The time and outflow sequence of the th moment The probability of the midday peak period within a corresponding time range between a given moment;
[0025] Find the two times corresponding to the highest probability of the midday peak, and denote them in ascending order as follows: and , will the interval The corresponding time period is designated as the midday peak.
[0026] Furthermore, the method for obtaining the single importance of a node based on the difference between the entry / exit time of the person corresponding to each node in the Huffman tree and the peak period, as well as the number of entry / exit times, includes the following specific methods:
[0027] All times that form the morning peak, noon peak and evening peak are recorded as peak times. The absolute value of the minimum difference between the entry and exit time of any person and the peak times for each entry and exit is recorded as the time deviation parameter of the person for the corresponding number of entry and exit. The mean of the time deviation parameters of any person for all entry and exit is recorded as the overall time deviation degree of the person.
[0028] By combining the overall time deviation of the personnel corresponding to any node in the Huffman tree, and based on the difference in the entry and exit times of adjacent personnel, as well as the difference in the number of times personnel enter and exit, the single importance of the node is obtained.
[0029] Furthermore, the specific method for calculating the single importance of the node is as follows:
[0030]
[0031] in, The first Huffman tree The individual importance of each node The first Huffman tree Each node corresponds to the number of times personnel enter and exit. The first Huffman tree The overall time deviation of the personnel corresponding to each node The first Huffman tree The node corresponds to the personnel of the first The number of entries and exits corresponds to the entry and exit times. The first Huffman tree The node corresponds to the personnel of the first The number of entries and exits corresponds to the entry and exit times. The first Huffman tree Each node corresponds to the number of times a person enters. The first Huffman tree Each node corresponds to the number of times a person goes out. This indicates that the absolute value is obtained.
[0032] Furthermore, the specific method for obtaining the relative importance of each node in the Huffman tree based on the difference in single importance between any node and its neighboring nodes includes:
[0033]
[0034] in, The first Huffman tree The relative importance of each node Indicates the first with Huffman tree The single importance of the nearest node to a given node. The first Huffman tree The individual importance of each node.
[0035] An embodiment of the present invention provides a data security transmission system for smart properties. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the data security transmission method for smart properties.
[0036] The beneficial effects of the technical solution of this invention are as follows: In this embodiment, the influence of personnel entry and exit behavior on the importance of entry and exit data is considered. By analyzing the peak periods and importance of nodes in the entry and exit traffic, and adjusting the weights according to the relative importance of each node in the Huffman tree, the privacy information of individual users can be effectively protected. The construction process of the Huffman tree considers the relationship between personnel entry and exit times and peak periods, rather than directly transmitting the original data. Therefore, it can reduce the risk of losing important information, effectively reduce the size of important data transmission, save transmission bandwidth and transmission time, thereby improving transmission efficiency and enhancing data transmission security. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating the steps of a data security transmission method for smart property management according to the present invention. Detailed Implementation
[0039] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a data security transmission method and system for smart property management proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0041] The following description, in conjunction with the accompanying drawings, details a specific solution for a data security transmission method and system for smart property management provided by the present invention.
[0042] Please see Figure 1 The diagram illustrates a flowchart of a data security transmission method for smart property management according to an embodiment of the present invention. The method includes the following steps:
[0043] Step S001: Obtain entry and exit data for all personnel within the building.
[0044] It should be noted that due to the different job duties of people in the building, the frequency of their entry and exit from the building also varies. For example, property management personnel in the building will frequently enter and exit the building due to work requirements, while company employees or residents in the building usually do not need to enter and exit the building frequently. Therefore, the amount of entry and exit data generated by different people also varies. When using the Huffman compression algorithm to encode the entry and exit information of all people in the building and transmit it to the server for storage, the larger the data volume corresponding to the encoding result of the entry and exit data for each person, the greater the risk of data loss during transmission, and vice versa. Therefore, the encoded data corresponding to people with high entry and exit frequency is naturally shorter (i.e., the data volume is smaller) and there is no high risk of data loss. However, among people with low entry and exit frequency, some people's entry and exit behavior may be relatively abnormal and need to be closely monitored to ensure the safety of other people in the building. Therefore, it is necessary to ensure that the entry and exit data of these people can also be shortened when using the Huffman compression algorithm for encoding and transmission to avoid data loss during transmission.
[0045] Specifically, in order to implement the data security transmission method for smart property proposed in this embodiment, it is first necessary to collect incoming and outgoing data. The specific process is as follows:
[0046] First, the access control gates installed inside the building are used to collect all personnel's entry and exit data. The access data includes at least the personnel's identity information, number of times they enter and exit, and the time of entry and exit.
[0047] It should be noted that the number of entries and exits is the sum of the number of times a person leaves and enters, and is counted to obtain the number of entries and exits. Each entry and exit corresponds to an entry and exit time.
[0048] Then, the number of people leaving and entering the building at each time point is obtained and recorded as the outflow and inflow at the corresponding time point, collectively referred to as the flow of people. The sequences formed by the outflow and inflow at all times within the preset time period are obtained and recorded as the outflow sequence and inflow sequence, respectively. The outflow sequence and inflow sequence are collectively referred to as the outflow-inflow sequence.
[0049] Thus, the inflow and outflow data, outflow sequence, and inflow sequence are obtained through the above methods.
[0050] Step S002: Based on the distribution of the number of people entering and exiting in different time ranges in the inflow and outflow sequence, divide the inflow and outflow sequence into several peak periods.
[0051] It should be noted that the number of people passing through the turnstiles in the building varies at different times, and the time intervals before and after each person's entry and exit also differ. This can lead to significant differences in the behavior of some people entering and exiting the building compared to others. Therefore, it is necessary to ensure that the entry and exit data of these individuals does not suffer from significant data loss during encoding and transmission, so as to safeguard the safety of people in the building based on the encoded and stored entry and exit data. Thus, this embodiment analyzes the entry and exit data, combines the number of people entering and exiting in different time periods within the outflow and inflow sequences, and divides the data into time periods to facilitate subsequent analysis of the importance of different individuals' entry and exit data. In other words, it is necessary to ensure that the Huffman tree compression encoding algorithm is used to obtain the smallest possible amount of data for transmission.
[0052] In this embodiment of the invention, it is considered that the flow of people is very small before and after the start of the morning peak, and fluctuates greatly within these two time periods, with the start and end times being relatively early. Similarly, the flow of people is very small before and after the start of the evening peak, and fluctuates greatly within these two time periods, with the start and end times being relatively late. Furthermore, since the flow of people entering and exiting office buildings should be relatively consistent every day, the start and end times of the morning and evening peaks are determined by the consistency of the flow of people during these two peak periods. In addition, during the noon peak, the flow of people is also very small before and after the start of the afternoon peak, and fluctuates greatly within these two time periods, with the start and end times being relatively close to the center of the hour. The start and end times of the noon peak are determined by this.
[0053] Specifically, the plurality of peak periods include the morning peak period, the noon peak period, and the evening peak period. In one embodiment of the present invention, the method for obtaining the morning peak period, the noon peak period, and the evening peak period includes:
[0054] First, based on the distribution of the number of people entering and exiting within the range of any two times in the inflow / outflow sequence, the time coefficients for the two times are obtained.
[0055] As one embodiment, the specific calculation method for the time coefficient is as follows:
[0056]
[0057] in , Indicates the first inflow / outflow sequence The moment and the first The time coefficient at each moment Indicates the first inflow / outflow sequence The moment before The number of people at each time point Indicates the first inflow / outflow sequence The moment after the first moment The number of people at each time point Indicates the first inflow / outflow sequence The moment and the first The number of times contained between each time point Indicates the first inflow / outflow sequence The moment and the first Between the nth and nth moments The number of people at each time point Indicates the first inflow / outflow sequence The moment and the first The average number of people at all times between each time point. This represents the preset first parameter. This represents an exponential function with the natural constant as its base. This indicates that the absolute value is obtained.
[0058] It should be noted that the first parameter is preset to 5 based on experience, and can be adjusted according to the actual situation. This embodiment does not impose any specific limitations.
[0059] It should be noted that the time coefficient is used to describe the changes in pedestrian traffic within a local time range formed in the inflow and outflow sequences at two corresponding moments. It reflects the possibility that the time range formed at the two corresponding moments is a traffic peak. Typically, due to the setting of people's commuting time, there is a high level of pedestrian traffic within a certain time range, while the pedestrian traffic level is low in other time ranges. This results in a morning peak in the inflow sequence and an evening peak in the outflow sequence. Therefore, a morning peak segment and an evening peak segment are formed within the corresponding time range. The larger the time coefficient, the higher the probability that a morning peak segment or an evening peak segment can be divided between the two corresponding moments.
[0060] Then, based on the corresponding time coefficients at different times, the outflow and inflow sequences are divided to obtain the morning peak of the inflow sequence and the evening peak of the outflow sequence.
[0061] Specifically, based on the time coefficient and the magnitude of the two times corresponding to the time coefficient in the inflow sequence and outflow sequence, the probability of the morning peak in the inflow sequence and the probability of the evening peak in the outflow sequence are obtained respectively. Combining the probability of the morning peak and the probability of the evening peak with the pedestrian flow within the range formed by the corresponding times, the feasibility coefficient of the division of the corresponding times is obtained.
[0062] As one embodiment, the specific calculation method for the probability of the morning rush hour is as follows:
[0063]
[0064] in, Indicates the first The moment and the first The probability of a given moment falling within the early peak segment of the inflow sequence. Indicates the first inflow / outflow sequence The moment and the first The time coefficient at each moment.
[0065] As one embodiment, the specific calculation method for the probability of the evening peak period is as follows:
[0066]
[0067] in, Indicates the first The moment and the first The probability of a given moment occurring during the evening peak period in the outflow sequence. Indicates the first inflow / outflow sequence The moment and the first The time coefficient at each moment.
[0068] It should be noted that, since the morning rush hour corresponds to an earlier time period and the evening rush hour corresponds to a later time period, the smaller the corresponding time period is in the calculation method for the probability of the morning rush hour, the greater the probability of the morning rush hour. On the other hand, the evening rush hour usually corresponds to a later time period, so the larger the corresponding time period is in the calculation method for the probability of the evening rush hour, the greater the probability of the corresponding evening rush hour.
[0069] As one embodiment, the specific calculation method for the feasibility coefficient is as follows:
[0070]
[0071] in, Indicates the first inflow sequence The moment and the first The _th time in the outflow sequence The moment and the first The feasibility coefficient of partitioning at each time point Indicates the first The moment and the first The probability of a given moment falling within the early peak segment of the inflow sequence. Indicates the first The moment and the first The probability of a given moment occurring during the evening peak period in the outflow sequence. This represents an exponential function with the natural constant as its base. Indicates the first inflow sequence The moment and the first The cumulative value of all inflows between time points. Represent the flow sequence of the th The moment and the first The cumulative value of all outflows between any given time points. This indicates that the absolute value is obtained.
[0072] It should be noted that the partitioning feasibility coefficient is used to describe the first... The moment and the first The first time point is used to divide the morning rush hour, the second... The moment and the first The feasibility of dividing the evening rush hour into time periods is determined by a specific time point. A higher feasibility coefficient indicates greater overall feasibility. This applies not only to the start and end times of the morning and evening rush hours, but also to the probability of the morning rush hour. Probability of evening rush hour It needs to be high up, and the number of people entering the building during the morning rush hour and leaving during the evening rush hour should be similar. The smaller the value, the more feasible it is to use the corresponding time to divide the morning and evening rush hours.
[0073] Obtain the four time points corresponding to the maximum partitioning feasibility coefficient, and denote them in ascending order as follows: , , , time interval The sequence formed by the inflow within the corresponding range in the inflow sequence is denoted as the morning peak period, and the time interval is defined as follows: The sequence of outflows within the corresponding range in the outflow sequence is denoted as the evening peak period.
[0074] Finally, the time corresponding to the first element in the inflow sequence and the time corresponding to the last element in the outflow sequence are obtained and recorded as the start time and the end time, respectively. The average of all times from the start time to the end time is recorded as the daily average time. Combining the daily average time and the entry and exit of personnel between different times in the inflow and outflow sequences, the first element in the inflow sequence is obtained. The time and outflow sequence of the th moment The probability of the midday peak period within a corresponding time range between a given time point is calculated as follows:
[0075]
[0076] in , Indicates the first inflow sequence The time and outflow sequence of the th moment The probability of the midday peak period within a corresponding time range between a given moment. Indicates the average time per day. Indicates the first inflow sequence The cumulative value of the inflow at time S1 after time S1. Represent the flow sequence of the th The cumulative outflow value of S1 time points prior to time point S1. This represents the amount of data between time point a and time point b. Indicates the first The moment and the Between the nth and nth moments Total number of people at any given time Indicates the first The moment and the The average of the total number of people at all times between a given time point. This represents an exponential function with the natural constant as its base. This indicates that the absolute value is obtained.
[0077] It should be noted that due to lunch breaks and mealtimes, there is a high volume of people at midday, forming a midday peak. Since people typically leave before entering buildings during this peak, this embodiment combines the distribution of pedestrian traffic at different times within both the outflow and inflow sequences to determine the probability of defining a midday peak between two corresponding times. Because pedestrian traffic before and after the midday peak is usually relatively low, therefore... The smaller the value, the higher the probability that the corresponding time period is the midday peak. Additionally, in the... The moment and the Fluctuations within the corresponding time period at each moment It is very large, and its start and end times are relatively close to the central time, so The smaller the value, the higher the probability of the midday rush hour. The moment and the The more specific the time, the more likely it is to be the midday peak period.
[0078] Find the two times corresponding to the highest probability of the midday peak, and denote them in ascending order as follows: and , will the interval The corresponding time period is designated as the midday peak.
[0079] Thus, the morning peak, noon peak, and evening peak periods are obtained through the above method.
[0080] Step S003: Construct a Huffman tree, treating each person as a node in the Huffman tree. Based on the difference between the entry and exit times of each person corresponding to a node in the Huffman tree and the peak period, as well as the number of entry and exits, obtain the single importance of the node. Based on the difference in single importance between any node and its neighboring nodes, obtain the relative importance of each node in the Huffman tree.
[0081] It should be noted that since the entry and exit times of each person reflect their behavioral characteristics, if a person's entry and exit times are not during the morning, noon, or evening peak hours, that person may have exhibited abnormal behavior or other behaviors that require close monitoring to ensure the safety of people in the building. Therefore, this embodiment performs time analysis based on the entry and exit information of each person to determine the importance of each person, so as to ensure that the entry and exit data of important personnel is compressed and transmitted with a smaller data volume in the future, thereby reducing the risk of data loss during the compression and transmission of important personnel's entry and exit data.
[0082] Constructing a Huffman tree involves using the Huffman algorithm to build the Huffman tree.
[0083] Step 3.1: Based on the difference between the entry and exit times of the personnel corresponding to each node in the Huffman tree and the peak period, as well as the number of entry and exit times, obtain the single importance of the node.
[0084] As one example, the specific method for obtaining the single importance of a Q node based on the entry and exit time of each person and the formula constructed accordingly is as follows:
[0085] All times that form the morning peak, noon peak, and evening peak are recorded as peak times. The absolute value of the minimum difference between the entry / exit time and the peak time for each entry / exit of any person is recorded as the time deviation parameter for the corresponding number of entry / exit times for that person. The mean of the time deviation parameters for all entry / exit times for any person is recorded as the overall time deviation degree for that person.
[0086] By combining the overall time deviation of the personnel corresponding to any node in the Huffman tree, and based on the difference in the entry and exit times of adjacent personnel, as well as the difference in the number of times personnel enter and exit, the single importance of the node is obtained.
[0087]
[0088] in, The first Huffman tree The individual importance of each node The first Huffman tree Each node corresponds to the number of times personnel enter and exit. The first Huffman tree The overall time deviation of the personnel corresponding to each node The first Huffman tree The node corresponds to the personnel of the first The number of entries and exits corresponds to the entry and exit times. The first Huffman tree The node corresponds to the personnel of the first The number of entries and exits corresponds to the entry and exit times. The first Huffman tree Each node corresponds to the number of times a person enters. The first Huffman tree Each node corresponds to the number of times a person goes out. This indicates that the absolute value is obtained.
[0089] It should be noted that the single importance level is used to describe the degree to which a person corresponding to a node needs attention in terms of the number of times and the time of their entry and exit. The higher the single importance level, the more attention is required. Since people who do not enter or exit during the morning, noon, and evening peak hours differ significantly from the majority of people, they are considered outliers and require special attention. Therefore, for any person, the overall time deviation obtained based on the entry and exit time corresponding to each entry and exit reflects the deviation of that person's entry and exit time from the corresponding peak time, that is, it characterizes the person's entry and exit during peak hours. The larger the overall time deviation, the less the person's entry and exit time deviates from the corresponding peak time, and therefore the more important it is to avoid data loss for that person's entry and exit data. In addition, This reflects the duration of time between a person's entry and exit. A longer interval indicates a longer stay during each entry and exit, thus requiring closer monitoring. Therefore, the risk of data loss for the corresponding entry and exit data must be minimized. Furthermore, normally, the number of times each person enters and exits should be the same throughout the day. Therefore, if the number of times a person enters and exits differs, that person's behavior needs close monitoring to ensure that their entry and exit data is encoded, compressed, and transmitted with minimal risk of data loss. The larger the value, the more important it is to protect the entry and exit data of the corresponding personnel. Reduce the character length when performing Huffman compression to reduce the corresponding data volume, thereby reducing the risk of data loss during data transmission.
[0090] Step 3.2: Obtain the relative importance of each node in the Huffman tree based on the difference in single importance between any node and its neighboring nodes.
[0091] As one embodiment, the specific method for calculating the relative importance is as follows:
[0092]
[0093] in, The first Huffman tree The relative importance of each node Indicates the first with Huffman tree The single importance of the nearest node to a given node. The first Huffman tree The individual importance of each node.
[0094] It should be noted that the relative importance level is used to describe the difference in behavior between the personnel corresponding to the node and other personnel. It reflects the degree to which the entry and exit data of the personnel corresponding to the node should be protected. That is, when Huffman coding compression is performed on it, the amount of compressed data should be smaller to reduce the risk of data loss during subsequent compressed data transmission.
[0095] Thus, the relative importance of each node in the Huffman tree is obtained using the above method.
[0096] Step S004: Obtain the initial weight of each node in the Huffman tree, and adjust the initial weight using the relative importance of the nodes to obtain the final weight of each node.
[0097] It should be noted that when constructing a Huffman tree using the conventional Huffman compression algorithm, the frequency of the data is usually used as the weight to construct the Huffman tree, so that high-frequency data can be encoded and compressed with a smaller amount of data. However, this effect cannot be achieved for data that is low in frequency but high in importance. As a result, important data is more likely to be lost during transmission due to its large data volume and long transmission time. Therefore, in order to reduce the risk of data loss during transmission, this embodiment chooses to adjust the weight of each node in the Huffman tree to improve the compression effect of low-frequency but high-importance input and output data.
[0098] Specifically, as one embodiment, the specific method for calculating the final weight is as follows:
[0099]
[0100] in, The first Huffman tree The final weight of each node, The first Huffman tree The relative importance of each node The first Huffman tree The initial weights of each node.
[0101] It should be noted that since the Huffman compression algorithm encodes and compresses data based on the frequency, the initial weight of the nodes in the constructed Huffman tree is the frequency of the data corresponding to the node, that is, the initial weight is the number of times the person corresponding to the node enters and exits.
[0102] It should be noted that here, the weights determined solely by frequency are adjusted based on the importance of personnel nodes, so that important personnel nodes have relatively higher final weights and unimportant personnel nodes have relatively lower final weights, thus constructing the above formula.
[0103] Thus, the final weight of each node is obtained through the above method.
[0104] Step S005: Combining the final weight of each node in the Huffman tree, compress and transmit the entry and exit data of all personnel.
[0105] Specifically, by combining the final weight of each node in the Huffman tree and using the Huffman compression algorithm to compress the entry and exit data of all personnel, compressed data is obtained. The compressed data is then transmitted to the server for storage using the 5G network.
[0106] It should be noted that the process of compressing all personnel entry and exit data using the Huffman compression algorithm is based on the conventional method of constructing a Huffman tree. This involves merging the two nodes with the lowest weights to form a new node, and then merging this new node with the remaining nodes with the lowest weights to construct a Huffman tree based on the importance of each personnel node. By reconstructing the Huffman tree for each personnel node, setting the left path to 0 and the right path to 1, and encoding along the Huffman tree, data compression processing that better protects and facilitates the transmission of critical personnel data can be directly achieved.
[0107] By uploading the personnel access data compressed using the Huffman tree to the cloud storage service and transmitting the data via a network link, the key personnel data that should be of concern has a shorter encoding. If a loss occurs, the risk is also very small, because the more digits 0000001 has compared to 1, the greater the risk of loss. Thus, secure transmission of personnel access data for smart properties is achieved.
[0108] By following the above steps, the secure compressed transmission of personnel entry and exit data within the property building is completed.
[0109] An embodiment of the present invention also provides a data security transmission system for smart properties. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the data security transmission method for smart properties described in steps S001 to S005.
[0110] This embodiment considers the impact of personnel entry and exit behavior on the importance of entry and exit data. By analyzing the peak periods and importance of nodes in the entry and exit traffic, and adjusting the weights of each node in the Huffman tree according to its relative importance, it can effectively protect the privacy information of individual users. The Huffman tree construction process considers the relationship between personnel entry and exit times and peak periods, rather than directly transmitting raw data. Therefore, it can reduce the risk of losing important information, effectively reduce the size of important data transmission, save transmission bandwidth and time, thereby improving transmission efficiency and enhancing data transmission security.
[0111] It should be noted that the embodiments used in this example The model is only used to represent negative correlations and the results of the constraint model output are in Within this range, in specific implementations, other models with the same purpose can be substituted; this embodiment is merely an example. The description will be based on a model, without making specific limitations on it. This refers to the input of the model.
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A data security transmission method for smart properties, characterized in that: The method comprises the following steps: Obtain the in-and-out data of all personnel in the building, obtain the number of people going out and entering the building at each moment, record them as the outflow and inflow at the corresponding moment, obtain the sequences formed by the outflow and inflow at all moments within the preset time, record them as outflow sequence and inflow sequence, and refer to the outflow sequence and inflow sequence as inflow sequence; According to the distribution of the number of people entering and leaving the sequence in different time ranges, the sequence of in-and-out traffic is divided into several peak periods; Construct a Huffman tree, take each person as a node of the Huffman tree, obtain the single importance of the node according to the difference between the entry and exit time of the person corresponding to each node in the Huffman tree and the peak period and the number of entry and exit, and obtain the relative importance of each node in the Huffman tree according to the difference between the single importance of any node and the adjacent nodes; Obtaining the initial weight of each node in the Huffman tree, and adjusting the initial weight using the relative importance of the node to obtain the final weight of each node; The final weight of each node in the Huffman tree is combined to compress and transmit the entry and exit data of all personnel.
2. A data security transmission method for smart properties according to claim 1, characterized in that: The several peak periods include a morning peak period, a noon peak period and an evening peak period.
3. A data security transmission method for smart properties according to claim 2, characterized in that: The specific method for obtaining the morning peak period, the afternoon peak period and the evening peak period includes: First, according to the distribution of the number of people entering and leaving the corresponding range at any two moments in the in-and-out flow sequence, the time coefficients of the two moments are obtained; Then, the outflow sequence and inflow sequence are divided according to the corresponding time coefficients at different times, and the morning peak section of the inflow sequence and the evening peak section of the outflow sequence are obtained; Finally, obtain the time corresponding to the first element in the inflow sequence and the time corresponding to the last element in the outflow sequence, record them as the starting time and the final time respectively, and record the average of all times from the starting time to the final time as the daily average time; combine the daily average time and the entry and exit of personnel between different times in the inflow sequence and the outflow sequence to obtain the noon peak period.
4. A data security transmission method for smart properties according to claim 3, characterized in that: The specific method of obtaining the time coefficients of any two moments according to the distribution of the number of people entering and leaving the corresponding range at any two moments in the in-and-out flow sequence includes: in , Indicates the first The moment and The time coefficient of the moment, Indicates the first Moments ago The number of people corresponding to the moment, Indicates the first After a moment The number of people corresponding to the moment, Indicates the first The moment and The number of moments included between moments, Indicates the first The moment and The moment between The number of people corresponding to the moment, Indicates the first The moment and The average number of people at all times between the moments is represents the first parameter of the preset, represents an exponential function with a natural constant as base, represents the absolute value function.
5. According to claim 3, a data security transmission method for smart properties is characterized in that: The method of dividing the outflow sequence and the inflow sequence according to the corresponding time coefficients at different times to obtain the morning peak section of the inflow sequence and the evening peak section of the outflow sequence includes the following specific methods: According to the time coefficient and in combination with the magnitude of the time coefficient in the inflow sequence and the outflow sequence at the two moments respectively, the probability of the morning peak section in the inflow sequence and the probability of the evening peak section in the outflow sequence at the two moments are obtained respectively, and the feasible coefficient of division at the corresponding moment is obtained by combining the probability of the morning peak section and the probability of the evening peak section and the flow of people within the range formed at the corresponding moments respectively; Get the four moments corresponding to the maximum partitioning feasible coefficient, and record them in order from small to large as , , , , the time interval The sequence of inflows in the corresponding range in the inflow sequence is recorded as the morning peak period, and the time interval The sequence formed by the outflow within the corresponding range in the outflow sequence is recorded as the evening peak segment.
6. A data security transmission method for smart properties according to claim 3, characterized in that: The method of combining the daily average time and obtaining the noon peak period according to the entry and exit of personnel between different times in the inflow sequence and the outflow sequence includes the following specific methods: Combined with the daily average time and according to the entry and exit of people at different times in the inflow sequence and outflow sequence, the first The time and outflow sequence The probability of the lunch rush hour in the corresponding time range between the moments; Get the two times corresponding to the maximum probability of the lunch rush hour, and record them in ascending order as and , the interval The corresponding time period is regarded as the lunch rush hour period.
7. A data security transmission method for smart properties according to claim 1, characterized in that: The specific method of obtaining the single importance of each node in the Huffman tree according to the difference between the entry and exit time of the person corresponding to each node and the peak period and the number of entry and exit is as follows: All the moments that form the morning peak period, the afternoon peak period, and the evening peak period are recorded as peak period moments, the minimum absolute value of the difference between the corresponding entry and exit time of any person each time he / she enters and exits and the peak period moment is recorded as the moment deviation parameter for the corresponding entry and exit times of the person, and the mean value of the moment deviation parameter for all entry and exit times of any person is recorded as the overall moment deviation degree of the person; Combined with the overall time deviation degree of the person corresponding to any node in the Huffman tree, and based on the difference in the entry and exit times of the person in adjacent times, and the difference in the number of times the person enters and exits, the single importance of the node is obtained.
8. According to claim 1, a data security transmission method for smart properties is characterized in that: The specific calculation method of the single importance of the node is: in, Represents the Huffman tree The single importance of a node, Represents the Huffman tree The number of people entering and exiting a node, Represents the Huffman tree The overall time deviation degree of each node corresponding to the personnel, Represents the Huffman tree The node corresponds to the person The entry and exit times corresponding to the number of entry and exit times, Represents the Huffman tree The node corresponds to the person The entry and exit times corresponding to the number of entry and exit times, Represents the Huffman tree The number of times a node corresponds to a person entering. Represents the Huffman tree The number of times a node corresponds to a person going out, Gets the absolute value.
9. A data security transmission method for smart properties according to claim 1, characterized in that: The specific method of obtaining the relative importance of each node in the Huffman tree according to the difference in the single importance between any node and the adjacent nodes is as follows: in, Represents the Huffman tree The relative importance of each node, Represents the Huffman tree The single importance of the node closest to the node, Represents the Huffman tree The single importance of a node.
10. A data security transmission system for smart properties, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by the processor, the steps of a method for secure data transmission for smart properties as described in any one of claims 1 to 9 are implemented.
