CN114608695A - Electronic scale reading system, method, medium, and apparatus - Google Patents

Electronic scale reading system, method, medium, and apparatus Download PDF

Info

Publication number
CN114608695A
CN114608695A CN202111465853.9A CN202111465853A CN114608695A CN 114608695 A CN114608695 A CN 114608695A CN 202111465853 A CN202111465853 A CN 202111465853A CN 114608695 A CN114608695 A CN 114608695A
Authority
CN
China
Prior art keywords
weighing
data
serial port
electronic scale
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111465853.9A
Other languages
Chinese (zh)
Other versions
CN114608695B (en
Inventor
黄崇
蒋静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Fuxing Huachuang Technology Co ltd
Original Assignee
Beijing Fuxing Huachuang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Fuxing Huachuang Technology Co ltd filed Critical Beijing Fuxing Huachuang Technology Co ltd
Priority to CN202111465853.9A priority Critical patent/CN114608695B/en
Publication of CN114608695A publication Critical patent/CN114608695A/en
Application granted granted Critical
Publication of CN114608695B publication Critical patent/CN114608695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01GWEIGHING
    • G01G23/00Auxiliary devices for weighing apparatus
    • G01G23/18Indicating devices, e.g. for remote indication; Recording devices; Scales, e.g. graduated
    • G01G23/36Indicating the weight by electrical means, e.g. using photoelectric cells
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application discloses system, method, medium and equipment for reading scale of electronic scale, belongs to the technical field of electronic scale weighing, and the system comprises: the interaction unit is used for interacting with a user, and comprises an electronic scale reading module and a serial port numbering module for selecting a target serial port; a weighing unit for weighing an object to be weighed, wherein the weighing unit includes: a graphical interface module; the serial port connection module is used for configuring a serial port when a weighing object is weighed; and the data format matching module is used for uniformly processing the data format of the weighing data acquired by the serial port connection module according to the pre-established data format template and returning the weighing data with uniform format to the interaction unit. When this application is weighed through the electronic scale, the selection of serial ports and the unified processing of data format adapt to different system versions, the electronic scale of different models, and adjustment and configuration are simple and convenient, realize quick accurate weighing.

Description

Electronic scale reading system, method, medium, and apparatus
Technical Field
The application relates to the technical field of electronic scale weighing, in particular to a system, a method, a medium and equipment for reading a scale by an electronic scale.
Background
In daily work, in some industries such as e-commerce and logistics industries, articles need to be weighed and weight reading data needs to be recorded, so that an application program capable of automatically reading an electronic scale in real time is needed, the current mainstream implementation mode mainly comprises a Net + Redis + Socket mode, the Net writes a console program, reads electronic scale interface data in real time, stores weight information into local Redis, writes a Socket server monitoring request, reads the Redis data, returns weight, and creates a Socket client. The method has higher complexity no matter from the technical use and realization process; or a serial port data reading program of the Bluetooth electronic scale is written by Python in a Python mode, and the read data of the electronic scale is read in real time. However, each client needs to be configured with a Python environment, and the configuration process is complicated due to the influence of the system version, the system environment and the like.
Disclosure of Invention
The application provides an electronic scale weighing system, an electronic scale weighing method, a medium and electronic scale weighing equipment, aiming at the problems that the existing electronic scale weighing method is influenced by system environment, the configuration and adjustment process is complicated, and the complexity is high in the prior art.
In one embodiment of the present application, there is provided an electronic scale reading system, including: the interactive unit is used for interacting with a user, and comprises an electronic scale reading module, a serial port numbering module and a display module, wherein the electronic scale reading module displays the weight of a weighed object to the user; a weighing unit for weighing an object to be weighed, wherein the weighing unit includes: the graphical interface module is used for developing a graphical interface and adapting to each interactive window in the interactive unit; the serial port connection module is used for configuring a serial port when a weighing object is weighed, wherein during weighing, a user selects a target serial port through the serial port numbering module, the serial port connection module is configured according to the determined target serial port, and the target serial port is opened to acquire weighing data of the weighing object; and the data format matching module is used for uniformly processing the data format of the weighing data acquired by the serial port connection module according to the pre-established data format template, returning the weighing data with uniform format to the interaction unit and displaying the weight of the weighing object to a user, wherein the data format comprises a data output format.
Optionally, in the serial port connection module, an instantiation operation of the serial port operation class object is performed in advance, a serial port parameter is created and assigned, wherein the serial port parameter includes a serial port baud rate and a stop bit.
Optionally, in the data format matching module, the data output format of the weighing data is processed in a positive sequence, so that the weighing data is output in a positive sequence.
Optionally, the weighing unit further comprises: and the Queue module is used for defining the data length of the weighing data, is connected with the data format matching module, receives the weighing data with unified data format output by the data format matching module, and transmits the weighing data to the interactive unit through the Queue according to a certain data length.
Optionally, the weighing unit further comprises: the data accuracy module is used for carrying out data accuracy processing on the weighing data, wherein if the fluctuation range of the weighing data exceeds a preset threshold value, the data reading is abnormal, and the failure of the data reading is prompted; and if the fluctuation range of the weighing data is within the preset threshold value, the data reading is normal, and the weighing data is output.
Optionally, the method further includes: and the serial port information reading module reads the weighing data acquired by the serial port connection module, converts the data stream of the weighing data into a character array and returns the character array to the interaction unit.
Optionally, the method further includes: and the network service module transmits the weighing data to the browser terminal through a network through a preset network transmission protocol to read the weight of the weighing object.
In one embodiment of the present application, a method for reading a scale by an electronic scale is provided, which includes: after the selection of a target serial port is carried out through a serial port numbering module in the graphical interface module, the configuration of the target serial port is carried out by utilizing a serial port connecting module when a weighing object is weighed, and the target serial port is opened to obtain the weighing data of the weighing object; the data format of the weighing data acquired by the serial port connection module is processed uniformly by the data format matching module through a pre-established data format template, and the weighing data with uniform format is returned to the interaction unit; and displaying the weight of the weighed object to a user according to the weighing data through an electronic scale reading unit in the interaction unit.
In one aspect of the present application, a computer-readable storage medium is provided, which stores computer instructions, wherein the computer instructions are operated to execute the electronic scale reading method in the second aspect.
In one aspect of the present application, a computer device is provided, which includes a processor and a memory, where the memory stores computer instructions, wherein: and the processor operates the computer instructions to execute the electronic scale reading method in the second scheme.
The beneficial effect of this application is: according to the electronic scale reading system, the electronic scale reading method, the electronic scale reading medium and the electronic scale reading equipment, when the electronic scale is used for weighing, the serial port is selected and the data format is uniformly processed, so that the electronic scale reading system is suitable for electronic scales of different system versions and different models, is simple and convenient to adjust and configure, and can quickly and accurately weigh.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 illustrates one embodiment of a scale reading system of the present application;
FIG. 2 illustrates one embodiment of an interactive unit in an electronic scale weighing system of the present application;
FIG. 3 illustrates an example of a scale reading system of the present application;
FIG. 4 illustrates one embodiment of a method of reading with an electronic scale of the present application;
fig. 5 shows an example of a method for reading with an electronic scale according to the present application.
Specific embodiments of the present application have been shown by way of example in the drawings and will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings (if any) are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of steps or elements is not necessarily limited to those elements explicitly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
In the prior art, some industries such as e-commerce and logistics industries need to weigh articles and record weight reading data, so that an application program capable of automatically reading electronic scales in real time is needed, currently, the mainstream implementation mode mainly includes a Net + Redis + Socket mode, Net writes a console program, reads electronic scale interface data in real time, stores weight information into local Redis, writes a Socket server monitoring request, reads the Redis data, returns weight, and creates a Websocket client. The method is high in complexity no matter from the technical use and implementation processes; or a serial port data reading program of the Bluetooth electronic scale is written by Python in a Python mode, and the read data of the electronic scale is read in real time. However, each client needs to be configured with a Python environment, and the configuration process is complicated due to the influence of the system version, the system environment and the like.
Aiming at the problems that the existing electronic scale weighing method is influenced by system environment, the configuration and adjustment process is complicated, and the complexity is high, the application provides an electronic scale reading system, a method, a medium and equipment, wherein the electronic scale reading system comprises: the interactive unit is used for interacting with a user, and comprises an electronic scale reading module, a serial port numbering module and a display module, wherein the electronic scale reading module displays the weight of a weighed object to the user; a weighing unit for weighing an object to be weighed, wherein the weighing unit includes: the graphical interface module is used for developing a graphical interface and adapting to each interactive window in the interactive unit; the serial port connection module is used for configuring a serial port when a weighing object is weighed, wherein during weighing, a user selects a target serial port through the serial port numbering module, the serial port connection module is configured according to the determined target serial port, and the target serial port is opened to acquire weighing data of the weighing object; and the data format matching module is used for uniformly processing the data format of the weighing data acquired by the serial port connection module according to a pre-established data format template, returning the weighing data with uniform format to the interaction unit and displaying the weight of the weighing object to a user, wherein the data format comprises a data output format.
According to the electronic scale reading system, the graphical interface module in the weighing unit performs windowing processing on the weighing process, and is convenient for performing corresponding weighing operations such as serial port selection; through the serial port connection module, serial ports selected by a user are configured and deployed, switching and selection among different serial ports are realized, and weighing data of an object are accurately monitored and read; the weighing data acquired by the target serial port is subjected to unified processing of data formats through the data format matching module, so that the electronic scale reading system is suitable for electronic scales of different models and various application scenes; finally, the weight of the weighed object is returned to the interaction unit and displayed to the user, communication with the user is achieved, the state of the weighing process is displayed to the user to be checked, and the use experience of the user is improved.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 shows an embodiment of an electronic scale reading system of the present application.
In the embodiment shown in fig. 1, the electronic scale reading system of the present application includes: the interactive unit 101 is used for interacting with a user, and comprises an electronic scale reading module, an electronic scale reading unit 1011 displays the weight of a weighed object to the user, and a serial port numbering module 1012 is used for displaying the available serial port number of the current electronic scale system to the user, so that the user can conveniently select the serial port.
In this embodiment, the interactive unit 101 is used for communicating with a user, and the weighing status of the electronic scale is fed back to the user through the interactive unit, so that the user can know the current status of the electronic scale and the weighing result of the electronic scale. The interactive unit comprises an electronic scale reading unit which feeds back a weighing result of the electronic scale on the weighing object to the user.
Optionally, fig. 2 shows an embodiment of an interaction unit in the electronic scale reading system of the present application.
In the embodiment shown in fig. 2, the interaction unit further comprises; and a start program module 1013 as a switch for controlling the weighing process of the whole electronic scale system, wherein the user can start or end the weighing process when necessary. A program run status module 1014 that primarily feeds back to the user the current run status of the electronic scale. The method comprises the steps of judging whether a weighing error exists in the weighing process of the electronic scale, judging whether a program runs smoothly, judging the electric quantity of a battery of the electronic scale and the like. And then realize that the user knows the grasp in real time to the electronic scale state, promote user experience, guarantee going on smoothly of weighing process simultaneously, the problem is in time handled.
In the embodiment shown in fig. 1, the electronic scale reading system of the present application includes: and the weighing unit 102 is used for weighing the objects to be weighed, wherein the weighing unit comprises a graphical interface module 1021, and the graphical interface module is used for developing a graphical interface and adapting to each interactive window in the interactive unit.
In the embodiment, the graphical interface module is adapted to each display window in the interactive unit, and serial port (COM) number selection, a start program button, a program running status bar, an electronic scale reading window, maximum minimization of the window, closing control and the like are realized. The graphical interface module utilizes JAVA JFrame to develop the graphical interface. Through the setting of the graphical interface module, each module in the interaction unit is windowed, so that the maximization, the minimization and the dragging control of each display window and the operation of hiding the display window in a taskbar can be realized, the tidiness of an electronic scale operation interface is realized, and the operation is convenient.
In the embodiment shown in fig. 1, in the electronic scale weighing system of the present application, the weighing unit 102 includes a serial port connection module 1022, which performs configuration of a serial port when weighing a weighing object, wherein, during weighing, a user presses a serial port selection button to select a serial port, and the serial port connection module performs configuration according to a selected target serial port and opens the target serial port to acquire weighing data of the weighing object.
In this embodiment, the serial port connection module mainly configures the weighing data transmission serial port. After a user determines a target serial port in a plurality of serial ports, the serial port connection module programs and opens the corresponding target serial port, initialization action of the serial port is carried out, and the electronic scale starts to monitor and read weighing data of a weighed object. Through the serial port connection module, a target serial port is selected from a plurality of serial ports in the process of weighing a weighed object by the electronic scale, and then the best serial port is used for obtaining weighing data, so that the adaptation of a weighing system of the electronic scale to different environments is improved; meanwhile, smooth progress of the weighing process and accuracy and effectiveness of weighing data are guaranteed, and use experience of users is improved.
Optionally, in the serial port connection module, an instantiation operation of the serial port operation class object is performed in advance, serial port parameters are created and assigned, wherein the serial port parameters include a serial port baud rate and a stop bit.
In this optional embodiment, when the serial port connection module performs normal operation, an instantiation operation of the serial port operation class object needs to be performed in advance. The instantiation operation of the serial port operation class object refers to that when the serial port is used, a corresponding serial port operation class (SerialPortUtils) needs to be declared before the serial port is used, and the instantiation value is just the declaration. And after the serial port is instantiated, correspondingly establishing serial port parameters and assigning values. The serial port parameters comprise a serial port baud rate and a stop bit. The serial port baud rate is a parameter for measuring the symbol transmission rate. Which indicates the number of symbols transmitted per second. Such as baud rate 9600 ═ 9600bps (bits/second); the stop bit is used to indicate the last bit of a single packet. Typical values are 1, 1.5 and 2 bits. Since the data is clocked over the transmission line and each device has its own clock, it is likely that a small asynchrony occurs between the two devices in the communication. The stop bit therefore not only represents the end of the transmission, but also provides the opportunity for the computer to correct the clock synchronization. And the smooth operation of the weighing process is ensured through the configuration of the serial port connection module and the assignment operation of the corresponding parameters.
Specifically, the serial port parameter further includes a checksum bit. Wherein, the data bit value is a parameter for measuring the actual data bit in communication. When a computer sends a packet, the actual data will not be 8 bits, with standard values of 5, 6, 7 and 8 bits. The specific arrangement of the data bits depends on the information to be transmitted by the electronic scale weighing system. In the technical scheme of the application, the data can be set to 8 bits.
In the embodiment shown in fig. 1, in the electronic scale reading system of the present application, the weighing unit 102 includes a data format matching module 1023, which performs uniform processing on the data format of the weighing data obtained by the serial port connection module according to a pre-established data format template, and returns the weighing data with uniform format to the interaction unit, so as to display the weight of the object to be weighed to the user, where the data format includes a data output format.
In this embodiment, because electronic scales on the market are of various types, most of them are suitable for only a single specific data format, and therefore, when the weighing system is adjusted, different system environments and different data formats of the electronic scales need to be adapted, which complicates the process. Consequently, in order to make the electronic scale of this application all read weighing system be suitable for different electronic scales, this application sets up data format matching module, carries out the unity of format to the weighing data of different formats, makes this application can be applied to the electronic scale of different models on the one hand, and on the other hand, through the unity of data format, the convenience is to weighing data's reading, and the processing procedure is simpler.
Optionally, in the data format matching module, the data output format of the weighing data is subjected to positive sequence processing, so that the weighing data is output in a positive sequence.
In this alternative embodiment, since the unification of the data formats includes positive sequence processing of the weighing data, the weighing data can be output in positive sequence, conforming to the habit of reading by the user, without any additional processing.
Specifically, because serial data output formats of electronic scales of different brands are different, for example, if the serial data output format of brand a is 85.0000, 85.0000, 85.0000, and the serial data output format of brand B is 0.5800,0.5800,0.5800, it can be understood that the serial data output format of brand a is separated by a ═ number and the data is output in a reverse order, the serial data output format of brand B is output in a "" and a positive order, a separator of the data format template of brand a can be set to be "═ number", whether the data order is a positive order or not can be set, and the brand B is the same as the same. And then, data processing can be carried out according to the selected data format configuration when data are read, if the serial port data are of the brand A, the data are separated and analyzed by a mark after the serial port data are read, and if the data sequence is not, the data are processed in sequence, and the brand B is treated in the same way. Thus the data in the queue is always in the positive order of what is commonly seen. And then data output processing can be carried out.
Optionally, the weighing unit further comprises: and the Queue module is used for defining the data length of the weighing data, is connected with the data format matching module, receives the weighing data with unified data format output by the Queue module, and transmits the weighing data to the interaction unit through the Queue according to a certain data length.
In this optional embodiment, the electronic scale reading system of the present application uses Queue for transmission of weighing data. When a Queue is used for data transmission, the length of the Queue is defined firstly when a program is instantiated. After declaring the serial port operation class, calling an init () initialization method of SerialPortUtils, reloading the method, and adding Queue parameters in the method so as to use the Queue during data processing. Reading data in real time during specific monitoring, judging if the length of the queue exceeds the specified length, according to the first-in first-out characteristic of the queue, firstly, using poll () to remove the data of the super-long part from the queue, and then adding add () into new data. The data transmission principle of the specific Queue is similar to that of the prior art, and details are not repeated in the application.
Optionally, the weighing unit further comprises: the data accuracy module is used for carrying out data accuracy processing on the weighing data, wherein if the fluctuation range of the weighing data exceeds a preset threshold value, the data reading is abnormal, and the failure of the data reading is prompted; and if the fluctuation range of the weighing data is within the preset threshold value, the data reading is normal, and the weighing data is output.
In this optional embodiment, in a real weighing scene, there is often a phenomenon that a salesman starts to weigh and read when a weighed object is not stably placed, so that a weighing result of the weighed object is inaccurate and a large error exists. Therefore, in the electronic scale weighing system, the data accuracy module is arranged, the fluctuation of the weighing data in the weighing process is detected, and when the fluctuation range of the weighing data exceeds the preset threshold value, the data reading is abnormal, so that a user is prompted that the current weighing process is unstable, the reading is inaccurate, and the re-measurement is carried out; and when the fluctuation range of the weighing data is within the preset threshold value, the data is read normally, and the weighing data is output. Through the setting of the data accuracy module, the weighing accuracy is guaranteed.
Optionally, the weighing unit further comprises: and the serial port information reading module reads the weighing data acquired by the serial port connection module, converts the data stream of the weighing data into a character array and returns the character array to the interaction unit.
In the optional embodiment, the serial port information reading module performs formatted conversion on the data transmitted by the serial port, converts the serial port data into character data, and displays the character data as a user through the interaction unit. The user experience is improved.
Optionally, the weighing unit further comprises: and the network service module transmits the weighing data to the browser terminal through a network through a preset network transmission protocol to read the weight of the weighed object.
In this optional embodiment, the electronic scale reading system of the present application is further provided with a network service module, and through the setting of the network service module, the electronic scale reading system of the present application supports HTTP request to return electronic scale reading, so that a user can read weighing information at a client of a network, thereby realizing separation of an operation end and an electronic scale, and being applicable to a scenario in which the electronic scale is separated from a display end, for example, a weighing scenario of a coal transport vehicle.
Fig. 3 shows an example of an electronic scale reading system of the present application.
In the example shown in fig. 3, the electronic scale reading system of the present application includes an interactive unit 101, wherein an electronic scale reading unit 1011, a serial number module 1012, a start program module 1013, and a program running state module 1014 are respectively disposed in the interactive unit 101. The weighing unit 102, wherein the weighing unit 102 is provided with a weighing unit including a graphical interface module 1021, a serial port connection module 1022, a data format matching module 1023, a Queue module 1024, a data accuracy module 1025, a serial port information reading module 1026 and a network service module 1027, and the operation and processing processes of the modules are as above, which is not described herein again.
When the electronic scale weighing system of this application was weighed through the electronic scale, the selection of serial ports and the unified processing of data format adapt to different system versions, the electronic scale of different models, and adjustment and configuration are simple and convenient, realize quick accurate weighing. The utility model provides a weighing system is weighing when carrying out the weighing process of electronic scale, and the corresponding unit module of calling realizes corresponding function according to the weighing process of difference, and then accomplishes weighing to article. It should be noted that the execution sequence of each unit module may be specifically designed according to the actual situation, and may be changed back and forth, which is not limited in this application.
Fig. 4 shows an embodiment of a method for reading with an electronic scale according to the present application.
In the embodiment shown in fig. 4, the electronic scale reading method of the present application includes: the process S401 is that after the serial port is selected through a serial port selection button in a graphical interface module, a serial port connection module is utilized to configure a target serial port when a weighing object is weighed, and the target serial port is opened to obtain weighing data of the weighing object; the process S402 is that the weighing data obtained by the serial port connection module is processed uniformly by the data format matching module and the pre-established data format template, and the weighing data with uniform format is returned to the interaction unit; and a process S403 of displaying the weight of the object to be weighed to the user according to the weighing data through the electronic scale reading unit in the interactive unit. According to the electronic scale reading method, when the electronic scale is used for weighing, the selection of the serial port and the unified processing of the data format adapt to electronic scales of different system versions and different models, the adjustment and the configuration are simple and convenient, and the quick and accurate weighing is realized.
Optionally, the electronic scale reading method of the present application further includes: and the setting process of the Queue module is utilized for defining the data length of the weighing data, wherein the Queue module is connected with the data format matching module, receives the weighing data with unified data format output by the data format matching module, and transmits the weighing data to the interactive unit through the Queue according to a certain data length.
Optionally, the electronic scale reading method of the present application further includes: the data processing process of the data accuracy module is used for carrying out data accuracy processing on the weighing data, wherein if the fluctuation range of the weighing data exceeds a preset threshold value, data reading is abnormal, and failure of data reading is prompted; and if the fluctuation range of the weighing data is within the preset threshold value, the data reading is normal, and the weighing data is output.
Optionally, the electronic scale reading method of the present application further includes: and transmitting the weighing data to the browser terminal through a network by utilizing the data transmission process of the network service module through a preset network transmission protocol, and reading the weight of the weighing object.
Optionally, the electronic scale reading method of the present application further includes: and the weighing data acquired by the serial port connection module is read by utilizing the data conversion process of the serial port information reading module, and the data stream of the weighing data is converted into a character array and returned to the interaction unit.
Fig. 5 shows an example of a method for reading with an electronic scale according to the present application.
The following describes the process of the electronic scale reading method according to the present application with reference to the example shown in fig. 5. As shown in fig. 5, when the electronic scale performs weighing, the user first selects a serial port (COM), and determines a serial port for transmitting weighing data by selecting a serial number corresponding to the serial port. Then starting to carry out the specific process of weighing. When weighing, whether can detect the serial ports at first for effectual serial ports, whether the serial ports can effectual transmission weigh data promptly, if the serial ports is invalid, then carry out the selection of serial ports again, if the serial ports is effective, then monitor and acquire weighing data of weighing the thing through the serial ports. After the weighing data are obtained, the data formats of the weighing data are unified through intelligent data format matching, and the adaptation of electronic scales with different models is realized. And reading the reading of the electronic scale, specifying the length and the format of data through a Queue, and carrying out accuracy processing on the data. And finally, feeding back a weighing result of the electronic scale to the network terminal equipment through HTTP service for a user to check.
According to the electronic scale reading method, when the electronic scale is used for weighing, the selection of the serial port and the unified processing of the data format adapt to electronic scales of different system versions and different models, the adjustment and the configuration are simple and convenient, and the quick and accurate weighing is realized.
In one embodiment of the present application, a computer-readable storage medium stores computer instructions, wherein the computer instructions are operable to perform the electronic scale reading method described in any one of the embodiments. Wherein the storage medium may be directly in hardware, in a software module executed by a processor, or in a combination of the two.
A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
The Processor may be a Central Processing Unit (CPU), other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), other Programmable logic devices, discrete Gate or transistor logic, discrete hardware components, or any combination thereof. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one embodiment of the present application, a computer device includes a processor and a memory, the memory storing computer instructions, wherein: the processor operates the computer instructions to perform the electronic scale reading method described in any of the embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are merely examples, which are not intended to limit the scope of the present disclosure, and all equivalent structural changes made by using the contents of the specification and the drawings, or any other related technical fields, are also included in the scope of the present disclosure.

Claims (10)

1. A scale reading system for an electronic scale, comprising:
the system comprises an interaction unit, a serial port numbering module and a display unit, wherein the interaction unit is used for interacting with a user and comprises an electronic scale reading module which displays the weight of a weighed object to the user;
a weighing unit for weighing the object to be weighed, wherein the weighing unit includes:
the graphical interface module is used for developing a graphical interface and adapting to each interactive window in the interactive unit;
the serial port connection module is used for configuring a serial port when the weighing object is weighed, wherein a user selects the target serial port through the serial port numbering module during weighing, the serial port connection module configures according to the determined target serial port, and the target serial port is opened to acquire the weighing data of the weighing object;
and the data format matching module is used for uniformly processing the data format of the weighing data acquired by the serial port connection module according to a pre-established data format template, returning the weighing data with uniform format to the interaction unit and displaying the weight of the weighing object to a user, wherein the data format comprises a data output format.
2. The electronic scale reading system according to claim 1, wherein in the serial port connection module, an instantiation operation of a serial port operation class object is performed in advance, serial port parameters are created and assigned, wherein the serial port parameters include a serial port baud rate and a stop bit.
3. The electronic scale weighing system according to claim 1, wherein in the data format matching module, the data output format of the weighing data is subjected to positive sequence processing so that the weighing data is output in positive sequence.
4. The electronic scale reading system according to claim 1, wherein the weighing unit further comprises:
and the Queue module is used for defining the data length of the weighing data, is connected with the data format matching module, receives the weighing data with unified data format output by the data format matching module, and transmits the weighing data to the interaction unit through the Queue according to a certain data length.
5. The electronic scale weighing system of claim 1, wherein the weighing unit further comprises:
a data accuracy module for performing data accuracy processing on the weighing data, wherein,
if the fluctuation range of the weighing data exceeds a preset threshold value, reading the data abnormally, and prompting that the data reading fails;
and if the fluctuation range of the weighing data is within the preset threshold value, reading the data normally, and outputting the weighing data.
6. The electronic scale weighing system of claim 1, further comprising:
and the serial port information reading module is used for reading the weighing data acquired by the serial port connection module, converting the data stream of the weighing data into a character array and returning the character array to the interaction unit.
7. The electronic scale weighing system of claim 1, further comprising:
and the network service module transmits the weighing data to a browser terminal through a network through a preset network transmission protocol to read the weight of the weighing object.
8. A method for reading a scale by an electronic scale is characterized by comprising the following steps:
after a target serial port is selected through a serial port numbering module in a graphical interface module, a serial port connection module is utilized to carry out configuration on the target serial port when the weighing object is weighed, and the target serial port is opened to obtain weighing data of the weighing object;
the weighing data format acquired by the serial port connection module is processed uniformly by a data format matching module through a pre-established data format template, and the weighing data with uniform format is returned to the interaction unit;
and displaying the weight of the object to be weighed to a user according to the weighing data through an electronic scale reading unit in the interactive unit.
9. A computer readable storage medium storing computer instructions, wherein the computer instructions are operable to perform the electronic scale reading method of claim 8.
10. A computer apparatus comprising a processor and a memory, the memory storing computer instructions, wherein: the processor operates the computer instructions to perform the electronic scale reading method of claim 8.
CN202111465853.9A 2021-12-03 2021-12-03 Electronic scale reading system, method, medium and equipment Active CN114608695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111465853.9A CN114608695B (en) 2021-12-03 2021-12-03 Electronic scale reading system, method, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111465853.9A CN114608695B (en) 2021-12-03 2021-12-03 Electronic scale reading system, method, medium and equipment

Publications (2)

Publication Number Publication Date
CN114608695A true CN114608695A (en) 2022-06-10
CN114608695B CN114608695B (en) 2024-01-19

Family

ID=81857865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111465853.9A Active CN114608695B (en) 2021-12-03 2021-12-03 Electronic scale reading system, method, medium and equipment

Country Status (1)

Country Link
CN (1) CN114608695B (en)

Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60101627A (en) * 1983-11-07 1985-06-05 Seiko Instr & Electronics Ltd Data input device
WO1996000377A1 (en) * 1994-06-24 1996-01-04 Peter Christen Weighing system with combinable electronic modules
CN2231792Y (en) * 1995-03-16 1996-07-24 温州丰华电子有限公司 Electronic digital weighing apparatus with pronunciation output function
CN2731418Y (en) * 2004-11-02 2005-10-05 北京欧普生科技开发有限公司 Electronic dynamic weighing railroad track scald integrative machine
CN101701843A (en) * 2009-11-13 2010-05-05 中国农业大学 Dynamic electronic scale for loader
CN201811779U (en) * 2010-09-07 2011-04-27 深圳市兰洋科技有限公司 Electronic scale
CA2715412A1 (en) * 2010-04-02 2011-10-02 Ovs, Inc. Electronic weighing system
CN202471204U (en) * 2011-12-20 2012-10-03 江苏宏事达电气制造有限公司 Tandem type dynamic/static intelligent weighing platform
CN102853888A (en) * 2012-09-12 2013-01-02 西南石油大学 Multifunctional high-precision weighing system based on virtual technology
CN203688055U (en) * 2014-01-21 2014-07-02 承德市五岳电子技术有限公司 Weighing instrument of dynamic rail weighter
CN204454306U (en) * 2015-02-05 2015-07-08 常州市常欣电子衡器有限公司 A kind of garbage grab bucket crane weighs management statistical system
CN105357077A (en) * 2015-11-24 2016-02-24 上海斐讯数据通信技术有限公司 Device and method for processing serial port data of multiple devices
CN106352959A (en) * 2016-08-31 2017-01-25 重庆钢铁集团电子有限责任公司 Long-distance concentrated automatic metering system and method adopting belt weighers in large region
CN106444609A (en) * 2016-10-27 2017-02-22 洛阳矿山机械工程设计研究院有限责任公司 Operational method of PLC real-time operating data recording storing system
CN106971061A (en) * 2017-03-08 2017-07-21 佛山科学技术学院 A kind of integral type body heath parameter full-automatic detection apparatus
CN107292083A (en) * 2017-05-08 2017-10-24 新乡医学院 Physical examination data gathering system and its work station of use
WO2017211253A1 (en) * 2016-06-06 2017-12-14 中兴通讯股份有限公司 Serial port communication method, control terminal and single board
CN109144919A (en) * 2018-09-07 2019-01-04 四川中电启明星信息技术有限公司 A kind of interface method and device
CN110260967A (en) * 2019-07-23 2019-09-20 厦门大学 A kind of high-volume weighing electronic scale that open source data-interface is provided
CN111307259A (en) * 2020-03-10 2020-06-19 畅捷通信息技术股份有限公司 Weighing apparatus, weighing method, weighing system, and computer-readable storage medium
CN210802651U (en) * 2019-12-18 2020-06-19 李信昌 Device of intelligent food intake monitoring electronic scale
CN211927056U (en) * 2020-05-19 2020-11-13 浙江鸿城科技有限责任公司 Remote serial port adapter and electronic wagon balance system for weighing
CN212871437U (en) * 2020-07-23 2021-04-02 湖南华星称重科技有限公司 Intelligent weighing terminal
CN113014309A (en) * 2021-02-23 2021-06-22 湖南斯北图科技有限公司 Low-power-consumption space-based Internet of things data acquisition terminal and acquisition method

Patent Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60101627A (en) * 1983-11-07 1985-06-05 Seiko Instr & Electronics Ltd Data input device
WO1996000377A1 (en) * 1994-06-24 1996-01-04 Peter Christen Weighing system with combinable electronic modules
CN2231792Y (en) * 1995-03-16 1996-07-24 温州丰华电子有限公司 Electronic digital weighing apparatus with pronunciation output function
CN2731418Y (en) * 2004-11-02 2005-10-05 北京欧普生科技开发有限公司 Electronic dynamic weighing railroad track scald integrative machine
CN101701843A (en) * 2009-11-13 2010-05-05 中国农业大学 Dynamic electronic scale for loader
CA2715412A1 (en) * 2010-04-02 2011-10-02 Ovs, Inc. Electronic weighing system
CN201811779U (en) * 2010-09-07 2011-04-27 深圳市兰洋科技有限公司 Electronic scale
CN202471204U (en) * 2011-12-20 2012-10-03 江苏宏事达电气制造有限公司 Tandem type dynamic/static intelligent weighing platform
CN102853888A (en) * 2012-09-12 2013-01-02 西南石油大学 Multifunctional high-precision weighing system based on virtual technology
CN203688055U (en) * 2014-01-21 2014-07-02 承德市五岳电子技术有限公司 Weighing instrument of dynamic rail weighter
CN204454306U (en) * 2015-02-05 2015-07-08 常州市常欣电子衡器有限公司 A kind of garbage grab bucket crane weighs management statistical system
CN105357077A (en) * 2015-11-24 2016-02-24 上海斐讯数据通信技术有限公司 Device and method for processing serial port data of multiple devices
WO2017211253A1 (en) * 2016-06-06 2017-12-14 中兴通讯股份有限公司 Serial port communication method, control terminal and single board
CN106352959A (en) * 2016-08-31 2017-01-25 重庆钢铁集团电子有限责任公司 Long-distance concentrated automatic metering system and method adopting belt weighers in large region
CN106444609A (en) * 2016-10-27 2017-02-22 洛阳矿山机械工程设计研究院有限责任公司 Operational method of PLC real-time operating data recording storing system
CN106971061A (en) * 2017-03-08 2017-07-21 佛山科学技术学院 A kind of integral type body heath parameter full-automatic detection apparatus
CN107292083A (en) * 2017-05-08 2017-10-24 新乡医学院 Physical examination data gathering system and its work station of use
CN109144919A (en) * 2018-09-07 2019-01-04 四川中电启明星信息技术有限公司 A kind of interface method and device
CN110260967A (en) * 2019-07-23 2019-09-20 厦门大学 A kind of high-volume weighing electronic scale that open source data-interface is provided
CN210802651U (en) * 2019-12-18 2020-06-19 李信昌 Device of intelligent food intake monitoring electronic scale
CN111307259A (en) * 2020-03-10 2020-06-19 畅捷通信息技术股份有限公司 Weighing apparatus, weighing method, weighing system, and computer-readable storage medium
CN211927056U (en) * 2020-05-19 2020-11-13 浙江鸿城科技有限责任公司 Remote serial port adapter and electronic wagon balance system for weighing
CN212871437U (en) * 2020-07-23 2021-04-02 湖南华星称重科技有限公司 Intelligent weighing terminal
CN113014309A (en) * 2021-02-23 2021-06-22 湖南斯北图科技有限公司 Low-power-consumption space-based Internet of things data acquisition terminal and acquisition method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
周鹏, 牛荣, 陈立平: "利用Delphi开发电子秤串行通讯程序", 塔里木农垦大学学报, no. 03 *
杨文珺: "溯源系统电子秤编程调试", 《物联网技术》, pages 37 - 39 *
金祥曙;杨洪扣;: "一种新型数字式电子桌面秤软件系统设计", 机械, no. 07 *

Also Published As

Publication number Publication date
CN114608695B (en) 2024-01-19

Similar Documents

Publication Publication Date Title
CN109491905A (en) Head end test method, apparatus and electronic equipment
CN108880897A (en) Acceptance method, device, computer equipment and the storage medium of server
CN107180090B (en) Reading punch card method, electronic equipment and computer storage media based on e-book
CN106796752A (en) Measurement apparatus and its control method, managing device and its control method and measuring system
CN112436972B (en) Data processing method, device, network equipment and computer readable storage medium
CN113672441B (en) Method and device for testing intelligent equipment
CN108375390A (en) Configurable data concentrated collection method, apparatus and equipment
CN109656633A (en) Instrument calibration method, device, system, terminal device and readable storage medium storing program for executing
CN109901842A (en) Application deployment method, apparatus, computer equipment and storage medium
CN109523236A (en) Mail generation method, device, computer equipment and storage medium
CN109086175A (en) A kind of board test method and device
CN105302556B (en) Realize the method and system and server unit calculated
CN107666414A (en) A kind of network performance optimizing method, system and computer-readable recording medium
CN114608695A (en) Electronic scale reading system, method, medium, and apparatus
CN104734900B (en) A kind of sending control method of communication protocol test
CN109905257A (en) The determination method and apparatus of bandwidth transmission capability
CN108271018A (en) A kind of space camera electronics emulation test system
CN107025294B (en) Information acquisition method and device
CN113032054B (en) Service execution method and device, storage medium and electronic device
CN109299195A (en) Data processing method, device and storage medium
CN107948877A (en) A kind of control method of microphone, system and microphone
CN114090074A (en) Method and device for configuring operating environment, storage medium and electronic device
CN103678054B (en) Test method and device used for BACnet equipment
CN113282622A (en) Information transmission method and apparatus, storage medium, and electronic apparatus
JP2008175599A (en) Weighing apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant