A portable intelligent electronic scale weighing data optimization transmission method
By calculating the transmission density and stability of portable smart electronic scales and adaptively adjusting the transmission priority, the problem of poor weighing data transmission in portable smart electronic scales is solved and the quality and efficiency of data transmission are improved.
Patent Information
- Application Number
- CN202411027892.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-30
AI Technical Summary
In portable smart electronic scales, the same transmission priority setting results in poor weighing data transmission, especially due to different possibilities of transmission errors due to equipment aging and other reasons, resulting in poor data transmission.
By obtaining the historical and current weighing transmission information of each electronic scale, calculating the transmission density and stability, and adaptively determining the transmission priority of each electronic scale to optimize data transmission. Specific methods include calculating average transmission duration, interval and distribution factors, screening retransmission events, evaluating transmission cost factors, determining initial priorities, and adjusting priorities based on historical data.
It improves the effect of weighing data transmission and ensures the quality and efficiency of data transmission by quantifying transmission priority-related indicators and reducing the possibility of transmission errors.
Smart Images

Figure CN118555310B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a method for optimizing transmission of weighing data of a portable intelligent electronic scale. Background Art
[0002] With the development of science and technology, the application of object weight is becoming more and more extensive. For example, object weight can be used in the supervision and management of object measurement. In the application process of object weight, it is often necessary to transmit the weighing data collected by multiple electronic scales. For example, the collected weighing data can be transmitted to the computer terminal of the weight inspection personnel, so that the weight inspection personnel can judge whether the weight of the object is qualified. Portable smart electronic scale is a relatively common electronic scale. At present, when transmitting the weighing data collected by multiple electronic scales, the same transmission priority is often set for the weighing data collected by different electronic scales, and the weighing data collected by multiple electronic scales are transmitted in turn.
[0003] However, when transmitting the weighing data collected by multiple portable intelligent electronic scales, if the same transmission priority is set for different portable intelligent electronic scales, the following technical problems often occur:
[0004] During the use of portable intelligent electronic scales, due to various reasons such as aging, different portable intelligent electronic scales may have different possibilities of transmission errors during data transmission. In actual situations, in order to prevent the situation where most of the transmitted weighing data are weighing data with transmission errors when the network is poor and only less data can be transmitted, it is often necessary to give priority to transmitting the weighing data collected by the portable intelligent electronic scales with a smaller possibility of error. Therefore, if the same transmission priority is set for different portable intelligent electronic scales, it often leads to poor transmission effect of weighing data. Summary of the invention
[0005] In order to solve the technical problem of poor transmission effect of weighing data, the present invention proposes a method for optimizing transmission of weighing data of a portable intelligent electronic scale.
[0006] In a first aspect, the present invention provides a method for optimizing the transmission of weighing data of a portable intelligent electronic scale, the method comprising:
[0007] Obtaining the weighing transmission information of each target electronic scale in each preset historical time period, and the weighing information to be transmitted of each target electronic scale in the current time period;
[0008] Determine the transmission density corresponding to each weighing transmission information according to the transmission duration corresponding to each transmission event included in each weighing transmission information, the time interval between adjacent transmission events and the number of transmission events;
[0009] Each retransmission event is screened out from each weighing transmission information, and the transmission stability corresponding to each weighing transmission information is determined according to the transmission duration corresponding to each retransmission event of the same type included in each weighing transmission information;
[0010] Determine the transmission priority corresponding to each target electronic scale according to the transmission density and transmission stability corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods;
[0011] According to the transmission priority corresponding to each target electronic scale, the weighing information to be transmitted of each target electronic scale in the current time period is transmitted.
[0012] In combination with the first aspect above, in a possible implementation, determining the transmission density corresponding to each weighing transmission information according to the transmission duration corresponding to each transmission event included in each weighing transmission information, the time interval between adjacent transmission events, and the number of transmission events includes:
[0013] The average of the transmission durations corresponding to all transmission events included in each weighing transmission information is determined as the average transmission duration corresponding to each weighing transmission information;
[0014] Determine the average of the time intervals between all adjacent transmission events included in each weighing transmission information as the average transmission interval corresponding to each weighing transmission information;
[0015] The variance of the transmission start time corresponding to all transmission events included in each weighing transmission information is determined as a transmission distribution factor corresponding to each weighing transmission information;
[0016] According to the number of transmission events included in each weighing transmission information, and its corresponding average transmission time, average transmission interval and transmission distribution factor, the transmission density corresponding to each weighing transmission information is determined, wherein the average transmission time, average transmission interval and transmission distribution factor are all negatively correlated with the transmission density, and the number of transmission events is positively correlated with the transmission density.
[0017] In combination with the first aspect above, in a possible implementation, the formula corresponding to the transmission density corresponding to the weighing transmission information is: ;
[0018] in, It is i The transmission density corresponding to each weighing transmission information; i It is the sequence number of the weighing transmission information; is the normalization function; It is i The number of transmission events included in each weighing transmission message; It is an exponential function with a natural constant as base; It is i The transmission distribution factor corresponding to each weighing transmission information; It is i The average transmission time corresponding to each weighing transmission information; It is i The average transmission interval corresponding to each weighing transmission information.
[0019] In combination with the first aspect above, in a possible implementation manner, the retransmission events in the same type of retransmission event in the weighing transmission information are transmission events in which the content of the continuous transmissions is the same and there are transmission errors.
[0020] In combination with the first aspect above, in a possible implementation, determining the transmission stability corresponding to each weighing transmission information according to the transmission duration corresponding to each retransmission event of the same retransmission event included in each weighing transmission information includes:
[0021] Determine a transmission cost factor corresponding to each retransmission event included in each weighing transmission information according to the transmission duration corresponding to each retransmission event in each retransmission event included in each weighing transmission information;
[0022] The accumulated value of the transmission cost factors corresponding to all types of retransmission events included in each weighing transmission information is determined as the transmission stability corresponding to each weighing transmission information.
[0023] In combination with the first aspect above, in a possible implementation, determining the transmission cost factor corresponding to each retransmission event included in each weighing transmission information according to the transmission duration corresponding to each retransmission event in each retransmission event included in each weighing transmission information includes:
[0024] Determine the average of the transmission durations corresponding to all retransmission events in each retransmission event included in each weighing transmission information as the average retransmission duration corresponding to each retransmission event included in each weighing transmission information;
[0025] The average of the transmission durations corresponding to all transmission events included in each weighing transmission information is determined as the average transmission duration corresponding to each weighing transmission information;
[0026] According to the average retransmission duration corresponding to each retransmission event included in each weighing transmission information and the average transmission duration corresponding to each weighing transmission information, a transmission cost factor corresponding to each retransmission event included in each weighing transmission information is determined.
[0027] In combination with the first aspect above, in a possible implementation manner, a formula corresponding to a transmission cost factor corresponding to a retransmission event included in the weighing transmission information is:
[0028] ;
[0029] in, It is i The weighing transmission information includes j The transmission cost factor corresponding to the retransmission event; i It is the sequence number of the weighing transmission information; j It is i The type and sequence number of the retransmission event included in each weighing transmission message; is the normalization function; It is i The weighing transmission information includes j The number of retransmission events in the retransmission event; It is i The weighing transmission information includes j The average retransmission duration corresponding to the retransmission event; It is i The average transmission time corresponding to each weighing transmission information.
[0030] In combination with the first aspect above, in a possible implementation, determining the transmission priority corresponding to each target electronic scale according to the transmission density and transmission stability corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods includes:
[0031] According to the transmission density and transmission stability corresponding to each weighing transmission information, the initial priority corresponding to each weighing transmission information is determined, wherein the transmission density and transmission stability are both positively correlated with the initial priority;
[0032] According to the initial priority corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods, the transmission priority corresponding to each target electronic scale is determined, wherein the initial priority is positively correlated with the transmission priority.
[0033] In combination with the first aspect above, in a possible implementation, determining the initial priority corresponding to each weighing transmission information according to the transmission density and transmission stability corresponding to each weighing transmission information includes:
[0034] The product of the transmission density and the transmission stability corresponding to each weighing transmission information is determined as the initial priority corresponding to each weighing transmission information.
[0035] In combination with the first aspect above, in a possible implementation, determining the transmission priority corresponding to each target electronic scale according to the initial priority corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods includes:
[0036] The average of the initial priorities corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods is determined as the transmission priority corresponding to each target electronic scale.
[0037] The present invention has the following beneficial effects:
[0038] A portable intelligent electronic scale weighing data optimization transmission method of the present invention realizes the transmission of weighing information to be transmitted collected by different target electronic scales, solves the technical problem of poor effect of weighing data transmission, and improves the effect of weighing data transmission. Compared with setting the same transmission priority for different portable intelligent electronic scales, the present invention quantifies multiple indicators related to data transmission priority, such as transmission density and transmission stability, by presetting the weighing transmission information in the historical time period, thereby adaptively quantifying the transmission priority corresponding to different target electronic scales, thereby improving the effect of subsequent weighing data transmission. Secondly, when the transmission density corresponding to the weighing transmission information is greater, it often means that the target electronic scale that collects the weighing transmission information transmits the data more densely in the preset historical time period, often means that the target electronic scale that collects the weighing transmission information is used more frequently, often means that the target electronic scale that collects the weighing transmission information may need to transmit the data in the current time period. More dense, it often means that the memory of the target electronic scale that collects the weighing transmission information should not be occupied all the time, therefore, it is often necessary to set a larger transmission priority for the target electronic scale that collects the weighing transmission information. When the transmission stability corresponding to the weighing transmission information is greater, it often means that the target electronic scale that collects the weighing transmission information is more likely to transmit less erroneous data within the preset historical time period, which often means that the performance of the target electronic scale that collects the weighing transmission information is better, which often means that the target electronic scale that collects the weighing transmission information is more likely to transmit less erroneous data within the current time period. Therefore, it is often necessary to set a higher transmission priority for the target electronic scale that collects the weighing transmission information.
[0039] In a second aspect, the present invention provides a portable intelligent electronic scale weighing data optimization transmission system, the system comprising:
[0040] An information acquisition module, used to acquire the weighing transmission information of each target electronic scale in each preset historical time period, and the weighing information to be transmitted of each target electronic scale in the current time period;
[0041] A density determination module, used to determine the transmission density corresponding to each weighing transmission information according to the transmission duration corresponding to each transmission event included in each weighing transmission information, the time interval between adjacent transmission events and the number of transmission events;
[0042] A screening and determination module, used to screen out each retransmission event from each weighing transmission information, and determine the transmission stability corresponding to each weighing transmission information according to the transmission duration corresponding to each retransmission event of the same retransmission event included in each weighing transmission information;
[0043] A priority determination module, used to determine the transmission priority corresponding to each target electronic scale according to the transmission density and transmission stability corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods;
[0044] The information transmission module is used to transmit the weighing information to be transmitted of each target electronic scale within the current time period according to the transmission priority corresponding to each target electronic scale.
[0045] In a third aspect, a server is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the device executes the method in the first aspect or any possible implementation of the first aspect.
[0046] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0047] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A flowchart of a portable intelligent electronic scale weighing data optimization transmission method of the present invention;
[0050] Figure 2 A schematic diagram of a flow chart for determining the transmission density of the present invention;
[0051] Figure 3 A schematic diagram of the structure of a portable intelligent electronic scale weighing data optimization transmission system of the present invention;
[0052] Figure 4 The figure is a schematic diagram of the structure of a computer device of the present invention. DETAILED DESCRIPTION
[0053] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the technical solutions proposed by the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0054] Unless defined otherwise, 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 belongs.
[0055] refer to Figure 1 , shows the process of some embodiments of a portable intelligent electronic scale weighing data optimization transmission method according to the present invention. The portable intelligent electronic scale weighing data optimization transmission method comprises the following steps:
[0056] Step S1, obtaining the weighing transmission information of each target electronic scale in each preset historical time period, and the weighing information to be transmitted of each target electronic scale in the current time period.
[0057] Among them, the target electronic scale can be a portable intelligent electronic scale for collecting and transmitting weighing data. The weighing data can be data representing the weight of an object. The portable intelligent electronic scale can be an electronic scale that is easy to carry and used to collect and transmit weighing data. The preset historical time period can be a preset historical time period, and the end time of the latest preset historical time period corresponding to the embodiment of the present invention can be the start time of the current time period. The current time period can be a time period in which weighing data needs to be transmitted, and the end time of the current time period can be the current time. The weighing transmission information can be information related to the weighing data within the preset historical time period. For example, the weighing transmission information can include: a transmission event, a transmission duration corresponding to the transmission event, a transmission start time, a transmission end time, and a transmission memory address. The transmission event can represent the weighing data that needs to be transmitted each time. The weighing information to be transmitted can include the weighing data that needs to be transmitted within the current time period.
[0058] As an example, this step may include the following steps:
[0059] The first step is to obtain the weighing transmission information of each target electronic scale in each preset historical time period.
[0060] For example, any target electronic scale can be determined as a marked electronic scale, and any preset historical time period can be determined as a marked time period. During the marked time period, the weight of the object can be collected by the marked electronic scale, and the collected weight of each object can be recorded as weighing data. Each recorded weighing data can be transmitted to the computer terminal through the Modbus RTU (Modbus Remote Terminal Unit, serial communication) protocol. Since the weighing data needs to be transmitted to the computer terminal, each transmission of the weighing data can be regarded as a transmission event; the duration of each transmission of the weighing data can be regarded as the transmission duration corresponding to the transmission event; the start time and end time of each transmission of the weighing data can be respectively regarded as the transmission start time and transmission end time corresponding to the transmission event; the memory address of each weighing data to be transmitted can be regarded as the transmission memory address corresponding to the transmission event, and the transmission event obtained by the marked electronic scale during the marked time period and its corresponding transmission duration, transmission start time, transmission end time and transmission memory address constitute weighing transmission information.
[0061] The computer terminal may be a mobile phone or a computer.
[0062] It should be noted that, in general, there may be transmission errors in the weighing data during transmission. For data with transmission errors, it is often necessary to retransmit its original data so that the data finally received is correct data. Therefore, the weighing data with transmission errors is often repeatedly transmitted until the transmission is correct. For example, in the process of real-time data transmission using the Modbus RTU protocol on each portable smart electronic scale, the Modbus RTU protocol often adds a cyclic redundancy check (CRC) to the frame structure to detect whether there is an error in the data during transmission. If the CRC check of the acquired data fails, the portable smart electronic scale will be required to resend the data. Therefore, there are often more transmission events than weighing data. For example, if a weighing data has errors in the first two transmissions and is successfully transmitted for the third time, there can be three transmission events representing the weighing data.
[0063] The second step is to obtain the weighing information to be transmitted for each target electronic scale in the current time period.
[0064] For example, any target electronic scale can be determined as a marked electronic scale. In the current time period, the weight of objects can be collected through the marked electronic scale, and the collected weight of each object can be recorded as weighing data. The weighing data collected by the marked electronic scale in the current time period constitutes the weighing information to be transmitted.
[0065] Step S2, determining the transmission density corresponding to each weighing transmission information according to the transmission duration corresponding to each transmission event included in each weighing transmission information, the time interval between adjacent transmission events and the number of transmission events.
[0066] It should be noted that, when the transmission density corresponding to the weighing transmission information is greater, it often means that the data transmitted by the target electronic scale that collects the weighing transmission information within the preset historical time period is relatively denser, it often means that the target electronic scale that collects the weighing transmission information is used relatively more frequently, it often means that the data that the target electronic scale that collects the weighing transmission information needs to transmit within the current time period may be denser, it often means that the memory of the target electronic scale that collects the weighing transmission information should not be occupied all the time. Therefore, it is often necessary to set a higher transmission priority for the target electronic scale that collects the weighing transmission information.
[0067] As an example, the process of determining the transmission density corresponding to the weighing transmission information can be as follows: Figure 2 As shown, the following steps may be specifically included:
[0068] Step 201 : determining the average transmission duration corresponding to all transmission events included in each weighing transmission information as the average transmission duration corresponding to each weighing transmission information.
[0069] Step 202: Determine the average of the time intervals between all adjacent transmission events included in each weighing transmission information as the average transmission interval corresponding to each weighing transmission information.
[0070] Step 203: determine the variance of the transmission start time corresponding to all transmission events included in each weighing transmission information as a transmission distribution factor corresponding to each weighing transmission information.
[0071] Step 204: determine the transmission density corresponding to each weighing transmission information according to the number of transmission events included in each weighing transmission information, and the corresponding average transmission duration, average transmission interval and transmission distribution factor.
[0072] Among them, the average transmission duration, the average transmission interval and the transmission distribution factor can all be negatively correlated with the transmission density. The number of transmission events can be positively correlated with the transmission density.
[0073] For example, the formula for determining the transmission density corresponding to the weighing transmission information may be:
[0074] ;
[0075] in, It is i The transmission density corresponding to the weighing transmission information. iIt is the sequence number of the weighing transmission information. is a normalization function. It is i The number of transmission events included in each weighing transmission message. It is an exponential function with a natural constant as its base. It is i The transmission distribution factor corresponding to each weighing transmission information. It is i The average transmission time corresponding to each weighing transmission information. It is i The average transmission interval corresponding to each weighing transmission information.
[0076] It should be noted that when When the size is larger, it often indicates that the collection i The target electronic scale for weighing transmission information has relatively more weighing data transmitted in the preset historical time period, which often indicates that the collection of the first i The target electronic scale for weighing transmission information has a relatively dense transmission of weighing data within the preset historical time period. The smaller the time, the more likely it is that the collection i The more continuous the weighing data transmitted by the target electronic scale for weighing and transmitting information within the preset historical time period, the more frequent the transmission. The smaller the time, the more likely it is that the collection i The target electronic scale for weighing and transmitting information is relatively fast in transmitting weighing data within the preset historical time period, and the first i The target electronic scale for weighing transmission information has a relatively dense transmission of weighing data within the preset historical time period. When the size is larger, it often indicates that the collection i The more intensive the transmission of weighing data of the target electronic scale for weighing transmission information is within the preset historical time period, the more likely it is that the collection i The more frequently the target electronic scale is used, the less likely it is to occupy the first i The memory of the target electronic scale for the weighing transmission information is often needed to collect the first i The target electronic scale for the weighing transmission information is set with a higher transmission priority.
[0077] Step S3, each retransmission event is screened out from each weighing transmission information, and the transmission stability corresponding to each weighing transmission information is determined according to the transmission duration corresponding to each retransmission event of the same retransmission event included in each weighing transmission information.
[0078] Among them, the retransmission events in the same retransmission event in the weighing transmission information can be transmission events in which the content of continuous transmission is the same and there are transmission errors. Since data transmission errors are often retransmitted, the same retransmission event can also be regarded as a continuous event with the same transmission memory address. For example, if errors occur in the first two transmissions of a certain weighing data and the third transmission is successful, the weighing data is retransmitted, and the transmission event of transmitting the weighing data can be regarded as a retransmission event, and the transmission event representing the first transmission of the weighing data, the transmission event representing the second transmission of the weighing data, and the transmission event representing the third transmission of the weighing data constitute the same retransmission event.
[0079] It should be noted that, when the transmission stability corresponding to the weighing transmission information is greater, it often means that the target electronic scale that collects the weighing transmission information is more likely to transmit less erroneous data within the preset historical time period, which often means that the performance of the target electronic scale that collects the weighing transmission information is better, which often means that the target electronic scale that collects the weighing transmission information is more likely to transmit less erroneous data within the current time period. Therefore, it is often necessary to set a higher transmission priority for the target electronic scale that collects the weighing transmission information.
[0080] As an example, determining the transmission stability corresponding to each weighing transmission information may include the following steps:
[0081] The first step is to determine the transmission cost factor corresponding to each retransmission event included in each weighing transmission information according to the transmission duration corresponding to each retransmission event in each retransmission event included in each weighing transmission information, which may include the following sub-steps:
[0082] In the first sub-step, the average of the transmission durations corresponding to all retransmission events in each retransmission event included in each weighing transmission information is determined as the average retransmission duration corresponding to each retransmission event included in each weighing transmission information.
[0083] In the second sub-step, the average transmission duration corresponding to all transmission events included in each weighing transmission information is determined as the average transmission duration corresponding to each weighing transmission information.
[0084] The third sub-step is to determine the transmission cost factor corresponding to each retransmission event included in each weighing transmission information based on the average retransmission duration corresponding to each retransmission event included in each weighing transmission information and the average transmission duration corresponding to each weighing transmission information.
[0085] For example, the formula for determining the transmission cost factor corresponding to the retransmission event included in the weighing transmission information may be:
[0086] ;in, It isi The weighing transmission information includes j The transmission cost factor corresponding to the retransmission event. i It is the sequence number of the weighing transmission information. j It is i The weighing transmission information includes the type and sequence number of the retransmission event. is a normalization function. It is i The weighing transmission information includes j The number of retransmission events in this retransmission event. It is i The weighing transmission information includes j The average retransmission duration corresponding to the retransmission event, It is i The average transmission time corresponding to each weighing transmission information.
[0087] It should be noted that Can characterize the i The weighing transmission information includes j The average transmission time of each retransmission event. Can characterize the i The average transmission time of all transmission events included in the weighing transmission information. Can characterize the i The weighing transmission information includes j The average transmission time waste cost of the retransmission event is larger, and the larger the value is, the more likely it is that the j The longer the average transmission time of a retransmission event is than the average transmission time of the overall transmission event, the more likely it is that the i The more the target electronic scale that transmits the weighing information, the more likely it is that more transmission time will be wasted when a transmission error occurs. Can characterize the i The weighing transmission information includes j The overall transmission time waste cost of the retransmission event is larger, and the larger the value is, the more time is wasted in collecting the first i The more likely it is that a transmission error will cause more transmission time waste, which often means that it is more necessary to collect the first i The target electronic scale for weighing transmission information is set with a smaller transmission priority. When the size is larger, it often means that there is a greater need to collect i The target electronic scale for the weighing transmission information is set with a higher transmission priority.
[0088] In the second step, the accumulated value of the transmission cost factors corresponding to all types of retransmission events included in each weighing transmission information is determined as the transmission stability corresponding to each weighing transmission information.
[0089] It should be noted that the smaller the transmission stability corresponding to the weighing transmission information, the more likely it is that the target electronic scale that collects the weighing transmission information will have multiple retransmission events when a transmission error occurs, resulting in a lot of transmission time waste, which often means that it is more necessary to set a lower transmission priority for the target electronic scale that collects the weighing transmission information.
[0090] Step S4, determining the transmission priority corresponding to each target electronic scale according to the transmission density and transmission stability corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods.
[0091] As an example, this step may include the following steps:
[0092] In the first step, the initial priority corresponding to each weighing transmission information is determined according to the transmission density and transmission stability corresponding to each weighing transmission information.
[0093] Among them, both transmission density and transmission stability can be positively correlated with the initial priority.
[0094] For example, the product of the transmission density and the transmission stability corresponding to each weighing transmission information may be determined as the initial priority corresponding to each weighing transmission information.
[0095] In the second step, the transmission priority corresponding to each target electronic scale is determined according to the initial priority corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods.
[0096] Among them, the initial priority may be positively correlated with the transmission priority.
[0097] For example, the average of the initial priorities corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods may be determined as the transmission priority corresponding to each target electronic scale.
[0098] Step S5: transmitting the weighing information to be transmitted of each target electronic scale in the current time period according to the transmission priority corresponding to each target electronic scale.
[0099] As an example, all target electronic scales may be sorted in descending order according to their corresponding transmission priorities, and the weighing information to be transmitted of the target electronic scales in the current time period may be transmitted to the computer terminal in sequence according to the sorting order.
[0100] It should be noted that Modbus RTU is based on serial communication. Therefore, during the transmission process, the next data can only be transmitted after the previous data transmission is completed. Therefore, when the data transmission stability of a portable intelligent electronic scale is poor, that is, when its corresponding transmission stability is low, the data transmission overhead required is often relatively large, which may cause congestion in the communication channel. Therefore, all portable intelligent electronic scales are sorted in order from large to small according to the transmission priority. When transmitting the weighing data collected by each portable intelligent electronic scale in the current time period, the computer host device can poll each electronic scale in order from high to low priority to ensure that the electronic scale with high priority is accessed first, thereby avoiding the situation where the response time of some portable intelligent electronic scales is long, resulting in a decrease in the communication efficiency of the entire system.
[0101] Optionally, if the weighing information to be transmitted is used for random inspection, the weighing data included in the weighing information to be transmitted can be received by a computer terminal later. At this time, the weighing data included in the weighing information to be transmitted is often the weighing data of the sampled goods. The sampling inspection system can realize the networking function through the on-site wireless Internet, and automatically input the relevant information of the sampled goods into the record form after obtaining it by scanning the barcode, and automatically upload the weighing data obtained by the computer end to the record table, thereby forming a final inspection report. Then the inspection report is uploaded to the remote server or stored in the local computer.
[0102] refer to Figure 3 Based on the same inventive concept as the above method embodiment, the present invention provides a portable intelligent electronic scale weighing data optimization transmission system, the system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the above computer program is executed by the processor, the steps of implementing a portable intelligent electronic scale weighing data optimization transmission method may specifically include:
[0103] The information acquisition module 301 is used to acquire the weighing transmission information of each target electronic scale in each preset historical time period, and the weighing information to be transmitted of each target electronic scale in the current time period;
[0104] The density determination module 302 is used to determine the transmission density corresponding to each weighing transmission information according to the transmission duration corresponding to each transmission event included in each weighing transmission information, the time interval between adjacent transmission events and the number of transmission events;
[0105] The screening and determination module 303 is used to screen out each retransmission event from each weighing transmission information, and determine the transmission stability corresponding to each weighing transmission information according to the transmission duration corresponding to each retransmission event of the same retransmission event included in each weighing transmission information;
[0106] The priority determination module 304 is used to determine the transmission priority corresponding to each target electronic scale according to the transmission density and transmission stability corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods;
[0107] The information transmission module 305 is used to transmit the weighing information to be transmitted of each target electronic scale in the current time period according to the transmission priority corresponding to each target electronic scale.
[0108] Figure 4 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 4 As shown, the computer device 400 includes: a memory 401, a processor 402, and a computer program 403 stored in the memory 401 and running on the processor 402, wherein when the processor 402 executes the computer program 403, the computer device can execute any one of the portable intelligent electronic scale weighing data optimization transmission methods introduced above.
[0109] Based on the same inventive concept as the above method embodiment, the present invention provides a server, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the device executes any one of the above portable intelligent electronic scale weighing data optimization transmission methods.
[0110] Based on the same inventive concept as the above-mentioned method embodiment, the present invention provides a computer program product, which includes: computer program code, when the computer program code runs on a computer, enables the computer to execute any one of the above-mentioned portable intelligent electronic scale weighing data optimization transmission methods.
[0111] Based on the same inventive concept as the above-mentioned method embodiment, the present invention provides a computer-readable storage medium, which stores a computer program code. When the computer program code runs on a computer, the computer executes any one of the above-mentioned portable intelligent electronic scale weighing data optimization transmission methods.
[0112] In summary, compared with setting the same transmission priority for different portable smart electronic scales, the present invention quantifies multiple indicators related to data transmission priority, such as transmission density and transmission stability, by presetting the weighing transmission information within a historical time period, thereby adaptively quantifying the transmission priority corresponding to different target electronic scales, thereby improving the effect of subsequent transmission of weighing data.
[0113] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A portable intelligent electronic scale weighing data optimization transmission method, characterized in that: The following steps are involved: Obtaining the weighing transmission information of each target electronic scale in each preset historical time period, and the weighing information to be transmitted of each target electronic scale in the current time period; Determine the transmission density corresponding to each weighing transmission information according to the transmission duration corresponding to each transmission event included in each weighing transmission information, the time interval between adjacent transmission events and the number of transmission events; Each retransmission event is screened out from each weighing transmission information, and the transmission stability corresponding to each weighing transmission information is determined according to the transmission duration corresponding to each retransmission event of the same type included in each weighing transmission information; Determine the transmission priority corresponding to each target electronic scale according to the transmission density and transmission stability corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods; According to the transmission priority corresponding to each target electronic scale, the weighing information to be transmitted of each target electronic scale in the current time period is transmitted.
2. A portable intelligent electronic scale weighing data optimization transmission method according to claim 1, characterized in that: Determining the transmission density corresponding to each weighing transmission information according to the transmission duration corresponding to each transmission event included in each weighing transmission information, the time interval between adjacent transmission events, and the number of transmission events, includes: The average of the transmission durations corresponding to all transmission events included in each weighing transmission information is determined as the average transmission duration corresponding to each weighing transmission information; Determine the average of the time intervals between all adjacent transmission events included in each weighing transmission information as the average transmission interval corresponding to each weighing transmission information; The variance of the transmission start time corresponding to all transmission events included in each weighing transmission information is determined as a transmission distribution factor corresponding to each weighing transmission information; According to the number of transmission events included in each weighing transmission information, and its corresponding average transmission time, average transmission interval and transmission distribution factor, the transmission density corresponding to each weighing transmission information is determined, wherein the average transmission time, average transmission interval and transmission distribution factor are all negatively correlated with the transmission density, and the number of transmission events is positively correlated with the transmission density.
3. The method for optimizing the transmission of weighing data of a portable intelligent electronic scale according to claim 2, characterized in that: The formula corresponding to the transmission density of weighing transmission information is: ; in, It is i The transmission density corresponding to each weighing transmission information; i It is the sequence number of the weighing transmission information; is the normalization function; It is i The number of transmission events included in each weighing transmission message; It is an exponential function with a natural constant as base; It is i The transmission distribution factor corresponding to each weighing transmission information; It is i The average transmission time corresponding to each weighing transmission information; It is i The average transmission interval corresponding to each weighing transmission information.
4. The method for optimizing the transmission of weighing data of a portable intelligent electronic scale according to claim 1, characterized in that: The retransmission event of the same type of retransmission event in the weighing transmission information is a transmission event in which the content of the continuous transmission is the same and there is a transmission error.
5. The method for optimizing transmission of weighing data of a portable intelligent electronic scale according to claim 1, characterized in that: The step of determining the transmission stability corresponding to each weighing transmission information according to the transmission duration corresponding to each retransmission event in the same retransmission event included in each weighing transmission information comprises: Determine the transmission cost factor corresponding to each retransmission event included in each weighing transmission information according to the transmission duration corresponding to each retransmission event in each retransmission event included in each weighing transmission information; The accumulated value of the transmission cost factors corresponding to all types of retransmission events included in each weighing transmission information is determined as the transmission stability corresponding to each weighing transmission information.
6. A portable intelligent electronic scale weighing data optimization transmission method according to claim 5, characterized in that: The step of determining the transmission cost factor corresponding to each retransmission event included in each weighing transmission information according to the transmission duration corresponding to each retransmission event in each retransmission event included in each weighing transmission information comprises: Determine the average of the transmission durations corresponding to all retransmission events in each retransmission event included in each weighing transmission information as the average retransmission duration corresponding to each retransmission event included in each weighing transmission information; The average of the transmission durations corresponding to all transmission events included in each weighing transmission information is determined as the average transmission duration corresponding to each weighing transmission information; According to the average retransmission duration corresponding to each retransmission event included in each weighing transmission information and the average transmission duration corresponding to each weighing transmission information, a transmission cost factor corresponding to each retransmission event included in each weighing transmission information is determined.
7. A portable intelligent electronic scale weighing data optimization transmission method according to claim 6, characterized in that: The formula corresponding to the transmission cost factor corresponding to the retransmission event included in the weighing transmission information is: ; in, It is i The weighing transmission information includes j The transmission cost factor corresponding to the retransmission event; i It is the sequence number of the weighing transmission information; j It is i The type and sequence number of the retransmission event included in each weighing transmission message; is the normalization function; Yes, yes i The weighing transmission information includes j The number of retransmission events in the retransmission event; Yes, yes i The weighing transmission information includes j The average retransmission duration corresponding to the retransmission event; It is i The average transmission time corresponding to each weighing transmission information.
8. The method for optimizing transmission of weighing data of a portable intelligent electronic scale according to claim 1, characterized in that: The step of determining the transmission priority corresponding to each target electronic scale according to the transmission density and transmission stability corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods includes: According to the transmission density and transmission stability corresponding to each weighing transmission information, the initial priority corresponding to each weighing transmission information is determined, wherein the transmission density and transmission stability are both positively correlated with the initial priority; According to the initial priority corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods, the transmission priority corresponding to each target electronic scale is determined, wherein the initial priority is positively correlated with the transmission priority.
9. A portable intelligent electronic scale weighing data optimization transmission method according to claim 8, characterized in that: The step of determining the initial priority corresponding to each weighing transmission information according to the transmission density and transmission stability corresponding to each weighing transmission information comprises: The product of the transmission density and the transmission stability corresponding to each weighing transmission information is determined as the initial priority corresponding to each weighing transmission information.
10. A portable intelligent electronic scale weighing data optimization transmission method according to claim 8, characterized in that: The step of determining the transmission priority corresponding to each target electronic scale according to the initial priority corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods includes: The average of the initial priorities corresponding to the weighing transmission information of each target electronic scale in all preset historical time periods is determined as the transmission priority corresponding to each target electronic scale.
Citation Information
Patent Citations
Method for ensuring scale accuracy of multi-scale continuous weighing
CN108917904A
Networked electronic scale and network weighing system composed of multiple electronic scales
CN109141613A
