CN114608695B - Electronic scale reading system, method, medium and equipment - Google Patents

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

Info

Publication number
CN114608695B
CN114608695B CN202111465853.9A CN202111465853A CN114608695B CN 114608695 B CN114608695 B CN 114608695B CN 202111465853 A CN202111465853 A CN 202111465853A CN 114608695 B CN114608695 B CN 114608695B
Authority
CN
China
Prior art keywords
data
weighing
serial port
module
electronic scale
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.)
Active
Application number
CN202111465853.9A
Other languages
Chinese (zh)
Other versions
CN114608695A (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

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 electronic scale reads title system, method, medium and equipment, belongs to electronic scale and weighs technical field, and this system includes: 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 a weighing object, wherein the weighing unit comprises: a graphical interface module; the serial port connection module is used for configuring serial ports when weighing the weighing objects; 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 the uniform format to the interaction unit. 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 is suitable for different system versions, and is simple and convenient to adjust and configure, and quick and accurate weighing is realized.

Description

Electronic scale reading system, method, medium and equipment
Technical Field
The application relates to the technical field of electronic scale weighing, in particular to an electronic scale reading system, an electronic scale reading method, an electronic scale reading medium and electronic scale reading equipment.
Background
In daily work, some industries such as e-commerce and logistics industry need to weigh objects and record weight reading data, so an application program capable of automatically and real-timely reading an electronic scale is needed, and the current mainstream implementation mode mainly comprises a mode of Net+Redis+socket. This approach is relatively complex, both from the point of view of technology use and implementation; or by using a Python mode, programming a Bluetooth electronic scale serial port data reading program by using the Python, and reading the electronic scale reading data in real time. However, the Python environment needs to be configured for each client, and the configuration process is complicated due to the influence of the system version, the system environment and the like.
Disclosure of Invention
Aiming at the problems that the existing electronic scale weighing method is influenced by the system environment, the configuration and adjustment process is complicated and the complexity is high in the prior art, the application provides an electronic scale reading system, an electronic scale reading method, a medium and electronic scale reading equipment.
In one aspect of the present application, there is provided an electronic scale reading system, including: the interaction unit is used for interacting with a user, and comprises an electronic scale reading module, a serial port numbering module and a serial port numbering module, wherein the electronic scale reading module displays the weight of a weighed object to the user, and the serial port numbering module is used for selecting a target serial port; a weighing unit for weighing a weighing object, wherein the weighing unit comprises: the graphical interface module is used for developing a graphical interface and adapting each interactive window in the interactive unit; the serial port connection module is used for configuring a serial port when weighing the weighing object, wherein a user selects a target serial port through the serial port numbering module when weighing, and the serial port connection module is used for configuring according to the determined target serial port and starting the target serial port to acquire weighing data of the weighing object; 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.
Optionally, in the serial port connection module, performing an instantiation operation on the serial port operation class object in advance, and creating serial port parameters and performing assignment, where the serial port parameters include 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 subjected to positive sequence processing, so that the weighing data is output in positive sequence.
Optionally, the weighing unit further comprises: 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 which is output by the data format matching module and has uniform data format, and transmits the weighing data to the interaction 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 data reading failure is prompted; 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 comprises: 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.
Optionally, the method further comprises: and the network service module is used for transmitting weighing data to the browser terminal through a network by a preset network transmission protocol so as to read the weight of the weighing object.
In one technical scheme of the application, a method for reading an electronic scale is provided, which comprises the following steps: after the serial port numbering module in the graphical interface module is used for selecting a target serial port, the serial port connection module is used for configuring the target serial port when weighing the weighing object, and the target serial port is started for acquiring weighing data of the weighing object; the data format matching module is used for uniformly processing the data format of the weighing data acquired by the serial port connection module by utilizing a pre-established data format template, and returning the weighing data with uniform format 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, storing computer instructions, wherein the computer instructions are operable to perform the electronic scale reading method of aspect two.
In one aspect of the present application, there is provided a computer device comprising a processor and a memory, the memory storing computer instructions, wherein: the processor operates the computer instructions to execute the electronic scale reading method in the second scheme.
The beneficial effects of this application are: according to the electronic scale reading system, method, medium and 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 different system versions, and is simple and convenient to adjust and configure, and quick and accurate weighing is realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 illustrates one embodiment of an electronic scale reading system of the present application;
FIG. 2 illustrates one embodiment of an interactive unit in the electronic scale reading system of the present application;
FIG. 3 illustrates one example of an electronic scale reading system of the present application;
FIG. 4 illustrates one embodiment of a method of reading an electronic scale of the present application;
fig. 5 shows an example of the electronic scale reading method of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of 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 apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be capable of operation in sequences other than those illustrated or described herein, for example. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a sequence of steps or elements is not necessarily limited to those elements that are expressly listed or inherent to such product or apparatus, but may include other elements not expressly listed or inherent to such product or apparatus.
In the prior art, some industries such as electronic commerce and logistics industry need to weigh objects and record weight reading data, so an application program capable of automatically and real-timely reading an electronic scale is needed, and the current mainstream implementation mode mainly comprises a mode of Net+Redis+socket. This approach is relatively complex, both from the point of view of technology use and implementation; or by using a Python mode, programming a Bluetooth electronic scale serial port data reading program by using the Python, and reading the electronic scale reading data in real time. However, the Python environment needs to be configured for each client, 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 the system environment, the configuration and adjustment process is complicated and the complexity is high, the application provides an electronic scale reading system, an electronic scale reading method, a medium and equipment, wherein the electronic scale reading system comprises: the interaction unit is used for interacting with a user, and comprises an electronic scale reading module, a serial port numbering module and a serial port numbering module, wherein the electronic scale reading module displays the weight of a weighed object to the user, and the serial port numbering module is used for selecting a target serial port; a weighing unit for weighing a weighing object, wherein the weighing unit comprises: the graphical interface module is used for developing a graphical interface and adapting each interactive window in the interactive unit; the serial port connection module is used for configuring a serial port when weighing the weighing object, wherein a user selects a target serial port through the serial port numbering module when weighing, and the serial port connection module is used for configuring according to the determined target serial port and starting the target serial port to acquire weighing data of the weighing object; 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 is used for carrying out window processing in the weighing process and is convenient for carrying out corresponding weighing operations such as serial port selection; the serial port connection module is used for configuring and deploying serial ports selected by a user, so that 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 a data format through the data format matching module, so that the electronic scale reading system is applicable to electronic scales of different types and uses various application scenes; and finally, returning the weight of the weighing object to the interaction unit, displaying the weight of the weighing object to the user, realizing communication with the user, displaying the state of the weighing process to the user for viewing, and improving the use experience of the user.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
FIG. 1 illustrates one 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 interaction unit 101 is configured to interact with a user, where the interaction unit includes an electronic scale reading module, the electronic scale reading unit 1011 displays the weight of the weighing object to the user, and the serial number module 1012 is configured to display an available serial number of the current electronic scale system to the user, so as to facilitate the user to select the serial.
In this embodiment, the interaction unit 101 is configured to communicate with a user, and the weighing status of the electronic scale is fed back to the user through the interaction unit, so that the user knows the current status of the electronic scale and the weighing result of the electronic scale. The interaction unit comprises an electronic scale reading unit, and the electronic scale reading unit feeds the weighing result of the electronic scale on the weighing object back to the user.
Optionally, fig. 2 illustrates 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; the starting program module 1013 is used as a switch to control the weighing process of the whole electronic scale system, and when the weighing is started or ended as required, the user realizes the weighing through the starting program module. A program running status module 1014 that primarily feeds back the current running status of the electronic scale to the user. The method comprises the steps of judging whether a weighing error exists in the weighing process of the electronic scale, judging whether the program runs smoothly, and the electric quantity of a battery of the electronic scale. And the real-time understanding and grasp of the state of the electronic scale by the user are realized, the user experience is improved, the smooth proceeding of the weighing process is ensured, and the problems are timely processed.
In the embodiment shown in fig. 1, the electronic scale reading system of the present application includes: the weighing unit 102 is used for weighing objects, wherein the weighing unit comprises a graphical interface module 1021 and a graphical interface module, the graphical interface module is used for developing a graphical interface, and each interaction window in the interaction unit is adapted.
In this embodiment, the graphical interface module is adapted to each display window in the interaction unit, to implement serial port (COM) number selection, start program buttons, program running status bars, electronic scale reading windows, window maximum minimization, and closing control, etc. The graphical interface module develops a graphical interface by utilizing a JAVA JFrame. Through the arrangement of the graphical interface module, each module in the interaction unit is windowed, so that the operation of maximizing, minimizing, dragging and controlling each display window and hiding the display window in the task bar can be realized, the operation interface of the electronic scale is tidy, and the operation is convenient.
In the embodiment shown in fig. 1, in the electronic scale reading system of the present application, the weighing unit 102 includes a serial port connection module 1022, which performs serial port configuration when weighing a weighing object, where, during weighing, a user presses a serial port selection button to perform serial port selection, and the serial port connection module performs configuration according to a selected target serial port and opens the target serial port to perform acquisition of weighing data of the weighing object.
In this embodiment, the serial port connection module mainly performs the arrangement of 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 is used for starting a corresponding target serial port, carrying out serial port initialization action, and starting monitoring and reading weighing data of the electronic scale on a weighing object. In the process of weighing objects by the electronic scale, one target serial port is selected from a plurality of serial ports through the serial port connection module, so that weighing data are acquired by using the optimal serial port, and the adaptation of the electronic scale weighing system to different environments is improved; meanwhile, smooth proceeding of the weighing process and accuracy and effectiveness of weighing data are guaranteed, and user experience is improved.
Optionally, in the serial port connection module, performing an instantiation operation on the serial port operation class object in advance, and creating serial port parameters and performing assignment, where the serial port parameters include a serial port baud rate and a stop bit.
In this alternative embodiment, when the serial connection module performs normal operation, an instantiation operation of the serial operation class object needs to be performed in advance. The instantiation operation of the serial operation class object refers to that when the serial operation class object is used for a serial port, a corresponding serial operation class (serial port Utils) needs to be declared before the serial operation class object is used, and the instantiation value is the declaration. After the serial port is instantiated, serial port parameters are correspondingly created and assigned. The serial port parameter comprises serial port baud rate and stop bit. The serial port baud rate is a parameter for measuring the symbol transmission rate. Which represents the number of symbols transmitted per second. Such as baud rate 9600=9600 bps (bits/second); the stop bit is used to represent the last bit of a single packet. Typical values are 1, 1.5 and 2 bits. Since the data is clocked on the transmission line and each device has its own clock, a small out-of-sync between the two devices in the communication is likely to occur. The stop bit is thus not merely indicative of the end of the transmission, but provides an opportunity for the computer to correct clock synchronization. And the smooth proceeding of the weighing process is ensured through the configuration of the serial port connection module and the assignment operation of corresponding parameters.
Specifically, the serial port parameters also include test and data bits. Wherein the data bit value is a parameter that measures the actual data bit in the communication. When a computer sends a packet, the actual data will not be 8 bits, and the standard values are 5, 6, 7 and 8 bits. The specific setting of the data bits depends on the information to be transferred by the electronic scale reading 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 unified processing on the data format of the weighing data acquired by the serial port connection module according to a pre-established data format template, and returns the weighing data with the unified format to the interaction unit, and displays the weight of the weighing object to the user, where the data format includes a data output format.
In this embodiment, since electronic scales are of various types on the market, they are mostly suitable for only a single specific data format, and thus, when adjusting the weighing system, it is necessary to adapt the electronic scales to different system environments and different data formats, and the process is complicated. Therefore, in order to make the electronic scale of this application read all and call the system and be suitable for different electronic scales, this application sets up data format matching module, carries out the unification of format to the weighing data of different formats, on the one hand makes this application can be applied to the electronic scale of different models, on the other hand, through the unification of data format, makes things convenient for the reading of symmetry volume data, and 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 positive sequence.
In this alternative embodiment, because unification of the data formats includes positive-sequence processing of the weighing data, the weighing data is enabled to be output in positive sequence, conforming to the habit of the user reading, without the need for further processing.
Specifically, because the serial data output formats of different brands of electronic scales have differences, if the serial output format of the brand a is = 85.0000 = 85.0000 =85.0000, and the output format of the brand B is 0.5800,0.5800,0.5800, it can be understood that the serial data output format of the brand a is separated by "=" and the data is output in reverse order, the serial data output format of the brand B is output in "and in positive order, and the data format template separator of the brand a can be set to" = ", whether the data sequence is in positive order, and the brand B is the same. And when the data is read, the data processing can be carried out according to the selected data format configuration, if the data is A brand, after the serial data is read, the data is separated and analyzed according to the configuration by the number of '=', and if the data sequence is not, the data sequence processing is carried out, and the brand B is the same. The data in the queue is thus always in the normal order. The data output process can be performed later.
Optionally, the weighing unit further comprises: 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 which is output by the data format matching module and has uniform data format, and transmits the weighing data to the interaction unit through the Queue according to a certain data length.
In this alternative embodiment, the electronic scale reading system of the present application employs a Queue for the transmission of weighing data. When the Queue is used for data transmission, firstly, the length of the Queue is defined when a program is instantiated. The operation is finished in advance, after the serial port operation class is declared, an init () initialization method of the serial port Utils is called, the method is reloaded, and a Queue parameter is added in the method so as to use the Queue during data processing. And (3) reading data in real time in specific monitoring, judging that if the length of the specified queue is exceeded, firstly removing the data of the overlength part from the queue by poll () according to the first-in first-out characteristic of the queue, and then adding new data by add (). The data transmission principle of the specific Queue is similar to that of the prior art, and the description is omitted herein.
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 data reading failure is prompted; 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 alternative embodiment, in a real weighing scenario, there is often a phenomenon that a service person starts weighing and reading when the weighing object is not stable yet, so that the weighing result of the weighing object is inaccurate, and a large error exists. Therefore, in the electronic scale reading system, a data accuracy module is arranged, fluctuation of weighing data in the weighing process is detected, when the fluctuation range of the weighing data exceeds a preset threshold value, data reading is abnormal, a user is prompted that the current weighing process is unstable, reading is inaccurate, and re-measurement is carried out; and when the fluctuation range of the weighing data is within a preset threshold value, the data reading is normal, and the weighing data is output. Through the setting of data accuracy module, guarantee the accuracy of weighing.
Optionally, the weighing unit further comprises: 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.
In this alternative 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. And the use experience of the user is improved.
Optionally, the weighing unit further comprises: and the network service module is used for transmitting weighing data to the browser terminal through a network by a preset network transmission protocol so as to read the weight of the weighing 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 return electronic scale reading, and the user can read weighing information at the client of the network, so as to realize separation of the operation end and the electronic scale, and is applicable to the scene that the electronic scale and the display end are separately set, for example, the weighing scene of the coal transportation vehicle, etc.
Fig. 3 shows an example of the 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 interaction unit 101, where the interaction unit 101 is provided with an electronic scale reading unit 1011, a serial number module 1012, a start program module 1013, and a program running state module 1014. The weighing unit 102, wherein the weighing unit 102 is provided with a weighing unit including a graphic 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, wherein the operation and processing procedures of each module are as above, and are not described herein.
When the electronic scale reading system is used for weighing through the electronic scale, the serial port is selected and the data format is uniformly processed, so that the electronic scale reading system is suitable for different system versions, is simple and convenient to adjust and configure, and realizes quick and accurate weighing. When the electronic scale reading system is used for carrying out the weighing process of the electronic scale, corresponding unit modules are called according to different weighing processes to realize corresponding functions, and then the weighing of objects is completed. It should be noted that, the execution sequence of each unit module may be specifically designed according to the actual situation, and may be exchanged before and after, which is not specifically limited in this application.
Fig. 4 illustrates one embodiment of a method of reading an electronic scale of the present application.
In the embodiment shown in fig. 4, the electronic scale reading method of the present application includes: s401, after serial port selection is performed through a serial port selection button in a graphical interface module, a serial port connection module is utilized to perform configuration of a target serial port when weighing a measured object, and the target serial port is opened to acquire weighing data of the measured object; step S402, uniformly processing the data format of the weighing data acquired by the serial port connection module by utilizing a pre-established data format template through the data format matching module, and returning the weighing data with uniform format to the interaction unit; and a process S403, displaying the weight of the weighed object to the user according to the weighing data through an electronic scale reading unit in the interaction unit. When the electronic scale reading method is used for weighing through the electronic scale, the serial port is selected and the data format is processed uniformly, so that the electronic scale reading method is suitable for different system versions, is simple and convenient to adjust and configure, and realizes quick and accurate weighing.
Optionally, the electronic scale reading method of the present application further includes: and the method comprises the steps of utilizing the setting process of the Queue module to define the data length of weighing data, wherein the weighing data is connected with the data format matching module, receiving weighing data which is output by the weighing module and has uniform data format, and transmitting the weighing data to the interaction 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, the data reading is abnormal, and the data reading failure is prompted; 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 weighing data to the browser terminal through a network by utilizing a 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 data conversion process of the serial port information reading module is utilized to read the weighing data acquired by the serial port connection module, convert the data stream of the weighing data into a character array and return the character array to the interaction unit.
Fig. 5 shows an example of the electronic scale reading method of the present application.
The process of the electronic scale reading method of the present application will be described below with reference to the example shown in fig. 5. As shown in fig. 5, when weighing by the electronic scale, the user first selects a serial port (COM), and determines the serial port through which the weighing data is transmitted by selecting the serial number corresponding to the serial port. Then starting, and carrying out a specific weighing process. During weighing, whether the serial port is an effective serial port or not is detected firstly, namely whether the serial port can effectively transmit weighing data or not, if the serial port is ineffective, the serial port is selected again, and if the serial port is effective, the weighing data of the weighing object is monitored and acquired through the serial port. After weighing data are obtained, the data formats of the weighing data are unified through intelligent data format matching, and the adaptation to different types of electronic scales is realized. And then reading the electronic scale, designating the length and format of the data through the Queue, and carrying out accuracy processing on the data. And finally, feeding back the weighing result of the electronic scale to the network terminal equipment through HTTP service for the user to check.
When the electronic scale reading method is used for weighing through the electronic scale, the serial port is selected and the data format is processed uniformly, so that the electronic scale reading method is suitable for different system versions, is simple and convenient to adjust and configure, and realizes quick and accurate weighing.
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 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 (English: central Processing Unit; CPU; for short), or other general purpose processor, digital signal processor (English: digital Signal Processor; for short DSP), application specific integrated circuit (English: application Specific Integrated Circuit; ASIC; for short), field programmable gate array (English: field Programmable Gate Array; FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, etc. 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 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 apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing is only examples of the present application, and is not intended to limit the scope of the patent application, and all equivalent structural changes made by the specification and drawings of the present application, or direct or indirect application in other related technical fields, are included in the scope of the patent protection of the present application.

Claims (7)

1. An electronic scale reading system, comprising:
the system comprises an interaction unit, a serial number module and a target serial number module, wherein the interaction unit is used for interacting with a user, the interaction unit comprises an electronic scale reading module, the electronic scale reading module displays the weight of a weighed object to the user, and the serial number module is used for selecting the target serial;
a weighing unit to weigh the weighing object, wherein the weighing unit includes:
the graphical interface module is used for developing a graphical interface and adapting 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 when the weighing object is weighed, and the serial port connection module is used for configuring the serial port according to the determined target serial port and starting the target serial port to acquire weighing data of the weighing object;
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;
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;
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 which is output by the data format matching module and has unified data format, and transmits the weighing data to the interaction unit through the Queue according to the set data length;
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, the data reading is abnormal, and the data reading failure is prompted;
and if the fluctuation range of the weighing data is within the preset threshold, the data reading is normal, and the weighing data is output.
2. The electronic scale reading system of claim 1, wherein in the serial port connection module, an instantiation operation of a serial port operation class object is performed in advance, a serial port parameter is created, and an assignment is performed, wherein the serial port parameter includes a serial port baud rate and a stop bit.
3. The electronic scale reading system of claim 1, wherein in the data format matching module, the data output format of the weighing data is processed in a positive sequence such that the weighing data is output in a positive sequence.
4. The electronic scale reading system of claim 1, further comprising:
and the network service module is used for transmitting the weighing data to the browser terminal through a network by a preset network transmission protocol so as to read the weight of the weighing object.
5. An electronic scale reading method is characterized by comprising the following steps:
the method comprises the steps that interaction is conducted with a user through an interaction unit, wherein the interaction unit comprises an electronic scale reading module, the electronic scale reading module displays the weight of a weighing object to the user, and the serial port numbering module is used for selecting a target serial port;
weighing the weighing object through a weighing unit, wherein the weighing unit comprises: the graphical interface module is used for developing a graphical interface and adapting 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 when the weighing object is weighed, and the serial port connection module is used for configuring the serial port according to the determined target serial port and starting the target serial port to acquire weighing data of the weighing object; 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;
reading the weighing data acquired by the serial port connection module through a serial port information reading module, converting the data stream of the weighing data into a character array, and returning to the interaction unit;
defining the data length of the weighing data through a Queue module, wherein the weighing data is connected with the data format matching module, receives the weighing data which is output by the data format matching module and has uniform data format, and transmits the weighing data to the interaction unit through the Queue according to the set data length;
performing data accuracy processing on the weighing data through a data accuracy module, wherein if the fluctuation range of the weighing data exceeds a preset threshold value, data reading is abnormal, and data reading failure is prompted; and if the fluctuation range of the weighing data is within the preset threshold, the data reading is normal, and the weighing data is output.
6. A computer readable storage medium storing computer instructions, wherein the computer instructions are operative to perform the electronic scale reading method of claim 5.
7. A computer device comprising a processor and a memory, the memory storing computer instructions, wherein: the processor operates computer instructions to perform the electronic scale reading method of claim 5.
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 CN114608695A (en) 2022-06-10
CN114608695B true 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
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

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 (5)

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

Also Published As

Publication number Publication date
CN114608695A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
US5768148A (en) Man machine interface for power management control systems
EP3258337A1 (en) Intelligent control system and control method for detector, and pet device
US20030040897A1 (en) Man machine interface for power management control systems
WO2005079372A2 (en) System and method for associating a dlpdu received by an interface chip with a data measurement made by an external circuit
EP2490376A1 (en) System for testing roundtrip time between intelligent electronic devices
CN104836713A (en) Measurement and calibration method for vehicle electronic controller, device and system
JPH0469466B2 (en)
CN108375390A (en) Configurable data concentrated collection method, apparatus and equipment
CN114608695B (en) Electronic scale reading system, method, medium and equipment
CN108055167B (en) Application-oriented interface communication protocol modeling method and device
CN108271018B (en) Space camera electronics emulation test system
CN113411767A (en) Internet of vehicles data transmission system and method
CN209525389U (en) Electric energy metering device and ammeter equipment
WO2023147731A1 (en) Abnormal data processing method and apparatus, and electronic device
CN110533848A (en) Interception parallel port cash register print data and the method and system for pursuing and attacking additional information
CN113032054B (en) Service execution method and device, storage medium and electronic device
CN106373361A (en) Wireless collection and transmission device and method
CN109521268A (en) Electric energy metering device, ammeter equipment and configuration method
CN106487608B (en) The method and apparatus for measuring distal end timestamp unit
CN111104333A (en) Coverage rate test method, test device and computer readable storage medium
HU228069B1 (en) Method for the output of status data
CN103217942B (en) Retrieval of measurement values, diagnosis information or device parameters
CN104518819B (en) Twisted pair category identification method and twisted pair category identification equipment
CN116800654A (en) Monitoring system, method, equipment and storage medium for bus data transmission
CN116582772B (en) Electric energy data acquisition method, system, electronic equipment and medium

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