A crystal oscillator encoding and decoding method, device and medium
By encoding its parameter information on the crystal oscillator, the problems of difficulty in obtaining crystal oscillator parameters and high maintenance costs in the prior art are solved, and the effect of quickly obtaining parameters without removing the crystal oscillator.
Patent Information
- Application Number
- CN202410717297.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-06-04
AI Technical Summary
In the prior art, it is difficult to obtain the parameters of the quartz crystal resonator (crystal oscillator) and the maintenance cost is high. It is necessary to remove the installed crystal oscillator for testing.
By encoding its parameter information, including raw material information, performance information and production information on the crystal oscillator, it is converted into dot codes and character codes using encoding rules, and imprinted on the crystal oscillator surface, and quickly obtain parameters using identification codes.
The parameters can be quickly obtained without removing the crystal oscillator, reducing maintenance costs and difficulty.
Smart Images

Figure CN118508973B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of coding and decoding technology, and in particular to a crystal oscillator coding and decoding method, device and medium. Background Art
[0002] The quartz crystal resonator (abbreviated as crystal oscillator) is the clock of the chip in the circuit, and its working stability is very important. When there is a problem with the circuit or chip, it is necessary to obtain the crystal oscillator parameters to determine the cause of the problem.
[0003] However, the crystal oscillator in the prior art needs to remove the installed crystal oscillator and perform a large number of tests to obtain the crystal oscillator parameters. The crystal oscillator parameters are difficult to obtain and the crystal oscillator maintenance cost is high. Summary of the invention
[0004] In view of this, the purpose of the embodiments of the present invention is to provide a method, device and medium for crystal oscillator encoding and decoding, which can quickly obtain crystal oscillator parameters through the crystal oscillator encoding without removing the crystal oscillator, and the crystal oscillator parameters are simple to obtain and the crystal oscillator maintenance cost is low.
[0005] In a first aspect, an embodiment of the present invention provides a crystal oscillator encoding and decoding method, comprising:
[0006] Acquire parameter information of the crystal oscillator, the parameter information including raw material information, performance information and production information;
[0007] Encoding is performed according to the raw material information and a first encoding rule to obtain a first point code, wherein the first point code is located in a first area of the crystal oscillator;
[0008] Encoding according to the performance information and the second encoding rule to obtain a first character code and / or a second dot code, wherein the first character code and / or the second dot code is located in the second area of the crystal oscillator;
[0009] A second character code is obtained by encoding according to the production information and a third encoding rule, and the second character code is located in a third area of the crystal oscillator.
[0010] In some optional embodiments, encoding according to the raw material information and the first encoding rule to obtain the first point code includes:
[0011] Acquire the base plate serial number and the crystal oscillator base sequence number of the crystal oscillator according to the raw material information, wherein the base plate serial number represents the serial number of the base plate of the crystal oscillator when the raw materials are put into storage, and the crystal oscillator base sequence number represents the position of the crystal oscillator on the base plate;
[0012] Encoding the serial number of the base plate to obtain a base plate ID code, wherein the base plate ID code is a first type point code;
[0013] The crystal oscillator base serial number is encoded to obtain a crystal oscillator position code, wherein the crystal oscillator position code is a second type point code,
[0014] The base plate ID code and the crystal oscillator position code are arranged in sequence to obtain the first point code.
[0015] In some optional embodiments, encoding the serial number of the base plate to obtain the base plate ID code includes:
[0016] Convert the base plate serial number into a binary code to obtain a base plate binary code;
[0017] The base plate binary code and the point code are matched one by one to obtain the base plate ID code, and the one-to-one correspondence indicates that one binary code corresponds to one point code.
[0018] In some optional embodiments, the base plate ID code and the crystal oscillator position code are arranged in sequence to obtain the first point code, including:
[0019] Adding a first direction mark point code at the starting position of the base plate ID code, wherein the first direction mark point code indicates the starting position and the first arrangement direction of the base plate ID code;
[0020] A plurality of second direction marking point codes are arranged in the corner area of the first area, wherein the second direction marking point codes indicate a second arrangement direction of the base plate ID code and the crystal oscillator position code after the corner;
[0021] The base plate ID code and the crystal oscillator position code are arranged in sequence under the indication of the first direction mark point code and the second direction mark point code to obtain the first point code, and the first point code includes the first direction mark point code, the second direction mark point code, the base plate ID code and the crystal oscillator position code.
[0022] In some optional embodiments, the first point code further includes a CRC code, and the method further includes:
[0023] Arrange the CRC codes in sequence at the end position of the crystal oscillator position code;
[0024] An end mark point code is added at the end position of the CRC code, the end mark point code indicates the stop arrangement point code, and the end mark point code belongs to the first point code.
[0025] In some optional embodiments, encoding according to the performance information and the second encoding rule to obtain the first character code and / or the second point code includes:
[0026] Converting the performance information into binary code to obtain a performance binary code;
[0027] Match the performance binary code with the point code one by one to obtain the second point code; and / or
[0028] Converting the performance information into first code number information according to a first preset comparison table, wherein the first code number information is represented by a number;
[0029] The first code number information is converted into the first character code according to a second preset comparison table.
[0030] In some optional embodiments, encoding according to the production information and the third encoding rule to obtain the second character code includes:
[0031] Converting the production information into second code number information according to a third preset comparison table, wherein the second code number information is represented by a number;
[0032] The second code number information is converted into the second character code according to the fourth preset comparison table, the value range of the first character code is a first set, the value range of the second character code is a second set, and the intersection of the first set and the second set does not include an empty set.
[0033] In a second aspect, an embodiment of the present invention provides a method for crystal oscillator decoding, which is applied to a code on a crystal oscillator, wherein the code includes a first point code, a first character code, a second point code, and a second character code, wherein the first point code includes a first direction mark point code, a CRC code, a second direction mark point code, a base plate ID code, a crystal oscillator position code, and an end mark point code, and the method for crystal oscillator decoding includes:
[0034] Acquire a surface image of the crystal oscillator, wherein the surface image includes the first dot code, the first character code, the second dot code, and the second character code;
[0035] Identify the first direction marking point code and the second direction marking point code according to the surface image;
[0036] sequentially identifying the base plate ID code, the crystal oscillator position code, the CRC code, and the end mark code on the surface image according to the first direction mark code and the second direction mark code;
[0037] Decoding the base plate ID code, the crystal oscillator position code, and the CRC code into corresponding binary codes respectively, and converting the corresponding binary codes to obtain the base plate serial number, the crystal oscillator base sequence number, and the CRC check value;
[0038] Identify the first character code on the surface image, convert the first character code into first code number information according to a second preset comparison table, and decode the first code number information into performance information according to the first preset comparison table;
[0039] The second character code on the surface image is identified, the second character code is converted into second code number information according to a fourth preset comparison table, and the second code number information is decoded into production information according to a third preset comparison table.
[0040] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the above-mentioned crystal oscillator encoding method or the steps of the above-mentioned crystal oscillator decoding method are implemented.
[0041] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used to execute the above-mentioned crystal oscillator encoding method or the above-mentioned crystal oscillator decoding method when executed by the processor.
[0042] The implementation of the embodiment of the present invention includes the following beneficial effects: The embodiment of the present invention provides a method for crystal oscillator encoding, including: obtaining parameter information of a crystal oscillator, the parameter information including raw material information, performance information and production information; encoding according to the raw material information and a first encoding rule to obtain a first point code, the first point code is located in the first area of the crystal oscillator; encoding according to the performance information and a second encoding rule to obtain a first character code and / or a second point code, the first character code and / or the second point code is located in the second area of the crystal oscillator; encoding according to the production information and a third encoding rule to obtain a second character code, the second character code is located in the third area of the crystal oscillator. According to the obtained crystal oscillator parameter information, the corresponding parameter information is converted into a corresponding code, and then the crystal oscillator is encoded, and the code is placed on the surface of the crystal oscillator. When the crystal oscillator parameter information needs to be obtained, the crystal oscillator parameters can be quickly obtained by simply identifying the crystal oscillator code. The crystal oscillator parameter acquisition is simple, and the crystal oscillator maintenance cost is low.
[0043] Implementation of the embodiments of the present invention includes the following beneficial effects: The embodiments of the present invention provide a method for crystal oscillator decoding, including: acquiring a surface image of the crystal oscillator, the surface image including the first point code, the first character code, the second point code and the second character code; identifying the first direction mark point code and the second direction mark point code according to the surface image; identifying the base plate ID code, the crystal oscillator position code, the CRC code and the end mark point code on the surface image in sequence according to the first direction mark point code and the second direction mark point code; respectively decoding the base plate ID code, the crystal oscillator position code and the CRC code into corresponding binary codes, converting the corresponding binary codes to obtain a base plate serial number, a crystal oscillator base sequence number and a CRC check value; identifying the first character code on the surface image, converting the first character code into first code number information according to a second preset comparison table, and decoding the first code number information into performance information according to the first preset comparison table; identifying the second character code on the surface image, converting the second character code into second code number information according to a fourth preset comparison table, and decoding the second code number information into production information according to a third preset comparison table. By acquiring the surface image of the crystal oscillator, the code on the crystal oscillator can be identified to obtain the base plate serial number, crystal oscillator base sequence number and CRC check value, performance information and production information. The crystal oscillator parameters can be quickly obtained through the crystal oscillator code without removing the crystal oscillator. The crystal oscillator parameters are easy to obtain and the crystal oscillator maintenance cost is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a flow chart of a crystal oscillator encoding method provided by an embodiment of the present invention;
[0045] Figure 2 It is a schematic diagram of the structure of the crystal oscillator encoding provided by an embodiment of the present invention;
[0046] Figure 3 is an example diagram of a first area provided by an embodiment of the present invention;
[0047] Figure 4 is an example diagram of crystal oscillator encoding provided by an embodiment of the present invention;
[0048] Figure 5 is another example diagram of crystal oscillator encoding provided by an embodiment of the present invention;
[0049] Figure 6 is a flow chart of a crystal oscillator decoding method provided by an embodiment of the present invention;
[0050] Figure 7 It is a schematic block diagram of the structure of a computer device provided by an embodiment of the present invention.
[0051] Reference numerals: first area 100 , first direction mark dot code 110 , second mark 121 , first mark 122 , third mark 123 , end mark dot code 130 , center frequency character 200 , load temperature character 300 , second character code 400 , second dot code 500 . DETAILED DESCRIPTION
[0052] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0053] In the description of the present invention, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0054] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0055] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0056] The crystal oscillator encoding and decoding method of the embodiment of the present invention is further described below.
[0057] First, refer to Figure 1-2 , Figure 1 A flow chart of a crystal oscillator encoding method provided in an embodiment of the present invention, the crystal oscillator encoding method includes but is not limited to the following steps:
[0058] S101, obtaining parameter information of a crystal oscillator, wherein the parameter information includes raw material information, performance information and production information;
[0059] S102, encoding according to the raw material information and a first encoding rule to obtain a first point code, where the first point code is located in a first area 100 of the crystal oscillator;
[0060] S103, encoding according to the performance information and the second encoding rule to obtain a first character code and / or a second dot code 500, wherein the first character code and / or the second dot code 500 is located in a second area of the crystal oscillator;
[0061] S104, encoding is performed according to the production information and a third encoding rule to obtain a second character code 400, where the second character code 400 is located in a third area of the crystal oscillator.
[0062] It is worth noting that the crystal oscillator coding of the embodiment of the present invention is to print the coding on the crystal oscillator, so that the crystal oscillator has corresponding dot codes and character codes. The encodable area of the crystal oscillator in the embodiment of the present invention is less than 2 square millimeters, and the use of a two-dimensional code cannot carry the numbering information in this encoding area at a low cost. The crystal oscillator number (that is, the raw material information) is indicated by engraving the dot code in the encodable area. The crystal oscillator number is the unique serial number of the crystal oscillator, and the crystal oscillator number of hundreds of billions or trillions can be indicated by the dot code. Some specific performance information of the crystal oscillator, such as the center frequency, load temperature, etc., is indicated by characters or dot codes, which are not specifically limited. The production information of the crystal oscillator, such as the production batch number, production date, etc., is indicated by other characters, which are not specifically limited.
[0063] It should be noted that the embodiment of the present invention can store the parameter information of the crystal oscillator by encoding when the crystal oscillator is produced. When the parameter information of the crystal oscillator needs to be obtained, only the corresponding code needs to be scanned and identified to obtain the specific parameter information, and there is no need to retest and obtain, which is convenient and fast, and simple to maintain. Specifically, the raw material information (that is, the number of the crystal oscillator) in the obtained parameter information is encoded to obtain the first dot code, and the first dot code is used to mark the unique serial number of the crystal oscillator. The specific dot code can be a dot code of different shapes, or a dot code of the same shape with different colors, or a dot code of different shapes plus different colors, which is not limited here. The first dot code is engraved / pasted on the first area 100 of the crystal oscillator, and the number of the crystal oscillator can be obtained by identifying and decoding the first area 100. The performance information of the crystal oscillator, such as the center frequency, load temperature, and load capacitance, is represented by the first character code and / or the second dot code 500, and the first character code and / or the second dot code 500 is printed / pasted on the second area of the crystal oscillator. Specifically, the first character code includes letters, numbers, symbols, etc., which are not specifically limited; the second dot code 500 can be a dot code of different shapes, or a dot code of the same shape with different colors, or a dot code of different shapes plus different colors, which are not specifically limited here. The production information of the crystal oscillator is encoded to obtain the second character code 400, and the second character code 400 is printed / pasted on the third area of the crystal oscillator. The specific production information includes the production batch number, the production date, etc., and the specific second character code 400 includes letters, numbers, symbols, etc., which are not specifically limited. When it is necessary to obtain specific parameter information, it is only necessary to scan and identify the codes of the first area 100, the second area, and the third area. The crystal oscillator parameter information can be quickly obtained without removing the crystal oscillator. The crystal oscillator parameter information is easy to obtain, and the crystal oscillator maintenance cost is low.
[0064] In some optional embodiments, Figure 1 The step 102 shown includes but is not limited to: encoding according to the raw material information and the first coding rule to obtain the first point code, including: obtaining the base plate serial number and the crystal oscillator base sequence number of the crystal oscillator according to the raw material information, the base plate serial number represents the serial number of the base plate of the crystal oscillator when the raw materials are put into storage, and the crystal oscillator base sequence number represents the position of the crystal oscillator on the base plate; encoding the base plate serial number to obtain a base plate ID code, and the base plate ID code is a first type of point code; encoding the crystal oscillator base sequence number to obtain a crystal oscillator position code, and the crystal oscillator position code is a second type of point code, and the base plate ID code and the crystal oscillator position code are arranged in sequence to obtain the first point code.
[0065] Specifically, the raw material information (i.e., the crystal oscillator number) is composed of the base plate serial number of the crystal oscillator and the crystal oscillator base sequence number. The first point code is obtained by encoding the base plate serial number and the crystal oscillator base sequence number. The base plate serial number is the number of the base plate where the crystal oscillator is located (i.e., the serial number of the base plate when the raw materials are put into storage). It can be specifically represented by a thirty-point point code, that is, the base plate serial number is encoded to obtain the base plate ID code. The specific number of point codes is set according to demand. The base plate ID code is a first type of point code. The first type of point code can be a point code of different shapes, or a point code of the same shape with different colors, or a point code of different shapes plus different colors. There is no specific limitation. The crystal oscillator base sequence number indicates the position of the crystal oscillator on the base plate. Specifically, a base plate includes multiple crystal oscillators, and the specific number is not limited. In this implementation, the crystal oscillator base sequence number is represented by an eight-point code, and the representation range is 0-255, that is, the crystal oscillator base sequence number is encoded to obtain a crystal oscillator position code. The crystal oscillator position code is a second type of point code. The second type of point code can be a point code of different shapes, or a point code of the same shape with different colors, or a point code of different shapes plus different colors, which is not specifically limited. The base plate ID code and the crystal oscillator position code are arranged end to end to obtain the first point code.
[0066] In some optional embodiments, encoding the base plate serial number to obtain the base plate ID code includes: converting the base plate serial number into a binary code to obtain a base plate binary code; and matching the base plate binary code with a point code one by one to obtain the base plate ID code, wherein the one-to-one correspondence represents the correspondence between a binary code and a point code.
[0067] Specifically, the base plate serial number is converted into a binary code, that is, the base plate serial number is represented by a binary code to obtain the corresponding base plate binary code, and the corresponding number of dot codes is determined according to the number of bits of the binary code; the dot code can specifically represent binary "0" and "1" through different shapes, or can represent binary "0" and "1" through different colors, or can represent binary "0" and "1" through different shapes and different colors, or can represent binary "0" and "1" with blank dot codes and non-blank dot codes, and the specific representation method is not limited here.
[0068] In some optional embodiments, the base plate ID code and the crystal oscillator position code are arranged in sequence to obtain the first point code, including: adding a first direction marking point code 110 at the starting position of the base plate ID code, the first direction marking point code 110 indicates the starting position and the first arrangement direction of the base plate ID code; setting a plurality of second direction marking point codes in the corner area of the first area 100, the second direction marking point code indicates the second arrangement direction of the base plate ID code and the crystal oscillator position code after the corner; the base plate ID code and the crystal oscillator position code are arranged in sequence under the indication of the first direction marking point code 110 and the second direction marking point code to obtain the first point code, the first point code includes the first direction marking point code 110, the second direction marking point code, the base plate ID code and the crystal oscillator position code.
[0069] Specifically, the first direction mark point code 110 is added to the starting position of the base plate ID code, that is, the starting position and arrangement direction of the base plate ID code are marked by the first direction mark point code 110. Figure 2 The first direction mark point code 110 is set to two point codes, which can be point codes of different shapes or colors. The arrangement direction of the base plate ID code is indicated according to the arrangement direction of the two point codes. After the base plate ID code is arranged at the corner, the corner direction is indicated by the first mark 122 in the second direction mark point code, the arrangement direction is indicated by the third mark 123, and the corner direction after another corner is indicated by the second mark 121, and the arrangement direction is indicated by the third mark 123 again; the base plate ID code and the crystal oscillator position code are connected end to end and arranged in sequence.
[0070] In some optional embodiments, the first point code also includes a CRC code, and the method further includes: arranging the CRC codes in sequence at the end position of the crystal oscillator position code; adding an end mark point code 130 at the end position of the CRC code, the end mark point code 130 indicates the stop of arranging point codes, and the end mark point code 130 belongs to the first point code.
[0071] Specifically, the CRC (Cyclic Redundancy Check) code is set after the crystal oscillator position code, and is arranged from the end position of the crystal oscillator position code to obtain the CRC code. The specific CRC code is a ten-point code, which is not limited. An end mark point code 130 is added to the end position of the CRC code to indicate that the point code arrangement stops. When scanning and identifying the point code, the scanning and identification stops at the end mark point code 130.
[0072] In some optional embodiments, from Figure 2There are 48 marking positions, starting from the black dot in the upper left corner and ending with the black dot in the lower right corner. These 48 marking positions can be marked or not. When marked, they represent binary "1", and when not marked, they represent binary "0". Or different shapes and colors can be used to represent binary "0" and "1". Figure 3 The first dot code represents binary "1" through a diamond dot code and represents binary "0" through a blank dot code, so that the crystal oscillator number and CRC value represented by the first dot code are 251971414687.
[0073] The base plate ID code is the first 0 to 29 bits of the 48-bit code, which contains the number of the base plate where the crystal oscillator is located. One base plate can produce multiple crystal oscillators.
[0074] The crystal position code is bits 30 to 37 of the 48-bit bit code, and contains the sequence number of the base plate where the crystal is located. The sequence number can be 0-255.
[0075] The CRC code is bits 38 to 47 of the 48-bit bit code, specifically including a 10-bit value obtained by CRC checking the base plate ID code and the crystal oscillator position code.
[0076] The CRC code is calculated as follows:
[0077] The initial value of the CRC code is 0, and it is calculated using the polynomial x8+x2+x1+1 (0x107).
[0078] The base board ID code and crystal oscillator position code are 38 bits in total. If we calculate every 8 bits in a cycle, 40 bits are needed, so the high bits are padded with 0s for a total of 40 bits. The base board ID code is the high bit, and the crystal oscillator position code is the low bit. For example, if the base board ID code is 0x3AAAAAAA and the crystal oscillator position code is 0x9F, then the value of the base board ID code and the crystal oscillator position code combined is 0x3AAAAAAA9F.
[0079] Starting from the lower eight bits, perform XOR processing in sequence: XOR with the CRC value, and the result of XOR determines whether the 8th bit is true. If it is true, shift it left by 1 bit and XOR it with the polynomial 0x107. If it is false, shift it left by one bit.
[0080] The executed CRC result is then XORed with the remaining 9 to 40 bits four times in sequence, and the lower 10 bits of the obtained CRC value are the CRC code.
[0081] In some optional embodiments, Figure 1The shown step 103 includes but is not limited to: converting the performance information into binary code to obtain a performance binary code; matching the performance binary code with the point code one by one to obtain the second point code 500; and / or converting the performance information into first code number information according to a first preset comparison table, the first code number information is represented by a number; converting the first code number information into the first character code according to a second preset comparison table.
[0082] Specifically, by converting the performance information such as the center frequency and load temperature into binary code according to the corresponding conversion rules, and expressing the binary code as the corresponding dot code according to the above rules, 4096 codes are obtained, which are not specifically limited. And / or according to the first preset comparison table, the performance information is converted into the first code number information, and the first code number information is represented by numbers, that is, different center frequencies and load temperatures are represented by different numbers; according to the second preset comparison table, the first code number information is converted into the first character code, so that the corresponding performance information is represented by the first character code. The specific second preset comparison table can be as follows:
[0083] Table 1 The second preset comparison table of center frequency
[0084]
[0085]
[0086] The center frequency specifically represented by each code number (character) in Table 1 is determined by the process and is not specifically limited.
[0087] Table 2 The second preset comparison table of load temperature
[0088]
[0089] The load temperature specifically represented by each code number (character) in Table 2 is determined by the process and is not specifically limited.
[0090] In some optional embodiments, Figure 1 The shown step 104 includes but is not limited to: converting the production information into second code number information according to a third preset comparison table, the second code number information is represented by a number; converting the second code number information into the second character code 400 according to a fourth preset comparison table, the value range of the first character code is a first set, the value range of the second character code 400 is a second set, and the intersection of the first set and the second set does not include an empty set.
[0091] Specifically, refer to Figure 2, the production information such as the production batch number and the production date is converted into the second code information (such as the center frequency character 200 and the load temperature character 300) by comparing with the third preset comparison table, and the second code information is represented by a number; according to the fourth preset comparison table, the second code information is converted into the second character code 400, thereby obtaining the second character code 400 engraved on the third area, and the first character code and the second character code 400 can be the same. The corresponding production information can be obtained by scanning and identifying the second character code 400. The specific fourth preset comparison table can be as follows:
[0092] Table 3 The fourth preset comparison table of factory batch numbers
[0093]
[0094] The factory batch number represented by each code number (character) in Table 3 is determined by the process and is not specifically limited.
[0095] In some optional embodiments, the second dot code 500 is a 4096 code, which is a 12-bit binary number composed of 3 times 4 dot codes, all of which are valid, and does not include direction and CRC check. It actually represents the combination of center frequency and load temperature, and the center frequency and load temperature can be restored through the 4096 code.
[0096] If you need to verify its accuracy, you can use the crystal number to query whether the center frequency and load temperature in the database are the same as the parameters represented by the existing 4096 code.
[0097] The calculation method of 4096 code is as follows:
[0098] 4096 code = center frequency code number * 64 + load temperature code number;
[0099] The center frequency code number is calculated by performing a modulo operation of 4096 code to 64: center frequency code number = 4096 code / 64;
[0100] The calculation method of the load temperature code number is to perform a modulo operation of 4096 code to 64: load temperature code number = 4096 code% 64.
[0101] Reference Figure 4 , the specific number and check value are 251971414687; the character of the center frequency is B; the character of the load temperature is B; the character of the production batch number is A; the binary 4096 code is 101000000000. Figure 5 The specific number and check value are 2022030666; the character of the center frequency is E; the character of the load temperature is K; the character of the production batch number is A; and the 4096 code is 110000000010.
[0102] The implementation of the embodiment of the present invention includes the following beneficial effects: The embodiment of the present invention provides a method for crystal oscillator encoding, including: obtaining parameter information of a crystal oscillator, the parameter information including raw material information, performance information and production information; encoding according to the raw material information and the first encoding rule to obtain a first point code, the first point code is located in the first area 100 of the crystal oscillator; encoding according to the performance information and the second encoding rule to obtain a first character code and / or a second point code 500, the first character code and / or the second point code 500 is located in the second area of the crystal oscillator; encoding according to the production information and the third encoding rule to obtain a second character code 400, the second character code 400 is located in the third area of the crystal oscillator. According to the obtained crystal oscillator parameter information, the corresponding parameter information is converted into a corresponding code, and then the crystal oscillator is encoded, and the code is placed on the surface of the crystal oscillator. When the crystal oscillator parameter information needs to be obtained, the crystal oscillator parameters can be quickly obtained by identifying the crystal oscillator code, the crystal oscillator parameters are easy to obtain, and the crystal oscillator maintenance cost is low.
[0103] Second, refer to Figure 6 The embodiment of the present invention provides a method for crystal oscillator decoding, which is applied to the encoding on the crystal oscillator, the encoding includes a first point code, a first character code, a second point code 500 and a second character code 400, the first point code includes a first direction mark point code 110, a CRC code, a second direction mark point code, a base plate ID code, a crystal oscillator position code and an end mark point code 130, and the crystal oscillator decoding method includes:
[0104] S601, acquiring a surface image of the crystal oscillator, wherein the surface image includes the first dot code, the first character code, the second dot code 500 and the second character code 400;
[0105] S602, identifying the first direction marking point code 110 and the second direction marking point code according to the surface image;
[0106] S603, sequentially identifying the base plate ID code, the crystal oscillator position code, the CRC code and the end mark code 130 on the surface image according to the first direction mark code 110 and the second direction mark code;
[0107] S604, respectively decoding the base plate ID code, the crystal oscillator position code, and the CRC code into corresponding binary codes, and converting the corresponding binary codes to obtain a base plate serial number, a crystal oscillator base sequence number, and a CRC check value;
[0108] S605, identifying the first character code on the surface image, converting the first character code into first code number information according to a second preset comparison table, and decoding the first code number information into performance information according to the first preset comparison table;
[0109] S606, identifying the second character code 400 on the surface image, converting the second character code 400 into second code number information according to a fourth preset comparison table, and decoding the second code number information into production information according to a third preset comparison table.
[0110] The implementation of the embodiment of the present invention includes the following beneficial effects: The embodiment of the present invention provides a method for crystal oscillator decoding, comprising: acquiring a surface image of the crystal oscillator, the surface image including the first dot code, the first character code, the second dot code 500 and the second character code 400; identifying the first direction mark point code 110 and the second direction mark point code according to the surface image; sequentially identifying the base plate ID code, the crystal oscillator position code, the CRC code and the end mark point code 130 on the surface image according to the first direction mark point code 110 and the second direction mark point code; and respectively identifying the base plate ID code, the crystal oscillator position code, the CRC code and the end mark point code 130 on the surface image. The code, the crystal oscillator position code, and the CRC code are decoded into corresponding binary codes, and the corresponding binary codes are converted to obtain the base plate serial number, the crystal oscillator base sequence number, and the CRC check value; the first character code on the surface image is identified, and the first character code is converted into the first code number information according to the second preset comparison table, and the first code number information is decoded into performance information according to the first preset comparison table; the second character code 400 on the surface image is identified, and the second character code 400 is converted into the second code number information according to the fourth preset comparison table, and the second code number information is decoded into production information according to the third preset comparison table. By obtaining the surface image of the crystal oscillator, the base plate serial number, the crystal oscillator base sequence number and CRC check value, performance information, and production information are obtained by identifying the code on the crystal oscillator. The crystal oscillator parameters can be quickly obtained through the crystal oscillator code without removing the crystal oscillator. The crystal oscillator parameters are easy to obtain and the crystal oscillator maintenance cost is low.
[0111] like Figure 7 As shown, in the third aspect, an embodiment of the present invention further provides a computer device, which can be a terminal. The computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, enable the processor to execute any one of the methods for visualizing management of industrial equipment. The processor is used to provide computing and control capabilities to support the operation of the entire computer device. The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium, which, when executed by the processor, enables the processor to execute any one of the methods for visualizing management of industrial equipment. The network interface is used for network communications, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 7The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present disclosure, and does not constitute a limitation on the computer device to which the solution of the present disclosure is applied. The specific computer device may include Figure 7More or less components shown in, or some components are combined, or there are different component arrangements. It should be understood that the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In one embodiment, the processor is used to run a computer program stored in a memory to implement the following steps: obtaining parameter information of a crystal oscillator, the parameter information including raw material information, performance information and production information; encoding according to the raw material information and the first coding rule to obtain a first point code, the first point code is located in the first area 100 of the crystal oscillator; encoding according to the performance information and the second coding rule to obtain a first character code and / or a second point code 500, the first character code and / or the second point code 500 is located in the second area of the crystal oscillator; encoding according to the production information and the third coding rule to obtain a second character code 400, the second character code 400 is located in the third area of the crystal oscillator. According to the obtained crystal oscillator parameter information, the corresponding parameter information is converted into a corresponding code, and then the crystal oscillator is encoded, and the code is placed on the surface of the crystal oscillator. When the crystal oscillator parameter information needs to be obtained, the crystal oscillator parameters can be quickly obtained by identifying the crystal oscillator code. The crystal oscillator parameter acquisition is simple and the crystal oscillator maintenance cost is low.Acquire a surface image of the crystal oscillator, the surface image comprising the first point code, the first character code, the second point code 500 and the second character code 400; identify the first direction mark point code 110 and the second direction mark point code according to the surface image; identify the base plate ID code, the crystal oscillator position code, the CRC code and the end mark point code 130 on the surface image in sequence according to the first direction mark point code 110 and the second direction mark point code; respectively decode the base plate ID code, the crystal oscillator position code and the CRC code into corresponding binary codes, and obtain the base plate serial number, the crystal oscillator base sequence number and the CRC check value after converting the corresponding binary codes; identify the first character code on the surface image, convert the first character code into first code number information according to the second preset comparison table, and decode the first code number information into performance information according to the first preset comparison table; identify the second character code 400 on the surface image, convert the second character code 400 into second code number information according to the fourth preset comparison table, and decode the second code number information into production information according to the third preset comparison table. By acquiring the surface image of the crystal oscillator, the code on the crystal oscillator can be identified to obtain the base plate serial number, crystal oscillator base sequence number and CRC check value, performance information and production information. The crystal oscillator parameters can be quickly obtained through the crystal oscillator code without removing the crystal oscillator. The crystal oscillator parameters are easy to obtain and the crystal oscillator maintenance cost is low.
[0112] It can be seen that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0113] In addition, the embodiment of the present application also discloses a computer program product or a computer program, and the computer program product or the computer program is stored in a computer-readable storage medium. The processor of the computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above method. Similarly, the contents in the above method embodiment are all applicable to the storage medium embodiment, and the functions specifically implemented by the storage medium embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method embodiment.
[0114] It is understood that all or some steps and systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital information processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally contain computer readable instructions, data structures, program modules, or other data in modulated data information such as carrier waves or other transport mechanisms, and may include any information delivery media.
[0115] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the technical field without departing from the purpose of the present invention.
Claims
1. A crystal oscillator encoding method, characterized in that: include: Acquire parameter information of the crystal oscillator, the parameter information including raw material information, performance information and production information; Encoding is performed according to the raw material information and the first encoding rule to obtain a first point code, wherein the first point code is located in a first area of the crystal oscillator; Encoding according to the performance information and the second encoding rule to obtain a first character code and / or a second dot code, wherein the first character code and / or the second dot code is located in a second area of the crystal oscillator; Encoding according to the production information and the third encoding rule to obtain a second character code, wherein the second character code is located in the third area of the crystal oscillator; The encoding according to the raw material information and the first encoding rule to obtain the first point code includes: obtaining the base plate serial number and the crystal oscillator base sequence number of the crystal oscillator according to the raw material information, the base plate serial number represents the serial number of the base plate of the crystal oscillator when the raw materials are put into storage, and the crystal oscillator base sequence number represents the position of the crystal oscillator on the base plate; encoding the base plate serial number to obtain a base plate ID code, and the base plate ID code is a first type of point code; encoding the crystal oscillator base sequence number to obtain a crystal oscillator position code, and the crystal oscillator position code is a second type of point code, and the base plate ID code and the crystal oscillator position code are arranged in sequence to obtain the first point code; The encoding according to the performance information and the second encoding rule to obtain the first character code and / or the second point code includes: converting the performance information into binary code to obtain the performance binary code; matching the performance binary code with the point code one by one to obtain the second point code; and / or converting the performance information into first code number information according to a first preset comparison table, the first code number information being represented by a number; converting the first code number information into the first character code according to a second preset comparison table; The encoding according to the production information and the third encoding rule to obtain the second character code includes: converting the production information into second code number information according to a third preset comparison table, the second code number information is represented by a number; converting the second code number information into the second character code according to a fourth preset comparison table, the value range of the first character code is a first set, the value range of the second character code is a second set, and the intersection of the first set and the second set does not include an empty set.
2. The method of crystal oscillator encoding according to claim 1, characterized in that: The step of encoding the serial number of the base plate to obtain the base plate ID code comprises: Convert the base plate serial number into a binary code to obtain a base plate binary code; The base plate binary code and the point code are matched one by one to obtain the base plate ID code, and the one-to-one correspondence indicates that one binary code corresponds to one point code.
3. The method of crystal oscillator encoding according to claim 1, characterized in that: The base plate ID code and the crystal oscillator position code are sequentially arranged to obtain the first point code, including: Adding a first direction mark point code at the starting position of the base plate ID code, wherein the first direction mark point code indicates the starting position and the first arrangement direction of the base plate ID code; A plurality of second direction marking point codes are arranged in the corner area of the first area, wherein the second direction marking point codes indicate a second arrangement direction of the base plate ID code and the crystal oscillator position code after the corner; The base plate ID code and the crystal oscillator position code are arranged in sequence under the indication of the first direction mark point code and the second direction mark point code to obtain the first point code, and the first point code includes the first direction mark point code, the second direction mark point code, the base plate ID code and the crystal oscillator position code.
4. The method of crystal oscillator encoding according to claim 3, characterized in that: The first point code also includes a CRC code, and the method further includes: Arrange the CRC codes in sequence at the end position of the crystal oscillator position code; An end mark point code is added at the end position of the CRC code, the end mark point code indicates the stop arrangement point code, and the end mark point code belongs to the first point code.
5. A crystal oscillator decoding method, characterized in that: The code applied to the crystal oscillator includes a first point code, a first character code, a second point code and a second character code, the first point code includes a first direction mark point code, a CRC code, a second direction mark point code, a base plate ID code, a crystal oscillator position code and an end mark point code, and the crystal oscillator decoding method includes: Acquire a surface image of the crystal oscillator, wherein the surface image includes the first dot code, the first character code, the second dot code, and the second character code; Identify the first direction marking point code and the second direction marking point code according to the surface image; sequentially identifying the base plate ID code, the crystal oscillator position code, the CRC code, and the end mark code on the surface image according to the first direction mark code and the second direction mark code; Decoding the base plate ID code, the crystal oscillator position code, and the CRC code into corresponding binary codes respectively, and converting the corresponding binary codes to obtain the base plate serial number, the crystal oscillator base sequence number, and the CRC check value; Identify the first character code on the surface image, convert the first character code into first code number information according to a second preset comparison table, and decode the first code number information into performance information according to the first preset comparison table; The second character code on the surface image is identified, the second character code is converted into second code number information according to a fourth preset comparison table, and the second code number information is decoded into production information according to a third preset comparison table.
6. A computer device, wherein: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the crystal oscillator encoding method according to any one of claims 1 to 4 or the steps of the crystal oscillator decoding method according to claim 5 are implemented.
7. A computer-readable storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to execute the crystal oscillator encoding method according to any one of claims 1 to 4 or the crystal oscillator decoding method according to claim 5 when executed by the processor.
