Method and system for automatically acquiring weighing value of balance

By combining the generation of polynomials and the wrong byte determination polynomials, the efficiency and accuracy problems of the intelligent optimization algorithm in the acquisition of balance weighing data are solved, and the rapid and accurate automatic acquisition of balance weighing values ​​is achieved.

CN119621003AActive Publication Date: 2025-03-14JIANGSU ENTRY-EXIT INSPECTION & QUARANTINE BUREAU IND PROD TESTING CENT
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510147584.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-03-14
Estimated Expiration
2045-02-11

AI Technical Summary

Technical Problem

In the prior art, when using intelligent optimization algorithms to obtain balance weighing data, there are problems such as slow convergence speed, many control variables, and complex algorithm termination criteria, which makes it difficult to quickly obtain weighing results in heavy weighing tasks.

Method used

By generating polynomials to calculate powers and functions, constructing incorrect bytes to determine the polynomials, determining whether there are incorrect bytes in the automatically acquired balance weighing value, avoiding the use of intelligent optimization algorithms, and realizing automatic acquisition of balance weighing value.

Benefits of technology

This method takes into account the efficiency and accuracy of automatic acquisition of balance weighing value data, avoiding the time consumption and complex control variables caused by intelligent optimization algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621003A_ABST
    Figure CN119621003A_ABST
Patent Text Reader

Abstract

The invention provides a balance weighing value automatic acquisition method and system, and belongs to the technical field of data processing. The method comprises the following steps: acquiring a group of weighing values transmitted by a balance, encoding the weighing values, calculating a power sum function based on an encoded generator polynomial, constructing an error byte judgment polynomial based on the power sum function, judging whether error bytes exist or not according to the error byte judgment polynomial, and if yes, judging whether the error bytes exist or not. And finally, whether the weighing value transmitted by the other group of balance needs to be read again is decided according to the judgment result. According to the method, whether error bytes exist in the automatically obtained balance weighing value or not is judged by utilizing the decomposable characteristics of the error byte judgment polynomial, so that the problems of low convergence speed, multiple control variables, complex algorithm termination criterion and the like caused by using an intelligent optimization algorithm in the prior art are avoided; and the efficiency and the accuracy of automatically acquiring the weighing value data of the balance are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data processing, and in particular relates to a method and system for automatically acquiring a balance weighing value. Background Art

[0002] As a key parameter, the weighing value of the balance plays a vital role in the calculation, evaluation and traceability of the test results of the weighed sample. In the laboratory testing of mineral products, it is often necessary to use an electronic balance to weigh a large number of mineral samples. For example, in the moisture detection of imported copper concentrate, multiple weighing work is required. Generally, a mineral sample is taken for every 500 tons and the mineral sample is individually tested for multiple moisture measurements. Taking a batch of 10,000 tons of copper concentrate as an example, 20 samples are required, and 2 samples are extracted from each mineral sample for moisture determination. A single moisture determination requires weighing and recording the mass of the sample pan, the mass of the sample pan and sample before drying, the mass of the sample pan and sample after drying, and at least one constant weight verification weighing, that is, the moisture determination of a single sample is weighed at least 4 times, and the whole batch needs to be weighed and recorded 160 times. In the traditional operation mode, the numerous weighing times bring great challenges and pressure to the inspector's manual recording. Each time the inspector records, he needs to repeatedly and carefully check whether the balance reading is consistent with the recorded value, which is time-consuming and labor-intensive, and it is also difficult to achieve later data traceability verification.

[0003] The prior art has disclosed a variety of automatic reading methods for balance weighing data. For example, the patent document with publication number CN106815428A uses genetic algorithms, particle swarm optimization algorithms, differential evolution algorithms, simulated plant growth algorithms, fruit fly algorithms and other intelligent optimization algorithms to optimize the independent variables of the balance component equation group to improve the quality of weighing data processing; the patent document with publication number CN115752666A uses a multi-strategy wolf pack algorithm to predict the dynamic weighing of tobacco leaves on an electronic balance through an ELM neural network with an improved wolf pack algorithm, thereby improving the problem that the ELM neural network is prone to fall into local optimality and improving the accuracy of dynamic weighing of tobacco leaves. The applicant has found out through searching that the existing automatic reading methods of balance data mostly rely on intelligent optimization algorithms. Intelligent optimization algorithms represented by the above-mentioned genetic algorithm, particle swarm optimization algorithm, differential evolution algorithm, simulated plant growth algorithm, fruit fly algorithm, wolf pack algorithm, etc., all have common problems such as slow convergence speed, many control variables, and complex algorithm termination criteria. When faced with heavy weighing tasks, intelligent optimization algorithms often consume a lot of time and it is difficult to quickly obtain weighing results. Therefore, how to strike a balance between the efficiency and accuracy of automatically obtaining balance weighing values ​​is a problem that needs to be considered. Summary of the invention

[0004] In order to solve the above-mentioned problems existing in the prior art, the present invention proposes a method and system for automatically acquiring balance weighing values, so as to solve the problems of slow convergence speed, many control variables and complex algorithm termination criteria when using intelligent optimization algorithms to obtain balance weighing data in the prior art, thereby taking into account the efficiency and accuracy of automatic acquisition of balance weighing value data.

[0005] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme: a method for automatically obtaining weighing values ​​of a balance, the method comprising the steps of: S1: obtaining a group of weighing values ​​transmitted by a balance; S2: encoding the weighing values ​​transmitted by the balance obtained in S1; S3: calculating a generating polynomial of the weighing values ​​transmitted by the encoded balance; S4: judging whether there is an error byte based on the generating polynomial calculated in S3; if there is, executing S5, if not, executing S6; S5: re-reading another group of weighing values ​​transmitted by the balance, and executing S2; S6: decoding the weighing values ​​transmitted by the balance after encoding in S2, and transmitting them to a data reading module, so as to automatically obtain the weighing values ​​transmitted by the balance.

[0006] Furthermore, the basic form of the generator polynomial in S3 is: ; Where GP(x) represents the generating polynomial, x represents the unknown quantity of the polynomial, r represents the length of the redundant bits of information, gp1, gp r-1 、gp r-2 Represents a binary number.

[0007] Furthermore, in said S4, based on the generator polynomial calculated in step S3, it is determined whether there is an error byte, specifically: S41: based on the root of the generator polynomial calculated in step S3, the power sum function is calculated: ; Where k represents the number of consecutive powers, S k represents a power sum function with k consecutive powers, α represents a primitive element of the GF domain, j0…j v-1 Indicates the bit to be determined whether there is an error byte, v represents the bit number and v≤k / 2, where k / 2 represents the number of error bytes. are the roots of the generating polynomial; S42: constructing an error byte determination polynomial based on the power sum function, and determining whether an error byte exists according to the error byte determination polynomial.

[0008] Furthermore, in S42, an error byte determination polynomial is constructed based on the power sum function, specifically: ; Where EL(x) represents the error byte determination polynomial, σ1…σv Indicates the error byte determination polynomial coefficient.

[0009] Furthermore, the error byte determination polynomial coefficient is solved according to the following formula: ; Where m represents the odd number of the power sum function, m = 1, 3, 5, ..., S1 represents a power sum function with 1 consecutive power, S2 represents a power sum function with 2 consecutive powers, S m represents a power sum function with m consecutive powers.

[0010] Further, in S42, it is determined whether an error byte exists according to the error byte determination polynomial. Specifically, if the error byte determination polynomial is an indecomposable polynomial, or the root of the error byte determination polynomial does not belong to the set of roots of the generating polynomial, then it indicates that there is no error byte. If the error byte determination polynomial is a decomposable polynomial and the root of the error byte determination polynomial belongs to the set of roots of the generating polynomial, then it indicates that there is an error byte.

[0011] According to another aspect of the present invention, there is also provided a system for automatically acquiring a balance weighing value, comprising a balance weighing value reading module, an error byte judgment module and a data reading module, wherein the input end of the balance weighing value reading module is connected to the data output end of the electronic balance, the output end of the balance weighing value reading module is connected to the input end of the error byte judgment module, and the output end of the error byte judgment module is connected to the input end of the data reading module; the electronic balance is connected to the balance weighing value reading module via an RS232 serial port and an RS9 data line. The system is used to implement the aforementioned automatic acquisition method for balance weighing values.

[0012] Compared with the prior art, the beneficial technical effect of the present invention is that an error byte determination polynomial is constructed by using a power sum function calculated by a generating polynomial, and based on the decomposable characteristics of the error byte determination polynomial, it is determined whether an automatically acquired balance weighing value has an error byte, thereby avoiding the problems of slow convergence speed, many control variables, and complex algorithm termination criteria brought about by the intelligent optimization algorithm in the prior art, and taking into account the efficiency and accuracy of automatic acquisition of balance weighing value data. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0014] Figure 1A flow chart of a method for automatically obtaining a balance weighing value provided in Embodiment 1 of the present invention; Figure 2 A simplified structural diagram of a system for automatically acquiring weighing values ​​of a balance provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0016] The following first describes the concepts involved in the present application in conjunction with the accompanying drawings. It should be noted that the following description of each concept is only to make the content of the present application easier to understand, and does not limit the scope of protection of the present application; at the same time, the embodiments and features in the embodiments of the present application can be combined with each other in the absence of conflict. The present application will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.

[0017] In conjunction with the instruction manual Figure 1 The present invention provides a method for automatically acquiring a balance weighing value, which specifically includes: Step S1: Acquire a set of weighing values ​​transmitted by the balance. After the interface mode of the balance is set to the data transmission mode and the setting is successful, the balance can continuously send data to the computer, and at this time, a set of weighing values ​​transmitted by the balance is acquired; the present invention adopts a METTLERTOLEDO PL6001E or ME4002E balance, both of which have an RS232 serial port, and the RS9 data line can be used to connect the balance to the computer. The reading of the balance weighing value data can be realized by writing program codes using appropriate programming languages ​​(Visual Basic, Visual C++, Delphi, Java) and related controls (MSComm, SPCOMM). Step S2: Encode the weighing value transmitted by the balance obtained in step S1. Step S3: Calculate the generating polynomial of the weighing value transmitted by the encoded balance; wherein the basic form of the generating polynomial is as follows: ; Where GP(x) represents the generating polynomial, x represents the unknown quantity of the polynomial, r represents the length of the redundant bits of information, gp1, gp r-1 、gp r-2 represents a binary code number, satisfying 2r≥mes+r+1, mes represents the information bit length. It can be understood that the above binary code number is a binary code of 0 or 1, and the binary code number can be 100110, for example.

[0018] Step S4: Based on the generator polynomial calculated in step S3, determine whether there is an error byte; if so, execute step S5; if not, execute step S6; the specific steps of determining whether there is an error byte are: Step S41: Based on the roots of the generator polynomial calculated in step S3, calculate the power sum function: ; Where k represents the number of consecutive powers, S k represents a power sum function with k consecutive powers, α represents a primitive element of the GF domain, j0…j v-1 Indicates the bit to be determined whether there is an error byte, v represents the bit number and v≤k / 2, where k / 2 represents the number of error bytes. are the roots of the generating polynomial; Step S42: constructing an error byte determination polynomial based on the power sum function, wherein the error byte determination polynomial is constructed in the following form: ; Where EL(x) represents the error byte determination polynomial, σ1…σ v Represents the error byte determination polynomial coefficient. The error byte determination polynomial coefficient is solved according to the following formula: ; Where m represents the odd number of the power sum function, m is an odd number, that is, m=1, 3, 5, etc., S1 represents a power sum function with 1 consecutive power, S2 represents a power sum function with 2 consecutive powers, S m represents a power sum function with m consecutive powers.

[0019] In step S42, it is determined whether there is an error byte based on the error byte determination polynomial. Specifically, if the error byte determination polynomial is an indecomposable polynomial, or the root of the error byte determination polynomial does not belong to the set of roots of the generating polynomial, it indicates that there is no error byte. If the error byte determination polynomial is a decomposable polynomial and the root of the error byte determination polynomial belongs to the set of roots of the generating polynomial, it indicates that there is an error byte. The above error byte may be caused by an abnormality in a storage unit or a data transmission channel in the computer. It should be noted that when there are error bytes in the transmitted balance weighing value data, the transmitted balance weighing value data is equivalent to a model in which a group of correct balance weighing value data and a group of noise balance weighing value data are superimposed. The error byte determination polynomial constructed only by the correct balance weighing value data in the GF field (finite field) can be decomposed, and the error byte determination polynomial can be expressed as the common multiple of the minimum polynomial of the roots of the generating polynomial. Therefore, the roots of the solved error byte determination polynomial must belong to the set of roots of the generating polynomial; and when there are error bytes, the equivalent noise data cannot be decomposed, or even if it can be decomposed, its corresponding roots do not belong to the set of roots of the generating polynomial. Therefore, by determining whether the error byte determination polynomial is decomposable and whether its roots belong to the set of roots of the generating polynomial, it is possible to determine whether there are error bytes in the transmitted balance weighing value data, without having to adopt the complex intelligent optimization algorithm in the prior art, thereby saving the time for detecting error bytes in the data and taking into account the efficiency and accuracy of automatic acquisition of balance weighing value data.

[0020] Step S5: re-read another set of weighing values ​​transmitted by the balance, and execute step S2; when there are erroneous bytes in the weighing value data of the balance, it is necessary to discard the set of data and re-read a new set of weighing values ​​transmitted by the balance to ensure the correctness of the data.

[0021] Step S6: Decode the weighing value transmitted by the balance after encoding in step S2, and use a decoding rule corresponding to the encoding rule to decode the weighing value data, such as CRC encoding and CRC decoding. Then transmit the decoded data to a data reading module to automatically obtain the weighing value transmitted by the balance.

[0022] As the instruction manual Figure 2As shown, the present invention also provides a system for automatically acquiring a balance weighing value, the system implements the method for automatically acquiring a balance weighing value as described above, the system for automatically acquiring a balance weighing value comprises a balance weighing value reading module, an error byte judgment module and a data reading module, the input end of the balance weighing value reading module is connected to the data output end of the electronic balance, the output end of the balance weighing value reading module is connected to the input end of the error byte judgment module, and the output end of the error byte judgment module is connected to the input end of the data reading module. In this embodiment, the balance weighing value reading module and the data reading module are implemented through a web page. The web page can control the connection and disconnection of the balance, the real-time display of the balance reading, the recording of the balance reading in the table, the dynamic increase and decrease of the record table, and the naming and export of the recorded data according to regulations; specifically, when the balance weighing value reading module determines that the balance serial port is successfully connected, it calls the readable of the port object in the web page program to obtain the data stream. At this time, the readable lock state is true, and the "reader = port.readable.getReader()" method is used to create a reader reader and use "{ value, done} = awaitreader.read()" to obtain binary data, and the conversion between binary data and strings is completed by connecting the serial port read stream and the textDecoder write stream through the data channel. The data reading module is used to trigger the "record" event of the page when the balance reading is stable, execute the custom "save(this)" method, and the this parameter carried refers to the "record" button object, and the page is obtained through "w = document.getElementById("show").innerHTML" The weight in the label, then capture the element of the weighing mass column of this row through the button object, use the "text(w)" method to set the text content of the element to w, and record the current time in the weighing time column.

[0023] The embodiments and / or implementation methods described above are only used to illustrate the preferred embodiments and / or implementation methods for realizing the technology of the present invention, and are not intended to limit the implementation methods of the technology of the present invention in any form. Any technical personnel in this field may make slight changes or modifications to other equivalent embodiments without departing from the scope of the technical means disclosed in the content of the present invention, but they should still be regarded as technologies or embodiments that are essentially the same as the present invention.

[0024] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and its core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression and the objective existence of infinite specific structures, ordinary technicians in this technical field can make several improvements, modifications or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the concept and technical solution of the invention to other occasions without improvement, should be regarded as the scope of protection of this application.

Claims

1. A method for automatically obtaining a balance weighing value, characterized in that: The specific steps include: S1: Get a set of weighing values ​​transmitted by a balance; S2: Encode the weighing value transmitted by the balance obtained by S1; S3: Calculate the generating polynomial of the weighing value transmitted by the encoded balance; S4: Based on the generator polynomial calculated in S3, determine whether there is an error byte; if so, execute S5; if not, execute S6; S5: Re-read the weighing values ​​transmitted by another set of balances and execute S2; S6: Decode the weighing value transmitted by the balance after being encoded in S2, and transmit it to the data reading module to automatically obtain the weighing value transmitted by the balance.

2. The method for automatically obtaining a balance weighing value according to claim 1, characterized in that: The basic form of the generator polynomial in S3 is: ; Where GP(x) represents the generating polynomial, x represents the unknown quantity of the polynomial, r represents the length of the redundant bits of information, gp1, gp r-1 、gp r-2 Represents a binary number.

3. A method for automatically obtaining a balance weighing value according to claim 2, characterized in that: In S4, based on the generator polynomial calculated in S3, it is determined whether there is an error byte, specifically: S41: Calculate the power and function based on the roots of the generator polynomial calculated in S3: ; Where k represents the number of consecutive powers, S k represents a power sum function with k consecutive powers, α represents a primitive element of the GF domain, j0…j v-1 Indicates the bit to be determined whether there is an error byte, v represents the bit number and v≤k / 2, where k / 2 represents the number of error bytes. are the roots of the generating polynomial; S42: constructing an error byte determination polynomial based on the power sum function, and determining whether an error byte exists according to the error byte determination polynomial.

4. A method for automatically obtaining a balance weighing value according to claim 3, characterized in that: In the S42, an error byte determination polynomial is constructed based on the power sum function, specifically: ; Where EL(x) represents the error byte determination polynomial, σ1…σ v Indicates the error byte determination polynomial coefficient.

5. A method for automatically obtaining a balance weighing value according to claim 4, characterized in that: The error byte determination polynomial coefficients are solved according to the following formula: ; Where m represents the odd number of the power sum function, m = 1, 3, 5, ..., S1 represents a power sum function with 1 consecutive power, S2 represents a power sum function with 2 consecutive powers, S m represents a power sum function with m consecutive powers.

6. A method for automatically obtaining a balance weighing value according to claim 5, characterized in that: In the S42, it is determined whether there is an error byte based on the error byte determination polynomial. Specifically, if the error byte determination polynomial is an indecomposable polynomial, or the root of the error byte determination polynomial does not belong to the set of roots of the generating polynomial, it indicates that there is no error byte. If the error byte determination polynomial is a decomposable polynomial and the root of the error byte determination polynomial belongs to the set of roots of the generating polynomial, it indicates that there is an error byte.

7. A system for automatically acquiring a balance weighing value, comprising a balance weighing value reading module, an error byte judgment module and a data reading module, wherein the input end of the balance weighing value reading module is connected to the data output end of an electronic balance, the output end of the balance weighing value reading module is connected to the input end of the error byte judgment module, and the output end of the error byte judgment module is connected to the input end of the data reading module; characterized in that: The automatic acquisition system for balance weighing values ​​is used to execute the automatic acquisition method for balance weighing values ​​as described in any one of claims 1 to 6 to automatically acquire balance weighing values.

8. The automatic acquisition system of balance weighing value according to claim 7, characterized in that: The electronic balance is connected to the balance weighing value reading module via an RS232 serial port and an RS9 data line.

Citation Information

Patent Citations

  • Method for processing wind-tunnel balance calibration data based on intelligent optimization algorithm

    CN106815428A

  • Tobacco leaf dynamic weighing method based on multi-strategy wolf pack algorithm ELM

    CN115752666A

  • Super forward error correction hardware decoding method and apparatus thereof

    CN102170327A

  • Image compression method and system based on CRC (Cyclic Redundancy Check) and medium

    CN115086684A

  • Fast and efficient decoder for low-distance RS and BCH codes

    CN119010924A