Structural parameter compression coding and decoding method and equipment of industrial robot
Through the three-level compression encoding method and two-dimensional barcode storage, the problem of easy loss of structural parameter storage of industrial robots is solved, efficient compression and permanent storage of structural parameters are achieved, and the flexibility and maintenance efficiency of the production line are improved.
Patent Information
- Application Number
- CN202510010968.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, the storage of structural parameters of industrial robots is prone to loss of data due to hardware failures, affecting production efficiency.
Three-level compression encoding methods are adopted, including symbol bit encoding, static Huffman tree encoding and mapping dictionary conversion, to generate two-dimensional barcodes and solidify them on the appearance of the robot, achieving efficient compression and permanent storage of structural parameters.
It realizes efficient compression and reliable storage of structural parameters, avoids data loss caused by hardware failure, and improves the flexibility and maintenance efficiency of the production line.
Smart Images

Figure CN120110402A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data compression and storage, and in particular to a method and device for compressing and encoding and decoding structural parameters of an industrial robot. Background Art
[0002] As the degree of industrial automation continues to increase, industrial robots are increasingly used in the manufacturing industry. The structural parameters of industrial robots directly affect their positioning accuracy, motion trajectory and working performance. In actual production applications, each industrial robot needs to be calibrated to obtain its unique structural parameters, which are crucial for the precise motion control of the robot.
[0003] At present, there are two main ways to store the structural parameters of industrial robots: one is to store the parameters in the supporting control cabinet, and the robot obtains the necessary structural parameters through communication with the control cabinet; the other is to install a storage device on the robot body, store the structural parameters directly on the robot body, and obtain the parameters by reading the device during operation. These methods have been widely used in practical applications and provide necessary parameter support for the normal operation of industrial robots.
[0004] However, storing parameters in a control cabinet or a main storage device faces the risk of data loss due to hardware failure. Once data loss occurs, recalibration will be required, affecting production efficiency. Summary of the invention
[0005] The present application provides a method and device for compressing and encoding structural parameters of an industrial robot, which are used to optimize the storage of structural parameters of the industrial robot and avoid the situation where production efficiency is affected due to difficulty in obtaining structural parameters.
[0006] In a first aspect, the present application provides a method for compressing and encoding structural parameters of an industrial robot, which is applied to a coding device. The method includes: obtaining original data of the industrial robot as a structural parameter; determining the positive and negative sign values of the original data, and converting the positive and negative sign values into sign bit codes to obtain primary compressed coded data; determining numerical elements of the primary compressed coded data, and generating a static Huffman tree based on the numerical elements; encoding the primary compressed coded data based on the static Huffman tree to obtain secondary compressed coded data; mapping and encoding the secondary compressed coded data based on a preset mapping dictionary to obtain coding result data; generating a two-dimensional output barcode based on the coding result data; and the two-dimensional output barcode is set on the appearance structure of the industrial robot.
[0007] In the above embodiment, the encoding device realizes efficient compression of the structural parameters of the industrial robot through three-level compression coding, namely initialization compression, optimal binary tree compression and dictionary mapping; data integrity is ensured by adding zero padding at the end; the compressed data is solidified on the robot appearance in the form of a two-dimensional barcode, which realizes permanent storage of parameters and avoids the risk of data loss due to hardware failure.
[0008] In combination with some embodiments of the first aspect, in some embodiments, the steps of determining the positive and negative sign values of the original data and converting the positive and negative sign values into sign bit codes to obtain compressed encoded data specifically include: converting the original data into parameter correction data according to preset reference data, and determining the positive and negative sign values, data values and numerical system of the parameter correction data; integrating all positive and negative sign values to obtain a symbol string; encoding the symbol string to obtain a symbol encoding result; converting the positive and negative sign values of the parameter correction data into a symbol encoding result to obtain compressed encoded data.
[0009] In the above embodiment, the encoding device converts the original data into a more compressible format by means of preset reference data conversion and sign bit separation, integrates the sign bit and establishes a mapping dictionary, which effectively reduces the data storage space and improves the data compression efficiency.
[0010] In combination with some embodiments of the first aspect, in some embodiments, the step of encoding a symbol string to obtain a symbol encoding result specifically includes: encoding the symbol string according to positive and negative values to obtain a binary code; converting the binary code into encoded data in the same base as the numerical base to obtain a symbol encoding result.
[0011] In the above embodiment, the encoding device uses binary code to replace the sign bit and performs base conversion, thereby achieving efficient compression of the symbol data, reducing storage space usage, and ensuring data integrity.
[0012] In combination with some embodiments of the first aspect, in some embodiments, the steps of mapping and encoding the secondary compressed encoded data based on a preset mapping dictionary to obtain the encoded result data specifically include: determining the number of data bits of the secondary compressed encoded data; parsing the preset mapping dictionary to determine the number of splitting bits and mapping rules for the mapping code; padding the last bit of the secondary compressed encoded data with zeros so that the number of data bits after padding with zeros can be divided by the number of splitting bits; taking the secondary compressed encoded data after padding with zeros as the standard data to be mapped, mapping and encoding the standard data to be mapped based on the mapping rules to obtain the encoded result data.
[0013] In the above embodiment, the encoding device processes incomplete data by filling the split bit number with zeros and records the number of filled zeros, thereby ensuring that the data can be completely mapped and improving the reliability and accuracy of data processing.
[0014] In combination with some embodiments of the first aspect, in some embodiments, after the step of padding the last bit of the secondary compressed encoded data with zeros so that the number of data bits after the zero padding can be divided by the splitting bit number, the method also includes: recording the number of zero padding in the last bit; adding the number of zero padding to the last bit of the encoded result data.
[0015] In the above embodiment, the encoding device adds zero-padding number information at the end of the encoding result to provide necessary parameters for subsequent decoding, thereby ensuring the integrity and accuracy of data restoration.
[0016] In the second aspect, the present application provides a structural parameter compression encoding method for an industrial robot, which is applied to a decoding device, and the method includes: scanning a two-dimensional output barcode to obtain encoding result data; decoding the encoding result data based on a preset mapping dictionary to obtain secondary compressed encoding data; decoding the secondary compressed encoding data based on a static Huffman tree to obtain primary compressed encoding data; extracting preset position data of the primary compressed encoding data, and generating a symbol string based on the preset position data; integrating the symbol string into the primary compressed encoding data without the preset position data to obtain the original data; and determining the structural parameters of the industrial robot based on the original data.
[0017] In the above embodiment, the decoding device restores the original data by decoding step by step, and combines the extraction of preset position data and the integration of symbol strings to ensure the accuracy and completeness of data restoration.
[0018] In combination with some embodiments of the second aspect, in some embodiments, the step of decoding the encoded result data based on a preset mapping dictionary to obtain secondary compressed encoded data specifically includes: removing the last data of the encoded result data, and determining the last numerical value corresponding to the last data; decoding the encoded result data after removing the last data based on a preset mapping dictionary to obtain a decoding result; removing the zero value of the number of last numerical values in the last digit of the decoding result to obtain secondary compressed encoded data.
[0019] In the above embodiment, the decoding device achieves accurate restoration of the encoded data by removing the last digit of the data and performing decoding based on the last digit value, thereby ensuring the integrity and accuracy of the structural parameters.
[0020] In a third aspect, an embodiment of the present application provides a coding device or a decoding device, which comprises: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the coding device or the decoding device respectively executes the method described in the first aspect, the second aspect, and any possible implementation method of the first aspect and the second aspect.
[0021] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions. When the above-mentioned computer program product is run on an encoding device or a decoding device, the above-mentioned encoding device or decoding device respectively executes the method described in the first aspect, the second aspect, and any possible implementation method of the first aspect and the second aspect.
[0022] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions. When the above instructions are executed on an encoding device or a decoding device, the above encoding device or the decoding device executes the method described in the first aspect, the second aspect, and any possible implementation method of the first aspect and the second aspect.
[0023] It can be understood that the encoding device or decoding device provided in the third aspect, the computer program product provided in the fourth aspect, and the computer storage medium provided in the fifth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. Due to the use of three-level compression coding and two-dimensional barcode storage, the structural parameters of the industrial robot are initialized and compressed, optimally compressed in the binary tree and dictionary mapped, and solidified on the robot appearance, so that the efficient compression and reliable storage of the structural parameters are achieved, which effectively solves the problem of easy data loss and inconvenient equipment management caused by relying on control cabinets or body storage devices in the existing technology, and then realizes the permanent preservation and convenient acquisition of structural parameters, which improves the use flexibility and maintenance efficiency of industrial robots.
[0025] 2. Since the splitting bit processing and zero-filling mechanism based on the mapping dictionary is adopted and the data is encoded in combination with the mapping rules, more efficient compression coding is achieved while ensuring data integrity, effectively solving the problem of low compression coding efficiency and possible incomplete data in the existing technology, and then realizing efficient compression storage and accurate mapping of structural parameters, improving data compression efficiency and reliability.
[0026] 3. Since the method of obtaining data from the two-dimensional barcode and decoding and restoring it step by step through mapping dictionary decoding, static Huffman tree decoding, etc., combined with preset position data extraction and symbol string integration, the accuracy and completeness of the structural parameter restoration process are ensured, and the problem of complex parameter acquisition and prone to data errors in the existing technology is effectively solved, thereby realizing the rapid and accurate restoration of structural parameters and improving the debugging and maintenance efficiency of industrial robots. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flow chart of a method for compressing and encoding structural parameters of an industrial robot in an embodiment of the present application; Figure 2 is another flow chart of the structural parameter compression encoding method of the industrial robot in the embodiment of the present application; Figure 3 It is a flow chart of a structural parameter decoding method of an industrial robot in an embodiment of the present application; Figure 4 It is a schematic diagram of the structure of a physical device of an encoding device or a decoding device in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more of the listed items.
[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0030] For ease of understanding, the application scenarios of the embodiments of the present application are introduced below.
[0031] A large automobile manufacturing plant has hundreds of industrial robots for body welding, spraying and other processes. Each robot needs to be calibrated by a laser tracker to obtain its initial structural parameters. These parameters are stored in their respective control cabinets. One day, the control cabinets of 10 robots on a production line were damaged due to a circuit failure, resulting in the loss of structural parameters. The factory had to recalibrate, a process that took 3 days, causing the production line to stop and causing huge economic losses. In addition, since robots and control cabinets are used in pairs and cannot be flexibly deployed, robots are often idle when the production line is adjusted, affecting production efficiency.
[0032] In the related art, the compressed storage of industrial robot structural parameters can be achieved by using traditional Huffman coding and LZ compression algorithms. These methods can achieve good compression effects when the data has obvious regularity, but for data with strong randomness such as industrial robot structural parameters, the compression effect is not ideal, and the complete compression dictionary needs to be stored in the control cabinet, which increases the storage burden. The following introduces the scenario of using the industrial robot structural parameter compression coding method in the related art.
[0033] To solve the parameter storage problem, a factory adopted the solution of installing an external storage device on the robot body. They equipped each robot with an industrial-grade USB flash drive to store the structural parameters. However, in actual use, due to the harsh industrial environment, the storage device is often affected by strong electromagnetic interference and mechanical vibration, resulting in data corruption. At the same time, additional reading equipment is required when reading parameters, which increases the cost of equipment. What's more serious is that once the USB flash drive interface or reading device fails, the parameters cannot be obtained and recalibration is still required, which fails to fundamentally solve the problem.
[0034] The structural parameter compression coding method of the industrial robot in the embodiment of the present application is adopted, by first separating the data into a sign bit and a value bit, performing special compression on the sign bit, then using a static Huffman tree for value compression, and finally performing a mapping dictionary conversion, to achieve efficient data compression, which not only significantly reduces the data storage space, but also ensures the integrity and reliability of the data. The following introduces the scenario in which the structural parameter compression coding method of the industrial robot in the present application is used.
[0035] After adopting this solution, the factory carried out parameter compression encoding processing on the 50 newly introduced robots. First, the structural parameters of each robot were obtained, and the amount of data was reduced to 2 / 5 of the original through three-level compression. Then a QR code was generated and laser etched in a conspicuous position on the robot body. When the production line needs to be adjusted, just scan the QR code with an ordinary code scanning device to quickly obtain the robot parameters and realize the free matching of the robot and the control cabinet. Even if the control cabinet fails, it can be restored to normal operation by scanning the code immediately after replacing the new cabinet, without recalibration, which greatly improves the flexibility and reliability of the production line.
[0036] It can be seen that the parameter compression coding and QR code storage solution in the embodiment of the present application can not only realize the efficient compression of structural parameters, but also effectively solve the problem of parameter storage and acquisition, thereby realizing the flexible configuration and rapid deployment of industrial robots and control cabinets.
[0037] For ease of understanding, the following describes the process of the structural parameter compression encoding method of the industrial robot provided by this implementation in combination with the above scenario. Figure 1, which is a flow chart of the structural parameter compression encoding method of an industrial robot in an embodiment of the present application.
[0038] S101. Acquire original data of the industrial robot as structural parameters.
[0039] Among them, industrial robots include programmable multi-joint mechanical devices for automatically performing work; structural parameters refer to key parameters that affect the positioning accuracy and motion trajectory of industrial robots, including connecting rod length parameters and transmission ratio parameters; raw data are used to represent the initial structural parameter values obtained by the industrial robot during factory calibration, and are usually stored in decimal form.
[0040] The encoding device performs this step when it needs to obtain the structural parameters of the industrial robot. Specifically, the encoding device obtains all structural parameter values including the connecting rod length L1-L6 and the transmission ratio Drive1-Drive6 by reading the factory calibration data file of the robot. These parameter values are recorded in decimal form, accurate to 4 decimal places.
[0041] In some embodiments, the raw data of the structural parameters of the industrial robot can be obtained in a variety of ways: optionally, the industrial robot control cabinet is connected via serial communication to read the structural parameter values stored therein; the values in the parameter file are directly parsed; the read data is sorted according to a preset format. Optionally, the robot management system is accessed through a network interface; the serial number of the target robot is retrieved; and the corresponding structural parameter data is queried according to the serial number. It is understandable that other methods can also be used to obtain the raw data of the structural parameters of the industrial robot, which are not limited here.
[0042] S102, determining the positive and negative sign values of the original data, and converting the positive and negative sign values into sign bit codes to obtain primary compressed coded data.
[0043] Among them, the positive and negative sign value of the original data refers to the positive and negative sign of the difference obtained by subtracting the structural parameter value from the preset reference value; the sign bit encoding represents the encoding method using binary digits "1" and "0" to represent the positive sign "+" and the negative sign "-" respectively; the once compressed encoded data is used to represent the data format after sign bit compression, which includes the numerical part and the compressed sign information.
[0044] The encoding device performs this step after obtaining the original data. Specifically, the encoding device first performs a difference operation between the original data L1-L6, Drive1-Drive6 and the preset reference data to obtain the structural parameter correction data; then extracts all positive and negative symbols in the correction data and integrates them into a symbol string; then replaces the "+" in the symbol string with "1" and the "-" with "0" to form a 6-bit binary code; finally, the code is converted into a two-digit decimal number and added to the end of the original data.
[0045] In some embodiments, the compression encoding of the sign bit can be implemented in a variety of ways: optionally, constructing a sign bit mapping table; replacing the sign bit with a corresponding binary value; performing fixed-length truncation and zero padding on the binary sequence. Optionally, counting the frequency of occurrence of the sign bit; establishing a sign bit Huffman tree; generating a variable length code based on the tree structure. It is understandable that other methods can also be used to implement the compression encoding conversion of the sign bit, which is not limited here.
[0046] S103: Determine the numerical elements of the compressed coded data, and generate a static Huffman tree based on the numerical elements.
[0047] Among them, numerical elements refer to all possible numbers (0-9) that appear in the compressed encoded data at one time; the static Huffman tree represents a binary tree structure built based on the probability of occurrence of numerical elements, which is used to achieve lossless compression of data; the generation process is used to represent the calculation process of constructing the optimal binary tree.
[0048] The encoding device performs this step after obtaining the compressed coded data. Specifically, the encoding device first counts all possible digital elements (0-9) in the compressed coded data; then, assuming that the probability of occurrence of each numerical element is equal, a static Huffman tree is constructed according to the optimal binary tree replacement method; finally, a corresponding binary code is assigned to each numerical element to establish a compression dictionary.
[0049] It should be noted that a coding model can be constructed based on a static Huffman tree. In the model training phase, the coding model is trained based on the probability distribution of the occurrence of numerical elements by inputting the numerical data of the structural parameters of the industrial robot (digits from 0 to 9). In this scheme, it is assumed that the probability of occurrence of all numerical elements is equal, which simplifies the training process and avoids frequent reconstruction of the tree structure. The training standard of the coding model is to minimize the overall coding length while ensuring that the decoding is unambiguous. The coding model consists of a binary tree structure, each leaf node corresponds to a numerical element (0-9), and the path from the root node to the leaf node defines the binary encoding of the element. The model assigns elements with similar frequencies of occurrence to codes of similar lengths to achieve data compression. During encoding, by inputting a numerical sequence, the coding model can convert each number into a corresponding binary code according to the Huffman tree and output a binary sequence; by inputting a binary sequence, the coding model can restore the original value by traversing the Huffman tree from the root node until it reaches the leaf node, thereby achieving reverse decoding.
[0050] In some embodiments, the generation of a static Huffman tree can be implemented in a variety of ways: optionally, initialize leaf nodes; select minimum weight nodes to merge; recursively build a complete tree structure. Optionally, establish a priority queue; gradually merge node pairs; and generate a tree structure from the bottom up. It is understandable that other methods can also be used to implement the construction process of a static Huffman tree, which is not limited here.
[0051] S104, encoding the first compression coded data based on the static Huffman tree to obtain second compression coded data.
[0052] The secondary compressed coded data represents a binary data stream obtained after Huffman tree compression.
[0053] The encoding device performs this step after establishing the static Huffman tree. Specifically, the encoding device reads each number in the compressed coded data in turn; searches for the code corresponding to the number in the static Huffman tree; replaces the original number with the corresponding binary code sequence; and finally obtains a variable-length binary compressed data stream.
[0054] In some embodiments, the encoding based on the Huffman tree can be implemented in a variety of ways: optionally, sequentially traversing the data; looking up the table to replace the encoding; splicing the binary stream. Optionally, processing the data in blocks; parallel encoding conversion; merging the compression results. It is understandable that other methods can also be used to implement the data encoding process based on the Huffman tree, which is not limited here.
[0055] S105. Map and encode the secondary compressed encoded data based on a preset mapping dictionary to obtain encoding result data.
[0056] Among them, the preset mapping dictionary refers to a mapping table containing the correspondence between 64 characters (numbers, letters and special symbols) and 6-bit binary numbers; the mapping code represents the process of converting binary data into corresponding characters in 6-bit groups; the encoding result data is used to represent the final string form data.
[0057] The encoding device performs this step after obtaining the secondary compressed encoded data. Specifically, the encoding device first groups the binary data stream into 6 bits; performs zero padding on the last data that is less than 6 bits; then converts each group of 6-bit binary numbers into corresponding single characters according to the preset mapping dictionary; and finally records the number of zero padding and adds it to the end of the converted string.
[0058] It should be noted that the mapping dictionary can construct a mapping model by presetting the mapping relationship between 64 characters (including numbers 0-9, letters az, AZ, special symbols # and !) and 6-bit binary numbers. The training standard is to ensure that the mapping relationship corresponds one-to-one, which is convenient for encoding and decoding operations, and the selected character set is suitable for QR code storage. The mapping model constructs a 64×6 mapping table, and each character corresponds to a unique 6-bit binary code. This fixed-length mapping method simplifies the encoding and decoding process and improves processing efficiency. The mapping model ensures the reversibility and accuracy of data conversion. When encoding, by inputting a binary sequence, the mapping model will map each 6-bit group, output a character sequence, and fill the part less than 6 bits with zeros; when decoding, by inputting a character sequence, the mapping model can look up the table to convert each character back to a 6-bit binary number, and finally remove the excess zero bits according to the zero-filling record.
[0059] In some embodiments, mapping encoding can be implemented in a variety of ways: optionally, initializing a mapping table; processing data in groups; looking up a table to convert characters. Optionally, establishing a buffer area; batch data mapping; merging processing results. It is understandable that other methods can also be used to implement the mapping conversion of binary data to characters, which is not limited here.
[0060] S106. Generate a two-dimensional output barcode according to the encoding result data, and set the two-dimensional output barcode on the appearance structure of the industrial robot.
[0061] Among them, the two-dimensional output barcode refers to a two-dimensional code or barcode used to store encoding result data; the appearance structure of the industrial robot refers to the visible external surface of the robot body; the setting position is used to indicate the specific area where the barcode is pasted or printed.
[0062] The encoding device performs this step after obtaining the final encoding result data. Specifically, the encoding device first converts the encoding result data into a two-dimensional code format; then generates a complete two-dimensional code image including error checking; and finally outputs the two-dimensional code through a printing device and pastes it to a specific position on the exterior of the industrial robot to ensure that it is easy to scan and not easy to wear.
[0063] In some embodiments, the generation and setting of the QR code can be achieved in a variety of ways: optionally, selecting a coding scheme; generating a QR code image; printing and pasting it. Optionally, determining the barcode specification; adding a protection layer; directly laser engraving. It is understandable that other methods can also be used to achieve visual storage of coded data, which is not limited here.
[0064] The following is a supplement to the scenario of this embodiment.
[0065] The factory further upgraded the solution by adding a backup barcode next to the QR code and developing a mobile application. After the operator scans the barcode with a mobile phone, the program automatically parses the parameters and transmits the data to the control cabinet via Bluetooth. At the same time, the system establishes a parameter database to record the parameter change history of each robot. By analyzing this data, the performance degradation trend of the robot can be predicted and maintenance can be carried out in a timely manner. In addition, the factory has also promoted this technology to other industrial equipment, realizing unified management and rapid configuration of equipment parameters, significantly improving overall production efficiency.
[0066] In combination with the above scenarios, the following is a more detailed description of the process of the structural parameter compression encoding method of the industrial robot provided by this embodiment. Figure 2 , is another flow chart of the structural parameter compression encoding method of the industrial robot in the embodiment of the present application.
[0067] S201. Acquire original data of the industrial robot as structural parameters.
[0068] Referring to step S101 , the encoding device obtains original data.
[0069] For example, the encoding device obtains some original data as: L1-L6 are: 367.1720, 330.5910, 44.9800, 326.4790, 83.3370, 49.2420; Drive1-Drive6 are: 100.7470, 113.3333, 90.6667, 53.3330, 62.5900, 37.5270 respectively.
[0070] S202 . According to preset reference data, convert the original data into parameter correction data, and determine the positive and negative sign values, data values and numerical system of the parameter correction data.
[0071] Among them, the preset benchmark data represents the standard reference value of the structural parameters of the industrial robot; the parameter correction data refers to the difference between the original data and the preset benchmark data; the positive and negative sign values are used to indicate the positive and negative nature of the difference; the data value represents the specific size of the difference; and the numerical system refers to the counting system used to represent the data.
[0072] The encoding device performs this step after acquiring the original data of the industrial robot. Specifically, the encoding device first reads the standard parameter value of the corresponding model robot in the preset reference database; then calculates the difference between each parameter value in the original data and the corresponding reference value; then extracts the positive and negative signs and specific values of the difference; and finally determines the representation system of the value, which is usually expressed in decimal.
[0073] Corresponding to the example of the previous step, the encoding device determines the parameter correction data as: L1-L6: +.1720, +.5910, -.0200, +.4790, -.1630, -.7580; Drive1-Drive6: +.7470, +.3333, +.6667, -.6670, +.5900, -.4730.
[0074] The positive and negative sign values are "+", "+", "-", etc. The data value is "172059100200479016307580747033336667667059004730"; the value system is decimal.
[0075] S203. Integrate all positive and negative sign values to obtain a sign string.
[0076] Among them, the symbol string represents a character sequence formed by the "+" and "-" symbols arranged in sequence; the positive and negative symbol values refer to the symbol identifiers in the parameter correction data that represent the positive and negative properties of the difference.
[0077] The encoding device performs this step after obtaining the parameter correction data. Specifically, the encoding device first extracts the positive and negative signs of each parameter correction data in the order of the connecting rod parameters L1-L6 and the transmission ratio parameters Drive1-Drive6; then arranges these signs in the original order; and finally forms a complete symbol string, which contains the positive and negative information of all parameters. For the corresponding example, the symbol string is "++-+--+++-+-".
[0078] In some embodiments, the integration of symbol values can be achieved in a variety of ways: optionally, establish a symbol buffer; read symbols in order; concatenate strings; verify integrity; store results. Optionally, create a symbol array; extract symbols in batches; merge in order; verify length; output string. It is understandable that the integration process of positive and negative symbol values can also be achieved in other ways, which are not limited here.
[0079] S204, encode the symbol string to obtain a symbol encoding result; Among them, encoding symbol strings refers to the process of converting symbol strings into binary form; the symbol encoding result represents the data sequence after binary conversion; the encoding rules are used to represent the corresponding relationship between "+" converted to "1" and "-" converted to "0".
[0080] The encoding device performs this step after obtaining the complete symbol string. Specifically, the encoding device first replaces each "+" symbol in the symbol string with a binary "1" and each "-" symbol with a binary "0"; if the length of the converted binary string is less than 6 bits, "0" is added in front; finally, a binary encoding sequence with a fixed length of 6 bits is obtained. For the corresponding example, the symbol encoding results are "110100" and "111010".
[0081] In some embodiments, the encoding of the symbol string can be implemented in a variety of ways: optionally, initializing the encoder; replacing the symbol bit by bit; zero padding alignment; checking the number of bits; generating the code. Optionally, establishing a symbol mapping table; batch conversion; normalization processing; verifying the result; outputting the code. It is understandable that other methods can also be used to implement the conversion process of the symbol string to binary code, which is not limited here.
[0082] In some embodiments, the encoding device encodes the symbol string according to the positive and negative values to obtain a binary code; converts the binary code into encoded data in the same base as the numerical base to obtain a symbol encoding result.
[0083] Among them, the positive and negative values represent the difference sign ("+" or "-") obtained after comparing the structural parameters with the reference values; the symbol string refers to a character sequence formed by multiple positive and negative symbols arranged in sequence; the binary code is used to represent the data sequence after the symbol is converted to "1" (representing "+") and "0" (representing "-"); the numerical base represents the counting system used by the original data, usually decimal; the encoded data refers to the numerical value after the base conversion; the symbol encoding result is used to represent the compressed symbol information obtained in the end.
[0084] The encoding device performs this step after obtaining the symbol information of the parameter correction data. Specifically, the encoding device first replaces each symbol in the symbol string according to the rule of "+" to "1" and "-" to "0" to obtain a binary data sequence; then checks the length of the binary sequence, and adds "0" in front of it if it is less than 6 bits to make it 6 bits; then converts this 6-bit binary number according to the base rule of the original value, such as converting it to a two-digit decimal number; finally, stores the converted value as the symbol encoding result for subsequent data processing. Correspondingly, the symbol encoding results of "110100" and "111010" that are the same as the decimal system are "52" and "58".
[0085] In some embodiments, the encoding conversion process of the symbol string can be implemented in a variety of ways: optionally, establish a symbol mapping table; replace symbols one by one by position; fill zeros to align the number of bits; calculate binary values; convert the target base; verify the correctness of the result. Optionally, build a batch cache; replace multiple symbols in parallel; dynamically adjust the number of bits; quickly convert by looking up a table; format the result; and verify the data. It is understandable that other methods can also be used to implement the encoding and base conversion process of symbol information, which is not limited here.
[0086] S205 , converting the positive and negative sign values of the parameter correction data into sign coding results to obtain primary compression coding data.
[0087] Among them, the parameter correction data represents the structural parameter value after the reference value correction; the symbol encoding result refers to the symbol information after binary encoding; the one-time compression encoding data is used to represent the complete data after combining the symbol encoding result with the numerical part.
[0088] The encoding device performs this step after obtaining the symbol encoding result. Specifically, the encoding device first keeps the numerical part of the parameter correction data unchanged; then converts the symbol encoding result into a two-digit decimal number; finally, adds this two-digit number to the end of the numerical part to form a complete compressed encoded data. As shown in the above example, after the parameter correction data is converted, "172059100200479016307580747033336667667059004730" + "52" + "58", the compressed encoded data is: "1720591002004790163075807470333366676670590047305258" In some embodiments, the generation of compressed coded data can be achieved in a variety of ways: optionally, extracting the numerical part; converting the symbol code; merging the data; verifying the format; storing the result. Optionally, establishing a data cache; batch conversion processing; sequential combination; checking integrity; outputting the data. It is understandable that other methods can also be used to achieve the integration process of parameter correction data and symbol code, which is not limited here.
[0089] S206: Determine the numerical elements of the compressed coded data, and generate a static Huffman tree based on the numerical elements.
[0090] Referring to step S103 , the encoding device determines the numerical elements and generates a static Huffman tree.
[0091] As shown in the above example, the numerical elements in the compressed encoded data are 0-9; the probabilities of 0-9 are the same by default, and the reference correspondence of the Huffman tree is: 0-010; 1-101; 2-100; 3-011; 4-1101; 5-1100; 6-1111; 7-1110; 8-001; 9-000. Because 0-9 includes ten digits, using three-bit binary "000"-"111" can only represent eight digits, so "110" and "111" will be removed, and four-bit binary "1101" and "1100" will be introduced to represent 4 and 5 respectively, and "1111" and "1110" will be introduced to represent 6 and 7 respectively; this way, one-to-one correspondence can also be achieved during decoding.
[0092] Of course, in step S202, if the numerical system is not decimal, the static Huffman tree will be different. For example, if it is octal, it can be directly represented by "000"-"111"; if it is duodecimal, it is necessary to remove "101" and "100" on the basis of the decimal system and introduce "1010", "1011", "1000" and "1001".
[0093] S207, encoding the first compression coded data based on the static Huffman tree to obtain second compression coded data.
[0094] Referring to step S104, the encoding device encodes and generates secondary compressed encoded data.
[0095] Corresponding to the example, after encoding, the secondary compression encoded data of "1720591002004790163075807470333366676670590047305258" is "1011110100......11001001100001".
[0096] S208: Determine the number of data bits of the secondary compressed coded data.
[0097] Among them, the secondary compression coded data represents the binary data stream after Huffman tree encoding; the number of data bits refers to the total length of the binary data; and the determination process is used to represent the operation of calculating and counting the number of binary bits.
[0098] The encoding device performs this step after completing the Huffman tree encoding. Specifically, the encoding device first traverses the secondary compressed encoded data; then counts the total number of binary bits contained therein; and finally records this value for subsequent zero padding and mapping operations. For the corresponding example, the number of data bits of "1011110100......11001001100001" (secondary compressed encoded data) is 178.
[0099] In some embodiments, the determination of the number of data bits can be achieved in a variety of ways: optionally, initializing a counter; traversing the binary string; accumulating the number of bits; verifying the result; and recording the value. Optionally, establishing a bit cache; segmented counting; merging statistics; verifying accuracy; and outputting the total number. It is understandable that other methods can also be used to implement the statistical process of the number of binary data bits, which are not limited here.
[0100] S209: Parse the preset mapping dictionary to determine the number of split digits and mapping rules of the mapping code.
[0101] Among them, the preset mapping dictionary represents a lookup table containing the correspondence between 64 characters and 6-bit binary numbers; the number of splitting bits refers to the number of bits of binary data grouping; and the mapping rules are used to represent the correspondence between binary data and characters.
[0102] The encoding device performs this step after determining the number of data bits. Specifically, the encoding device first loads the preset mapping dictionary file; then parses the number of split bits defined in the dictionary (usually 6 bits), that is, a total of 64 characters consisting of numbers 0 to 9, a to z, A to Z, # and !, corresponding to "000000"-"111111"; finally, extracts the mapping relationship between binary data and characters specified in the dictionary to prepare for subsequent mapping encoding.
[0103] In some embodiments, the parsing of the mapping dictionary can be implemented in a variety of ways: optionally, reading a dictionary file; extracting mapping relationships; verifying integrity; determining splitting rules; caching mapping tables. Optionally, initializing a parser; batch loading rules; verifying validity; optimizing storage; building an index. It is understandable that other ways can also be used to implement the parsing process of the preset mapping dictionary, which is not limited here.
[0104] S210, padding the last bit of the secondary compressed coded data with zeros so that the number of data bits after the zero padding can be divided by the number of split bits.
[0105] Among them, zero padding refers to the operation of adding "0" at the end of binary data; the number of splitting bits represents the length of the binary group when mapping; integer division is used to indicate that the total number of bits after zero padding can be divided by the number of splitting bits; the number of data bits after zero padding refers to the total length of the binary string after adding "0".
[0106] The encoding device performs this step after determining the mapping rule. Specifically, the encoding device first calculates the remainder of the total number of bits of the secondary compressed encoded data and the number of split bits (6 bits); then determines the number of "0"s that need to be added based on the calculation result so that the total number of bits after zero padding can be divided by 6; finally, add the corresponding number of "0"s at the end of the binary data to ensure that the data can be completely mapped and converted. Correspondingly, the number of data bits of "1011110100......11001001100001" (secondary compressed encoded data) is 178, and the remainder after division by 6 is 4, so two zeros need to be added to the last bit.
[0107] In some embodiments, the zero padding at the end can be implemented in a variety of ways: optionally, calculating the remainder value; determining the number of zero paddings; appending binary zeros; verifying the number of digits; and saving the result. Optionally, establishing a zero padding cache; batch digit check; dynamic zero padding; checking integrity; and outputting data. It is understandable that other methods can also be used to implement the zero padding alignment process for binary data, which is not limited here.
[0108] S211, record the number of zeros filled in the last digit.
[0109] Among them, the number of zero padding indicates the number of "0" added to the last digit; the recording process refers to the operation of saving the number of zero padding; the last digit zero padding is used to indicate the specific number of binary "0" added to achieve integer divisibility.
[0110] The encoding device performs this step after completing the zero padding at the end. Specifically, the encoding device first obtains the number of zero padding actually added in the previous step; then converts this value into a suitable storage format; and finally temporarily saves it in the device memory in preparation for subsequent addition to the encoding result data. In the example, the number of zero padding is 2.
[0111] In some embodiments, the recording of the number of zero padding can be implemented in a variety of ways: optionally, reading the zero padding amount; format conversion; establishing a mark; saving the value; verifying the correctness. Optionally, creating a counter; real-time statistics; data backup; verification storage; output results. It is understandable that other methods can also be used to implement the recording process of the number of zero padding, which is not limited here.
[0112] S212, taking the secondary compressed coded data after the last bit is padded with zero as the standard data to be mapped, and performing mapping encoding on the standard data to be mapped based on the mapping rule to obtain encoding result data.
[0113] Among them, the standard data to be mapped represents the complete binary data after zero padding; the mapping rule refers to the conversion correspondence between binary data and characters; the mapping code represents the process of converting binary data into characters; and the encoding result data is used to represent the final character string.
[0114] The encoding device performs this step after completing all preparations. Specifically, the encoding device first groups the zero-filled binary data into 6-bit groups; then searches for the corresponding character for each group of 6-bit binary numbers according to the preset mapping dictionary; then connects all converted characters in order; and finally forms a complete string, which is the final encoding result data.
[0115] Correspondingly, "1011110100......11001001100001" (secondary compression encoded data) is padded with two zeros to become "1011110100......1100100110000100" (standard data to be mapped), and the encoding is "LhoaB4IUa#RS5tL9JL**L*BwiTCIC0" (encoding result data).
[0116] In some embodiments, the mapping code conversion can be implemented in a variety of ways: optionally, processing data in groups; querying the mapping dictionary; converting characters; splicing results; verifying integrity. Optionally, establishing a data cache; batch mapping conversion; merging strings; verifying correctness; outputting results. It is understandable that other methods can also be used to implement the mapping conversion process from binary data to strings, which is not limited here.
[0117] S213, adding a number of zero paddings to the last bit of the encoded result data.
[0118] The encoding result data represents the character string after mapping conversion; the last position represents the last position of the character string; and adding the number of zero padding refers to the operation of appending the recorded number of zero padding to the end of the character string.
[0119] The encoding device performs this step after completing the mapping encoding. Specifically, the encoding device first converts the previously recorded number of zero padding into character form; then locates to the end of the encoding result data; finally, appends the character representing the number of zero padding to the end of the encoding result data to form the final complete encoding string. Correspondingly, "LhoaB4IUa#RS5tL9JL**L*BwiTCIC0" (encoding result data) becomes "LhoaB4IUa#RS5tL9JL**L*BwiTCIC02", In some embodiments, the addition of zero-filling numbers can be implemented in a variety of ways: optionally, converting the digital format; locating the end position; appending characters; verifying integrity; and saving the result. Optionally, establishing a character buffer; preparing to append data; merging character strings; verifying correctness; and outputting data. It is understandable that other methods can also be used to implement the process of adding the last digit of the zero-filling number, which is not limited here.
[0120] S214. Generate a two-dimensional output barcode according to the encoding result data, and set the two-dimensional output barcode on the appearance structure of the industrial robot.
[0121] Referring to step S106, corresponding to "LhoaB4IUa#RS5tL9JL**L*BwiTCIC02", the encoding device will generate a two-dimensional output barcode for pasting onto the industrial robot.
[0122] The following is another process description based on the structural parameter decoding method of the industrial robot provided by this embodiment. Figure 3 , which is a flow chart of a structural parameter decoding method of an industrial robot in an embodiment of the present application.
[0123] It should be noted that the structural parameter decoding method of the industrial robot described below is executed using a decoding device; in some embodiments, the decoding device and the above-mentioned encoding device are integrated devices, collectively referred to as encoding and decoding devices. The decoding device is used as the description below, which should not be regarded as limiting its specific device composition or name.
[0124] S301, scan the two-dimensional output barcode to obtain the encoding result data.
[0125] Among them, the two-dimensional output barcode refers to the two-dimensional code or barcode pasted on the appearance of the industrial robot; scanning refers to the process of reading the barcode image through a photoelectric device; the encoding result data represents the character sequence parsed from the barcode; the data reading process is used to represent the operation of converting the barcode image into digital information.
[0126] The decoding device executes this step when it needs to obtain the structural parameters of the industrial robot. Specifically, the decoding device first calls the scanning module to scan and image the two-dimensional barcode on the appearance of the industrial robot; then decodes the acquired image, including image enhancement, edge detection and pixel analysis; finally, converts the parsed two-dimensional code information into a character sequence to obtain the complete encoding result data "LhoaB4IUa#RS5tL9JL**L*BwiTCIC02".
[0127] In some embodiments, the scanning and parsing of the two-dimensional barcode can be achieved in a variety of ways: optionally, adjusting the scanning angle; acquiring the barcode image; image preprocessing; edge recognition; data extraction. Optionally, initializing the scanner; repeated sampling; image enhancement processing; feature recognition; data verification. It is understandable that other methods can also be used to achieve the scanning and data acquisition process of the two-dimensional barcode, which are not limited here.
[0128] S302: Decode the encoded result data based on a preset mapping dictionary to obtain secondary compressed encoded data.
[0129] Among them, the preset mapping dictionary represents a lookup table containing the correspondence between 64 characters and 6-bit binary numbers; the encoding result data refers to the character sequence obtained from the two-dimensional barcode; the decoding process is used to represent the operation of converting characters back to binary data; the secondary compressed encoding data represents the binary sequence obtained after conversion by the mapping dictionary.
[0130] The decoding device performs this step after obtaining the coded result data. Specifically, the decoding device first loads the preset mapping dictionary to establish the correspondence between characters and binary data; then converts each character in the coded result data into a corresponding 6-bit binary number according to the mapping dictionary; finally, all the converted binary data are spliced in sequence to form complete secondary compressed coded data.
[0131] In some embodiments, the decoding device removes the last data of the encoded result data and determines the last numerical value corresponding to the last data; based on a preset mapping dictionary, decodes the encoded result data after removing the last data to obtain a decoding result; removes the zero value of the number of last numerical values in the last digit of the decoding result to obtain secondary compressed encoded data.
[0132] Among them, the last digit data represents the last numeric character of the encoded result data; the last digit value refers to the specific value of the number of zero padding; the preset mapping dictionary is used to represent the conversion rules from characters to binary data; the decoding result represents the binary sequence after conversion by the mapping dictionary; the zero value refers to the binary "0" added for alignment; the secondary compressed encoded data represents the actual valid binary data after removing the zero padding.
[0133] The decoding device performs this step after obtaining the encoding result data. Specifically, the decoding device first separates the last character from the end of the encoding result data and converts it into a corresponding numerical value, which represents the number of zero padding; then, for the remaining character sequence, the preset mapping dictionary is searched one by one for conversion to obtain a complete binary sequence; finally, according to the number of zero padding obtained previously, the corresponding number of "0" is removed from the end of the binary sequence to obtain the original secondary compressed encoding data. This process is exactly the opposite of step S213 during encoding, ensuring accurate restoration of the data. Correspondingly, "LhoaB4IUa#RS5tL9JL**L*BwiTCIC02" removes the last "2" to obtain "LhoaB4IUa#RS5tL9JL**L*BwiTCIC0", and the decoding result is "1011110100......1100100110000100" (secondary compression encoded data after zero padding). After removing 2 "0s", we get "1011110100......11001001100001" (secondary compression encoded data).
[0134] In some embodiments, the decoding conversion of the encoding result data can be implemented in a variety of ways: optionally, separating the last character; converting the zero-filled value; querying the mapping dictionary; batch converting characters; removing the last zero; verifying data integrity. Optionally, establishing a data cache; extracting the last data; parallel character conversion; dynamic zero-bit deletion; result verification; output processing. It is understandable that other methods can also be used to implement the conversion process from the encoding result data to the secondary compressed encoding data, which is not limited here.
[0135] S303 , decoding the secondary compressed coded data based on the static Huffman tree to obtain primary compressed coded data.
[0136] Among them, the static Huffman tree represents a pre-constructed binary tree structure; the secondary compressed coded data refers to the compressed data in binary form; the decoding process is used to represent the operation of converting binary data into original numerical values according to the Huffman tree; the primary compressed coded data represents the numerical sequence obtained after decoding.
[0137] The decoding device performs this step after obtaining the secondary compressed coded data. Specifically, the decoding device first loads the pre-built static Huffman tree structure; then starts from the starting position of the binary data stream and gradually parses it according to the encoding rules of the Huffman tree; each complete code parsed is converted into a corresponding value; and finally the complete primary compressed coded data is obtained.
[0138] Correspondingly, "1011110100......11001001100001" (secondarily compressed coded data) is decoded to obtain "1720591002004790163075807470333366676670590047305258" (firstly compressed coded data).
[0139] In some embodiments, Huffman tree decoding can be implemented in a variety of ways: optionally, initializing the Huffman tree; traversing the nodes in order; identifying valid codes; converting values; combining results. Optionally, establishing a decoding cache; parallel data processing; table lookup conversion; result verification; data integration. It is understandable that other methods can also be used to implement the data decoding process based on the Huffman tree, which is not limited here.
[0140] S304: extracting preset position data of the compressed coded data once, and generating a symbol string according to the preset position data.
[0141] Among them, the preset position data represents the symbol encoding information at the end of the compressed encoded data; the extraction process refers to the operation of separating the numerical part and the symbol information; the symbol string is used to represent the restored positive and negative sign sequence; the generation process represents the operation of converting numbers into symbols.
[0142] The decoding device performs this step after obtaining the compressed coded data. Specifically, the decoding device first extracts two digits from the end of the compressed coded data as symbol encoding information; then converts the two digits into a 6-bit binary number according to the preset symbol bit mapping rule; then converts the "1" in the binary number into "+" and the "0" into "-"; finally, a complete symbol string is obtained. Correspondingly, "5258", that is, "110100" and "111010" are extracted to generate "++-+--" and "+++-+-".
[0143] In some embodiments, the extraction and conversion of symbol information can be implemented in a variety of ways: optionally, locating the end data; extracting the symbol code; looking up the table for conversion; generating a symbol string; verifying correctness. Optionally, establishing a data cache; separating the symbol information; batch processing; restoring the symbol; and verifying the result. It is understandable that other methods can also be used to implement the extraction and restoration process of the symbol code, which is not limited here.
[0144] S305 , integrating the symbol character string into the compressed coded data after removing the preset position data to obtain the original data.
[0145] Among them, the symbol string represents a symbol sequence containing "+" and "-"; the compressed encoded data refers to the numerical sequence after removing the terminal symbol information; the integration process is used to represent the operation of combining symbols with numerical values; the original data represents the complete structural parameter value after restoration.
[0146] The decoding device performs this step after obtaining the symbol string. Specifically, the decoding device first divides the numerical part of the compressed coded data after removing the symbol information by bit; then pairs the symbols in the symbol string with the numerical values at the corresponding positions in order; then determines the positive and negative values according to the symbols; and finally recombines to obtain the complete original data sequence. Integrate "++-+--" and "+++-+-" to "172059100200479016307580747033336667667059004730", and get: L1-L6: +.1720, +.5910, -.0200, +.4790, -.1630, -.7580; Drive1-Drive6: +.7470, +.3333, +.6667, -.6670, +.5900, -.4730.
[0147] In some embodiments, the integration of symbols and values can be achieved in a variety of ways: optionally, numerical sequence segmentation; symbol correspondence matching; combination processing; format conversion; result verification. Optionally, data cache establishment; parallel matching processing; dynamic integration; integrity verification; output results. It is understandable that other methods can also be used to achieve the integration process of symbol strings and values, which are not limited here.
[0148] S306. Determine the structural parameters of the industrial robot based on the original data.
[0149] Among them, the original data represents the completely restored numerical sequence; the structural parameters refer to the key parameters that affect the accuracy of the industrial robot; the determination process is used to represent the operation of matching numerical values with parameters; the parameter types include important indicators such as connecting rod length and reduction ratio.
[0150] The decoding device performs this step after obtaining the original data. Specifically, the decoding device first parses the original data into various parameter items according to the predefined format; then determines the corresponding physical meaning according to the type and position of the parameter, including the connecting rod length and reduction ratio of different axes; finally generates a complete structural parameter table for precise control of the industrial robot.
[0151] In some embodiments, the determination of structural parameters can be achieved in a variety of ways: optionally, data format analysis; parameter classification identification; physical quantity conversion; integrity check; parameter verification. Optionally, parameter model establishment; batch data processing; parameter mapping; accuracy verification; result output. It is understandable that other methods can also be used to achieve the conversion process from raw data to structural parameters, which is not limited here.
[0152] In the embodiment of the present application, a three-level compression method based on positive and negative sign value compression, static Huffman tree coding and mapping dictionary conversion is adopted, and the compressed data is solidified on the robot body in the form of a two-dimensional code, so that efficient compression storage and convenient acquisition of structural parameters are achieved, which not only significantly reduces the data storage space, but also ensures the permanent preservation of data, and effectively solves the problems of easy data loss, inconvenient equipment management, and complex parameter acquisition caused by reliance on control cabinets or external storage devices in the prior art, thereby realizing reliable storage, fast reading and flexible configuration of industrial robot structural parameters, improving the adaptability and maintenance efficiency of the production line, and reducing equipment management costs.
[0153] The following describes the encoding device or decoding device in the embodiment of the present invention from the perspective of hardware processing. Figure 4 , which is a schematic diagram of a physical device structure of an encoding device or a decoding device in an embodiment of the present application.
[0154] It should be noted that Figure 4The structure of the encoding device or decoding device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0155] like Figure 4 As shown, the encoding device or decoding device includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the method described in the above embodiment. In RAM 403, various programs and data required for system operation are also stored. CPU 401, ROM 402 and RAM 403 are connected to each other through bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0156] The following components are connected to the I / O interface 405: an input section 406 including an audio input device, a button switch, etc.; an output section 407 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.
[0157] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 409, and / or installed from a removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, various functions defined in the present invention are performed.
[0158] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0159] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.
[0160] Specifically, the encoding device or decoding device of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the structural parameter compression encoding method of the industrial robot provided in the above embodiment is implemented.
[0161] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the encoding device or decoding device described in the above embodiment; or may exist independently without being assembled into the encoding device or decoding device. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the encoding device or decoding device, the encoding device or decoding device implements the structural parameter compression encoding method and decoding method of the industrial robot provided in the above embodiment.
[0162] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0163] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0164] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Claims
1. A method for compressing and encoding structural parameters of an industrial robot, characterized in that: Applied to an encoding device, the method comprises: Obtain the original data of industrial robots as structural parameters; Determine the positive and negative sign values of the original data, and convert the positive and negative sign values into sign bit codes to obtain primary compressed coded data; Determine the numerical elements of the once compressed coded data, and generate a static Huffman tree based on the numerical elements; Encoding the primary compression coded data based on the static Huffman tree to obtain secondary compression coded data; Mapping and encoding the secondary compressed coded data based on a preset mapping dictionary to obtain coded result data; A two-dimensional output barcode is generated according to the encoding result data; and the two-dimensional output barcode is arranged on the appearance structure of the industrial robot.
2. The method according to claim 1, characterized in that The step of determining the positive and negative sign values of the original data and converting the positive and negative sign values into sign bit codes to obtain compressed coded data specifically includes: According to preset reference data, the original data is converted into parameter correction data, and the positive and negative sign values, data values and numerical system of the parameter correction data are determined; Integrate all of the positive and negative sign values to obtain a sign string; Encode the symbol string to obtain a symbol encoding result; The positive and negative sign values of the parameter correction data are converted into the sign encoding result to obtain primary compression encoding data.
3. The method according to claim 2, characterized in that The step of encoding the symbol string to obtain a symbol encoding result specifically includes: Encode the symbol string according to the positive and negative values to obtain a binary code; The binary code is converted into coded data of the same base as the numerical value to obtain a symbol coding result.
4. The method according to claim 1, characterized in that: The step of mapping and encoding the secondary compressed encoded data based on a preset mapping dictionary to obtain the encoded result data specifically includes: Determine the number of data bits of the secondary compressed coded data; Parse the preset mapping dictionary to determine the number of split digits and mapping rules of the mapping code; Filling the last bit of the secondary compressed coded data with zeros so that the number of data bits after the zero filling can be divided by the number of split bits; The secondary compressed coded data after the last bit is padded with zero is used as the standard data to be mapped, and mapping coding is performed on the standard data to be mapped based on the mapping rule to obtain coding result data.
5. The method according to claim 4, characterized in that After the step of padding the last bit of the secondary compressed coded data with zeros so that the number of data bits after the zero padding can be divided by the number of split bits, the method further includes: Record the number of zeros filled at the end; The number of zero padding is added to the last bit of the encoding result data.
6. A structural parameter decoding method for an industrial robot, characterized in that: Applied to a decoding device, the method comprises: Scan the two-dimensional output barcode to obtain the encoding result data; Decoding the encoded result data based on a preset mapping dictionary to obtain secondary compressed encoded data; Decoding the secondary compressed coded data based on the static Huffman tree to obtain primary compressed coded data; Extracting preset position data of the once compressed coded data, and generating a symbol string according to the preset position data; Integrate the symbol string into the once compressed coded data after removing the preset position data to obtain original data; The structural parameters of the industrial robot are determined according to the original data.
7. The method according to claim 6, characterized in that The step of decoding the encoded result data based on a preset mapping dictionary to obtain secondary compressed encoded data specifically includes: Removing the last digit of the encoding result data, and determining the last digit value corresponding to the last digit; Based on a preset mapping dictionary, the encoded result data after removing the last bit data is decoded to obtain a decoding result; The zero value of the last digit of the decoding result is removed to obtain the secondary compressed coded data.
8. An encoding device or a decoding device, characterized in that: The encoding device or decoding device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the encoding device to execute the method as described in any one of claims 1-5, so that the decoding device executes the method as described in claim 6 or 7.
9. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on an encoding device or a decoding device, the encoding device is caused to execute the method according to any one of claims 1 to 5, and the decoding device is caused to execute the method according to claim 6 or 7, respectively.
10. A computer program product, characterized in that When the computer program product runs on an encoding device or a decoding device, the encoding device is caused to execute the method according to any one of claims 1 to 5, and the decoding device is caused to execute the method according to claim 6 or 7, respectively.