A method, apparatus, system and storage medium for coding

By introducing a wireless communication module into the coding device, wireless connection with electronic devices can be achieved to obtain configuration files and code files, solving the problem of limited wired communication in coding devices, expanding the application scenarios and improving coding efficiency.

CN116132954BActive Publication Date: 2026-11-24FS COM LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211453855.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2026-11-24
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

Existing coding devices rely on wired communication connections, which means they cannot be used in scenarios where there is no computer, no USB data cable, or the computer is not allowed to connect to an external network, thus limiting their application scenarios.

Method used

By introducing a wireless communication module into the coding device, a wireless connection with electronic devices is achieved, configuration files and code files are obtained, and coding is performed according to the hardware configuration parameters of the target coding device.

Benefits of technology

It expands the application scenarios of the coding device, improves coding efficiency, and solves the problem of slow data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116132954B_ABST
    Figure CN116132954B_ABST
Patent Text Reader

Abstract

This application provides a coding method, coding device, system, and storage medium, relating to the field of optical fiber communication. The solution includes: a coding device with a wireless communication module, which establishes a wireless communication connection with an electronic device. Through the wireless communication connection, one or more configuration files are obtained from the electronic device. These configuration files indicate the rules for coding to the device to be coded, with different configuration files indicating different hardware configuration parameters of the device to be coded. A target configuration file matching the target device to be coded is determined from the one or more configuration files. A target code file is obtained from the electronic device through the wireless communication connection. Based on the target configuration file, the target code file is written into the target device to be coded. In this solution, the coding device performs coding by establishing a wireless communication connection with the electronic device, expanding the application scenarios of the coding device and improving coding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical fiber communication, and more particularly to a coding method, coding device, system, and storage medium. Background Technology

[0002] With the development of fiber optic communication technology, the market demand for optical modules is increasing daily. Currently, there are various code writing devices on the market that can write codes to the code-to-be-written device. The code writing device obtains the code file by establishing a wired communication connection with a computer (such as a USB connection), and then writes the code to the code-to-be-written device according to the code file. However, in existing technologies, because the code writing device relies too heavily on a wired communication connection, it cannot be used in scenarios such as when there is no computer, no USB data cable, or the computer does not allow connection to an external network. Summary of the Invention

[0003] This application provides a method, apparatus, system, and storage medium for writing code. In this solution, the writing apparatus performs writing code by establishing a wireless communication connection with an electronic device, thereby expanding the application scenarios of the writing apparatus and improving the efficiency of writing code.

[0004] In a first aspect, embodiments of this application provide a coding method applied to a coding device. The coding device has a wireless communication module, and establishes a wireless communication connection with an electronic device through the wireless communication module. The method includes: obtaining one or more configuration files from the electronic device via the wireless communication connection. The configuration files indicate rules for coding to a device to be coded, and different configuration files indicate different hardware configuration parameters of different devices to be coded. Determining a target configuration file matching the target device to be coded from the one or more configuration files. Obtaining a target code file from the electronic device via the wireless communication connection. Writing the target code file into the target device to be coded according to the target configuration file.

[0005] This application provides a coding method applied to a coding device. Since the coding device has a wireless communication module, it can establish a wireless communication connection with an electronic device. This increases the communication methods between the coding device and the electronic device, thereby expanding the application scenarios for coding to the device to be coded. Through the wireless communication connection, the coding device obtains one or more configuration files from the electronic device and determines a target configuration file within these configuration files. The target configuration file contains target configuration information indicating that coding to the device to be coded is successful. Using the target configuration file, the formal code file obtained from the electronic device is written to the device to be coded. This allows the coding device to determine the target configuration information for coding and to perform coding on the device to be coded. This solves the technical problem of slow data transmission caused by the coding device obtaining transmission data and coding operation instructions through a wireless communication connection with the electronic device, thereby improving coding efficiency.

[0006] In one possible implementation of this application, a target configuration file matching the target code-writing device is determined from one or more configuration files. The method provided in this application includes: obtaining a source code file from the target code-writing device; generating a test code file different from the source code file based on the source code file; sequentially writing the test code file into the target code-writing device according to each configuration file; and determining the configuration file used when the test code file is successfully written into the target code-writing device as the target configuration file.

[0007] In one possible implementation of this application, the code-to-write device includes multiple read-write regions, with the first read-write region having the highest priority. The original code file includes at least a first code file read from the first read-write region. Correspondingly, the test code file includes at least a first test code file that is different from the first code file. Then, a target configuration file matching the target code-to-write device is determined from one or more configuration files. The method provided in this application embodiment further includes: using the configuration file used when the first test code file is successfully written to the first read-write region as the target configuration file.

[0008] In one possible implementation of this application, the multiple read / write areas further include a second read / write area and a third read / write area. The source code file also includes a second code file read from the second read / write area and a third code file read from the third read / write area. Correspondingly, the test code file includes a second test code file that is different from the second code file and a third test code file that is different from the third code file.

[0009] In one possible implementation of this application, before writing the target code file into the target code-to-write device according to the target configuration file, the method provided in this application embodiment further includes: determining a target read-write area from multiple read-write areas where the target code file can be written, the target read-write area including a first read-write area and a read-write area where the corresponding test code file can be written, and correspondingly, writing the target code file into the target code-to-write device according to the target configuration file includes: writing the target code file into the target read-write area according to the target configuration file.

[0010] In one possible implementation of this application, after writing the target code file into the target code-to-write device according to the target configuration file, the method provided in this application embodiment further includes: when the writing device determines that the target code file has been successfully written into the target code-to-write device, sending feedback information to the electronic device via a wireless communication connection, the feedback information being used to report that the target code file has been successfully written into the target code-to-write device.

[0011] In one possible implementation of this application, the writing device determines that the target code file has been successfully written to the target code-writing device. The method provided in this application includes: reading the code file from a target read-write area, where the target read-write area is the area where the writing device writes the target code file. If the read code file matches the target code file, the writing device determines that the target code file has been successfully written to the target code-writing device.

[0012] Secondly, embodiments of this application provide a method for writing code to an optical module, applied to an electronic device, wherein the electronic device and the writing device have a wireless communication connection. The method includes: acquiring one or more configuration files; sending one or more configuration files to the writing device via the wireless communication connection, wherein the configuration files indicate the rules for writing code to the device to be written, and different configuration files indicate different hardware configuration parameters of the device to be written; and, if it is determined that the writing device determines a target configuration file from the one or more configuration files, sending a target code file to the writing device via the wireless communication connection.

[0013] In one possible implementation of this application, the method provided in this application embodiment further includes: receiving first information from the writing device, the first information being used to report that the writing device has successfully determined a target configuration file that matches the device to be written from one or more configuration files.

[0014] In one possible implementation of this application, the method provided in this embodiment further includes: receiving second information from a coding device, the second information being used to indicate that one or more configuration files do not contain a target configuration file, and then re-acquiring one or more first configuration files different from the one or more configuration files; and sending one or more first configuration files to the coding device via a wireless communication connection.

[0015] In one possible implementation of this application, the method provided in this embodiment further includes: receiving feedback information from a writing device via a wireless communication connection, the feedback information indicating that the target code file has been successfully written to the target writing device; and outputting a prompt message indicating successful writing in response to the feedback information.

[0016] In one possible implementation of this application, the object code file and configuration file are obtained by the electronic device from a cloud server in the method provided in the embodiments of this application.

[0017] Thirdly, embodiments of this application provide a code-writing apparatus that can implement the methods in the first aspect or any possible implementation of the first aspect, and therefore can also achieve the beneficial effects of the first aspect or any possible implementation of the first aspect. The code-writing apparatus can be a code-writing device, or an apparatus that supports the code-writing device in implementing the methods in the first aspect or any possible implementation of the first aspect, such as a chip or control circuit applied in the code-writing device. The code-writing apparatus can implement the above methods through software, hardware, or hardware executing corresponding software.

[0018] As an example, this application provides a coding apparatus, which is a coding device or a chip applied in a coding device. The coding apparatus includes: a wireless communication unit, a determining unit, and a writing unit. The wireless communication unit is used to obtain one or more configuration files from an electronic device via a wireless communication connection. The configuration files indicate rules for coding the device to be coded, and different configuration files indicate different hardware configuration parameters of the device to be coded. The determining unit is used to determine a target configuration file that matches the target device to be coded from the one or more configuration files. The wireless communication unit is also used to obtain a target code file from the electronic device via a wireless communication connection. The writing unit is used to write the target code file into the target device to be coded according to the target configuration file.

[0019] In one possible implementation of this application, the wireless communication unit is further configured to obtain the source code file from the target code-to-write device.

[0020] In one possible implementation of this application, the writing unit is further configured to generate a test code file that is different from the original code file based on the original code file, and write the test code file into the target code-to-write device in sequence according to each configuration file.

[0021] In one possible implementation of this application, the determining unit is further configured to determine the configuration file used when the test code file is successfully written into the target code-to-write device as the target configuration file.

[0022] In one possible implementation of this application, the determining unit is further configured to determine a target read-write region that can be written to the target code file from multiple read-write regions, the target read-write region including a first read-write region and a read-write region that can be written to the corresponding test code file.

[0023] In one possible implementation of this application, the wireless communication unit is further configured to send feedback information to the electronic device via a wireless communication connection when the writing device determines that the target code file has been successfully written to the target code-to-write device. The feedback information is used to indicate that the target code file has been successfully written to the target code-to-write device.

[0024] Fourthly, embodiments of this application provide a code-writing apparatus that can implement the methods in the second aspect or any possible implementation of the second aspect, and thus also achieve the beneficial effects of the second aspect or any possible implementation of the second aspect. The code-writing apparatus can be an electronic device, or an apparatus that supports the implementation of the methods in the second aspect or any possible implementation of the second aspect with an electronic device, such as a chip or control circuit applied in an electronic device. The code-writing apparatus can implement the above methods through software, hardware, or hardware executing corresponding software.

[0025] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform a code-writing method as described in any of the possible implementations of the first aspect.

[0026] Sixthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform a code-writing method as described in any of the possible implementations of the second aspect.

[0027] In a seventh aspect, embodiments of this application provide a computer program product including instructions that, when executed on a computer, cause the computer to perform a coding method described in the first aspect or various possible implementations of the first aspect.

[0028] Eighthly, embodiments of this application provide a computer program product including instructions that, when executed on a computer, cause the computer to perform a coding method described in the second aspect or various possible implementations of the second aspect.

[0029] Ninthly, embodiments of this application provide a coding apparatus for implementing various methods in various possible designs of the first aspect or any aspect of the first aspect. The coding apparatus may be the coding device described above, or an apparatus containing the coding device, or a component (e.g., a chip) applied in the coding device.

[0030] In a tenth aspect, embodiments of this application provide a code-writing apparatus for implementing various methods in various possible designs of the second aspect or any of the second aspects described above. The code-writing apparatus may be the aforementioned electronic device, an apparatus containing the aforementioned electronic device, or a component (e.g., a chip) applied in an electronic device.

[0031] The code-writing apparatus described in the ninth or tenth aspect includes modules and units that implement the methods described above. These modules and units can be implemented in hardware, software, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions described above.

[0032] Eleventhly, embodiments of this application provide a chip including a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run computer programs or instructions to implement a coding method described in the first aspect or various possible implementations of the first aspect. The communication interface is used to communicate with other modules outside the chip.

[0033] In a twelfth aspect, embodiments of this application provide a chip including a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run computer programs or instructions to implement a coding method described in the second aspect or various possible implementations of the second aspect. The communication interface is used to communicate with other modules outside the chip.

[0034] In a thirteenth aspect, embodiments of this application provide a coding system, which includes a coding device, an electronic device, and a coding device to be coded. The electronic device and the coding device have a wireless communication connection. The coding device to be coded establishes a connection with the coding device through the coding channel of the coding device. The coding device is used to execute a coding method described in the first aspect or various possible implementations of the first aspect, and the electronic device is used to execute a coding method described in the second aspect or various possible implementations of the second aspect. Attached Figure Description

[0035] Figure 1 An architecture diagram of a coding system provided in this application embodiment;

[0036] Figure 2 This is a schematic diagram of a coding device provided in an embodiment of this application;

[0037] Figure 3 An interactive schematic diagram of a coding method provided in an embodiment of this application;

[0038] Figure 4 An interactive schematic diagram illustrating another coding method provided in an embodiment of this application;

[0039] Figure 5 A schematic diagram of the structure of a code-to-write device partition provided in an embodiment of this application;

[0040] Figure 6 This is a schematic diagram of a code writing device provided in an embodiment of this application. Detailed Implementation

[0041] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0042] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or sets of devices.

[0043] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0044] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0045] Optical modules, as a crucial component of fiber optic communication, are optoelectronic devices that perform photoelectric and electro-optic conversion. Operating at the physical layer, optical modules consist of an optical receiver module, an optical transmitter module, an integrated optical transceiver module, and an optical repeater module. Compared to other data transmission methods, using optical modules offers advantages such as large transmission capacity, low transmission loss, and strong interference resistance. Due to the diverse interface types of optical modules from different manufacturers, standardization of interface types, installation, and functions is necessary to address interoperability issues; this is known as a MultiSource Agreement (MSA). A common MSA is the SFF-8472 protocol, which specifies module identification, manufacturer information, and digital diagnostic and monitoring functions for the optical module. This information is stored in a standard memory structure, which instruments access via a standard I2C (Inter-Integrated Circuit) interface. By writing code to the optical module, the SFF-8472 protocol-related content can be written into the I2C memory.

[0046] In existing technologies, the coding device establishes a wired communication connection (e.g., a Universal Serial Bus (USB) communication connection) with an electronic device (such as a computer). The electronic device acquires the code file, sends it to the coding device, and controls the coding device to write the code file into the device to be coded, such as an optical module. Furthermore, the electronic device verifies whether the code file written to the device by the coding device matches the code file sent to the coding device by the electronic device. However, because the wired communication connection between the coding device and the electronic device is limited in usage scenarios, situations may arise where the coding device cannot write code to the optical module if there is no computer, data cable, or the computer is not allowed to connect to an external network.

[0047] Therefore, the solution provided in this application is a method, device, system and storage medium for writing code. In this solution, the writing device performs writing code by establishing a wireless communication connection with an electronic device, which expands the application scenarios of the writing device and improves the efficiency of writing code.

[0048] To illustrate the technical solution described in this application, specific embodiments are provided below.

[0049] like Figure 1 As shown, Figure 1 This is an architectural diagram of a coding system provided in an embodiment of this application. The system includes: a coding device 100, an electronic device 200, and a coding device 300 to be coded.

[0050] The writing device 100 can be a device used to write code to the writing device 300, such as a code writer. The electronic device 200 can be a device such as a mobile phone or a computer. The writing device 300 can support an optical module that allows the writing device 100 to write code files to the writing device 300; however, this embodiment does not impose specific limitations on this.

[0051] As one possible implementation, the electronic device 200 can be a mobile phone or a computer. Since mobile phones and computers run different operating systems, the configured software needs to be compatible with the operating system. As an example, the electronic device 200 can be a mobile phone running an Android or iOS operating system. This embodiment provides a mobile application software: the mobile phone connects wirelessly to the coding device 100 via the app software to interact with it, allowing for convenient direct operation of the coding device 100 for coding on the mobile phone. As another example, the electronic device 200 can be a computer running a Windows or macOS operating system. This embodiment provides a computer application software: the computer connects wirelessly to the coding device 100 via the application software to interact with it.

[0052] The writing device 100 can establish a connection with the device to be written 300 through the writing channel in the writing device 100, thereby realizing the writing of code to the device to be written 300.

[0053] The coding device 100 and the electronic device 200 can establish a wireless communication connection, which facilitates the mutual data transmission between them. For example, the coding device 100 can use this wireless communication connection to obtain code files and at least one set of configuration information for different coding devices from the electronic device 200. Alternatively, the coding device can use this wireless communication connection to send feedback to the electronic device 200 regarding successful coding and the existence of matching configuration information, etc.

[0054] As an example, the contents of the configuration file involved in this application embodiment are shown in Table 1. Of course, the form of the contents of the configuration file described in this application embodiment is not limited.

[0055] Table 1 contains the configuration file.

[0056]

[0057] As an example, the wireless communication connection may be a Bluetooth connection, a Wi-Fi (Wireless Fidelity) connection, or an NFC (Near Field Communication) connection, and this application embodiment does not limit this.

[0058] Optional, such as Figure 2 As shown, Figure 2 This is a schematic diagram of a coding device 100 provided in an embodiment of this application. The coding device 100 includes a wireless communication module, a coding channel, a storage module, and a processing module. The processing module is connected to the wireless communication module, the coding channel, and the storage module. The wireless communication module supports the coding device 100 in establishing wireless communication connections with other devices (such as electronic device 200). The coding channel supports the coding device 100 in connecting with a device 300 to be coded. For example, the wireless communication module can be used to receive data transmitted by other devices, such as receiving code files or configuration files transmitted by electronic device 200. The wireless communication module can also be used to send data to other devices, such as sending target information to electronic device 200, or sending code files to be written into the device 300.

[0059] For example, the wireless communication modules in the coding device 100 and the electronic device 200 can be Bluetooth chips or Wi-Fi chips, etc. The coding device 100 and the electronic device 200 can establish wireless communication connections through their respective wireless communication modules, such as Bluetooth connections or Wi-Fi connections. This application embodiment does not limit this.

[0060] Before introducing the embodiments of this application, we will first introduce the process of how the writing device writes a code file to the writing device according to the configuration file.

[0061] As an example, before writing the code file to the target device, the coding device first writes the optical module password from the configuration file to the target device; correspondingly, upon receiving the optical module password, the target device sends a message indicating that the writing is complete to the coding device.

[0062] After the coding device writes the optical module password into the coding device, the coding device simulates a power outage and restarts according to the power-on delay in the configuration file and the time interval of the power-on delay.

[0063] After the writing device restarts, it writes the pre-write data from the configuration file to the device to be written; correspondingly, upon receiving the pre-write data, the device to be written sends a writing completion message to the writing device.

[0064] The writing device divides the test code file into multiple data packets according to the number of bytes to be written per page in the configuration file. After writing any data packet to the target device, the writing device then writes the next data packet to the target device according to the page write delay specified in the configuration file at time intervals. Correspondingly, the target device sends a completion message to the writing device after receiving each data packet.

[0065] For example, if the page write byte count in the configuration file is 8 and the test code file size is 32 bytes, the writing device divides the test code file into 4 data packets (data packets 1 to 4). For instance, when the page write delay is 5ms, the writing device first writes data packet 1, and then writes data packet 2 after a 5ms interval until all 4 data packets are written to the writing device.

[0066] The writing device writes the data from the configuration file to the device to be written; correspondingly, upon receiving the data, the device to be written sends a completion message to the writing device. The writing device then writes the data to the writing device, indicating that the writing process to the device to be written is complete.

[0067] It should be noted that the writing completion information returned by the writing device may indicate that the writing device has successfully written the code, or it may indicate that the writing has failed.

[0068] In this application embodiment, the specific structure of the execution subject of the coding method is not particularly limited, as long as communication can be performed according to the coding method of this application embodiment by running a program that records the code of the coding method of this application embodiment. For example, the execution subject of the coding method provided in this application embodiment can be a functional module in a coding device that can call and execute a program, or a coding device applied in a coding device, such as a chip. The execution subject of the coding method provided in this application embodiment can be a functional module in an electronic device that can call and execute a program, or a coding device applied in an electronic device, such as a chip. This application does not limit this. The following embodiments describe a coding method execution subject as a coding device and an electronic device.

[0069] Figure 3 This is an interactive schematic diagram of a coding method provided in an embodiment of this application. To facilitate illustrating the interaction between the coding device and the electronic device, the method includes:

[0070] Step 410: The electronic device sends one or more configuration files to the writing device via a wireless communication connection. Correspondingly, the writing device obtains one or more configuration files from the electronic device via a wireless communication connection.

[0071] The configuration file is used to indicate the rules for writing code to the device to be written. Different configuration files indicate different hardware configuration parameters of the device to be written.

[0072] The description will take the optical module as an example to illustrate the code-writing device. Specifically, the configuration parameters included in the configuration file of each optical module are shown in Table 1, and will not be repeated here.

[0073] As an example, the wireless communication connection established between the coding device and the electronic device can be a Bluetooth connection, or a Wi-Fi or NFC connection. For details on how the coding device and the electronic device establish a wireless communication connection, please refer to the descriptions of how two devices establish a wireless communication connection in existing technologies; these will not be repeated here.

[0074] As an example, when a coding device and an electronic device communicate via Bluetooth, the number of configuration files that can be transmitted between them at any given time is determined by the maximum data packet size supported by the Bluetooth connection and the size of each configuration file. For instance, assuming a data packet size of 150 bytes can be transmitted between the coding device and the electronic device via Bluetooth, and each configuration file is 12-32 bytes in size, the coding device can obtain 4-12 configuration files from the electronic device at a time via Bluetooth. In other words, the electronic device sends 4-12 configuration files to the coding device each time.

[0075] As one possible implementation, the method provided in this application embodiment further includes, before step 410: the electronic device acquiring one or more configuration files.

[0076] The electronic device can obtain configuration files from the cloud, or it can obtain them from an external storage device, such as a portable hard drive. It should be noted that the number of configuration files the electronic device obtains from the cloud can be greater than the number of configuration files sent to the writing device each time.

[0077] Step 420: The writing device determines a target configuration file that matches the target writing device from one or more configuration files.

[0078] It is understandable that, since different code-writing devices may be matched with different configuration files, the code-writing device needs to determine the target configuration file that matches the target code-writing device from multiple configuration files before writing code to the target code-writing device. The method by which the code-writing device determines the target configuration file that matches the target code-writing device can be referred to in the following embodiments, and will not be repeated here.

[0079] In this application, the target configuration file refers to the configuration file that can successfully write the code file into the corresponding target code-writing device.

[0080] Step 430: The coding device obtains the target code file from the electronic device via wireless communication; correspondingly, the electronic device sends the target code file to the coding device via wireless communication.

[0081] The target code file is the code file that the writing device needs to write to the target writing device. For example, the target code file may be an optimized version of the original code file of the target writing device.

[0082] As an example, let's consider a Bluetooth connection as the wireless communication link between the two parties. Assume that via Bluetooth, the size of each data packet that can be transmitted between the coding device and the electronic device is 150 bytes. Typically, the target code file is 256 or 384 bytes in size. Therefore, via Bluetooth, the coding device cannot directly acquire the entire target code file at once; it needs to acquire 2-3 data packets from the electronic device to obtain the complete file. To ensure complete acquisition, the coding device needs to send a feedback message to the electronic device after each acquired data packet, indicating that the data packet has been received. Upon receiving this feedback, the electronic device then sends the next data packet to the coding device. This method avoids packet loss during data transmission from the electronic device to the coding device.

[0083] In one possible implementation of this application, the target code file can be sent by the electronic device to the writing device based on a request from the writing device. For example, if the writing device determines that a target configuration file matches the target device to be written, it sends first information to the electronic device. The first information is used to report that the writing device has successfully determined a target configuration file that matches the target device from one or more configuration files. Correspondingly, if the electronic device receives the first information from the writing device and determines that the writing device has determined the target configuration file, it sends the target code file back to the writing device. Alternatively, it can be considered that the writing device sends first information to the electronic device, which is used to request the electronic device to send the target code file.

[0084] The electronic device can obtain the target code file from the cloud or from an external storage device, such as a portable hard drive.

[0085] In another possible implementation of this application, the target code file can also be actively sent by the electronic device to the writing device. For example, the electronic device may send the target code file to the writing device incidentally while sending one or more configuration files. It is understood that the order in which the electronic device sends the target code file and configuration files to the decoding device is not limited. In this case, steps 410 and 430 can be executed simultaneously, or step 430 can occur before step 410.

[0086] Step 440: The writing device writes the target code file into the target writing device according to the target configuration file.

[0087] Typically, the target code-writing device supports a limited number of bytes that the writing device can write at one time, which is much smaller than the size of the target code file. When the writing device and the electronic device transmit the code file via a wireless communication connection, such as Bluetooth, the transmission time is longer than wired communication. If the electronic device is responsible for controlling the writing device to write the code to the target code-writing device, it will increase the writing time. Therefore, this application provides a writing method: the electronic device requests data from the cloud, sends the target code file to the writing device first, and then the writing device writes the code to the target code-writing device. This method solves the technical problem of slow data transmission when the writing device and the electronic device transmit code files via wireless communication, thereby improving the efficiency of writing.

[0088] For example, if the target configuration file specifies a page write size of 8 bytes, this means the target write device is allowed to write 8 bytes at a time. Therefore, if the target code file is 384 bytes in size, due to the page write size limitation in the target configuration file, the write device will divide the 384-byte target code file into 48 file data packets, each 8 bytes in size. The write device will then write these 48 file data packets sequentially into the target write device. Correspondingly, the target write device sends feedback information to the write device each time it receives a file data packet to confirm that the write device has written the file data packet. In this way, packet loss can be avoided when the write device writes one of the file data packets of the target code file into the target write device.

[0089] This application provides a coding method applied to a coding device. Since the coding device has a wireless communication module, it can establish a wireless communication connection with an electronic device. This increases the communication methods between the coding device and the electronic device, thereby expanding the application scenarios for coding to the device to be coded. Through the wireless communication connection, the coding device obtains one or more configuration files from the electronic device and determines a target configuration file within these configuration files. The target configuration file contains target configuration information indicating that coding to the device to be coded is successful. Using the target configuration file, the formal code file obtained from the electronic device is written to the device to be coded. This allows the coding device to determine the target configuration information for coding and to perform coding on the device to be coded. This solves the technical problem of slow data transmission caused by the coding device obtaining transmission data and coding operation instructions through a wireless communication connection with the electronic device, thereby improving coding efficiency.

[0090] In one possible embodiment of this application, prior to step 420, the method provided in this application further includes: if one or more configuration files do not contain a target configuration file, the coding device sends second information to the electronic device; correspondingly, the electronic device, via a wireless communication connection, retransmits one or more first configuration files to the coding device after receiving the second information from the coding device and determining that one or more configuration files do not contain a target configuration file.

[0091] The contents of the first configuration file and the configuration file are different. It is understandable that if the coding device determines that the first configuration file does not contain the target configuration file, it will continue to send information to the electronic device to obtain other configuration files that differ from the first configuration file, until the coding device determines the target configuration file.

[0092] In one possible embodiment of this application, step 420 above includes the following steps in the method provided in the embodiments of this application:

[0093] Step 4201: The writing device obtains the original code file from the target writing device.

[0094] The original code file is the original code file stored in the target code-writing device.

[0095] Step 4202: The coding device generates a test code file that is different from the original code file based on the original code file.

[0096] The test code file can be smaller than the original code file, or it can be the same size as the original code file.

[0097] Typically, when the target code-writing device can only write a limited number of bytes at a time, and this size is much smaller than the original code file's size, the code-writing device generates a test code file with data smaller than the original code file, based on a selected region from the original code file. For example, if the acquired original code file contains 384 (128*3) bytes, the code-writing device can generate a test code file of 96 (32*3) bytes. This reduces the size of the test code file.

[0098] It should be explained that the code writing device generates a test code file that is different from the read / write area by selecting a portion of the original code file.

[0099] As an example, the format of the source code file described herein and the test file described below is not limited in this embodiment of the application; the content of the source code file and the test file can be tables. For example, refer to the source code file in Table 2 and the test code file in Table 3.

[0100] Table 2 Contents of the source code file

[0101] byte range 0 1 2 3 4 5 6 7 8 9 A B C D E F 000~015 03 04 07 00 00 00 02 00 00 00 00 01 0D 00 0A 64 016~031 37 37 00 00 43 49 53 43 4F 2D 46 49 4E 49 53 41 032~049 52 20 20 20 00 00 90 65 46 54 4C 46 31 33 31 38 ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 112~127 12 17 87 00 00 00 00 00 00 00 00 00 03 BA 8E 7E ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 367~383 ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...

[0102] Table 3 contains the test code file.

[0103] byte range 0 1 2 3 4 5 6 7 8 9 A B C D E F 000~015 04 05 08 01 01 01 03 01 01 01 01 02 0E 01 0B 65 016~031 38 38 01 01 44 50 54 44 50 2E 47 50 4F 50 54 42

[0104] For example, the original code file is 384 bytes in size, and the test code file generated based on the original code file is 32 bytes in size. Both the original code file and the test code file use hexadecimal notation to store data. As an example, the writing device adds one bit to each byte of the original code file, which has a byte range of 000 to 031, to generate a test code file that is different from the original code file. The content of the test code file and its byte position are shown in Table 2. In this way, it can be ensured that every piece of data in the test code file is different from every piece of data in the original code file, thus better detecting whether the test code file has been successfully written to the writing device.

[0105] Step 4203: The writing device sequentially writes the test code file into the target writing device according to each configuration file.

[0106] Step 4204: When the writing device successfully writes the test code file into the target writing device, the configuration file used is determined to be the target configuration file.

[0107] It should be explained that the method by which the writing device determines whether the test code file has been successfully written can be referred to in the following embodiment, and will not be repeated here.

[0108] For example, suppose the writing device obtains configuration files 1 through 4 from the electronic device. Following the aforementioned writing process, the writing device first uses configuration file 1 to write the test code file to the target device. If it is determined that writing the test code file using configuration file 1 fails, the writing device selects configuration file 2 to write the test code file to the target device. If writing using configuration file 2 succeeds, configuration file 2 is used as the target configuration file. If configuration file 2 fails to write the test code file, the writing device continues to try configuration file 3. If it is determined through the above method that none of configuration files 1 through 4 can successfully write the test code file to the target device, the device reports to the electronic device that no matching target configuration file has been found from one or more configuration files. The device then obtains other configuration files from the electronic device, such as configuration files 5 through 9, and then sequentially checks from configuration files 5 through 9 to determine if a target configuration file exists.

[0109] In one possible embodiment of this application, the code writing device includes multiple read-write areas, wherein the first read-write area among the multiple read-write areas has the highest priority; the original code file includes a first code file read from the first read-write area, and correspondingly, the test code file includes a first test code file that is different from the first code file. Then, the above step 4204 in the method provided in the embodiment of this application includes the following steps: the configuration file used by the code writing device when successfully writing the first test code file into the first read-write area is used as the target configuration file.

[0110] In one possible embodiment of this application, the plurality of read-write areas further include a second read-write area and a third read-write area; correspondingly, the original code file also includes a second code file read from the second read-write area and a third code file read from the third read-write area; correspondingly, the test code file includes a second test code file that is different from the second code file and a third test code file that is different from the third code file.

[0111] As an example, such as Figure 5 The diagram shows a partitioned structure of a code-to-write device, including a first read / write area, a second read / write area, and a third read / write area.

[0112] It's important to explain the structure of the partitions in the code-writing device, using the SPF-8472 optical module communication protocol as an example: The first read / write area stores the identifier module type, connector type, optical module number, support items for digital monitoring functions, and supplier fields, among others. The supplier fields can be used for verification data and checking module compatibility. The second read / write area includes content reserved in revised versions (e.g., SFF-8079). The third read / write area includes user-writable EEPROM (Electrically Erasable Programmable Read Only Memory). The content of the first read / write area is the core of the SPF-8472 communication protocol. Therefore, the code-writing device needs to determine whether the currently used configuration file matches the target configuration file of the target code-writing device by checking whether the first test code file has been successfully written to the first read / write area.

[0113] In another possible implementation of this application, the writing device uses the configuration file that enables the test code file corresponding to each read / write area to be successfully written to the corresponding read / write area as the target configuration file.

[0114] For example, suppose the coding device obtains configuration files 1 through 3 from the electronic device. Following the aforementioned coding process, the coding device writes the first test code file to the first read / write area, the second test code file to the second read / write area, and the third test code file to the third read / write area according to configuration file 1. If it is determined that the first and second test code files are successfully written to the first and second read / write areas using configuration file 1, but the third test code file fails to be successfully written to the third read / write area, then configuration file 1 is not the target configuration file. Then, the coding device writes the first, second, and third test code files to the first, second, and third read / write areas respectively according to configuration file 2. If it is determined that the first, second, and third test code files are successfully written to the first, second, and third read / write areas using configuration file 2, then configuration file 2 is determined to be the target configuration file. The coding device will no longer attempt to use configuration file 3.

[0115] As one possible implementation, the method by which the writing device determines the target configuration file may include: when the writing device writes a first test code file to a first read / write area, obtaining the code file written to the first read / write area from the device to be written; comparing whether the writing device matches the first test code file and the code file written to the first read / write area; if the first test code file matches the code file read from the first read / write area, the writing device can determine that the configuration file is the target configuration file.

[0116] In one possible embodiment of this application, prior to step 440 above, the method provided in this application further includes the following step: the writing device determines a target read-write area from multiple read-write areas where a target code file can be written, the target read-write area including a first read-write area and a read-write area where a corresponding test code file can be written. Correspondingly, step 440 in the method provided in this application includes: the writing device writing the target code file into the target read-write area according to the target configuration file. By verifying whether multiple read-write areas are target read-write areas, the writing device can confirm the file content that needs to be written into the target code file, thereby writing the target code file into the corresponding target read-write area.

[0117] Typically, the writing device performs writing operations on the first read / write area of ​​the device to be written, i.e., the first read / write area is the target read / write area. Optionally, the writing device also needs to determine whether the second and third read / write areas are the target read / write areas, in order to determine whether to write the contents of the target code file into the second and / or third read / write areas.

[0118] As one possible implementation, the method by which the writing device determines the target read / write area can be as follows: the writing device writes a second test code file and a third test code file into the second read / write area and the third read / write area of ​​the target write device, respectively, according to the target configuration file; the writing device obtains the code files of the second read / write area and the third read / write area from the write device; the writing device compares whether the second test code file is consistent with the code file of the corresponding area written to the second test code file, and compares whether the third test code file is consistent with the code file of the corresponding area written to the third test code file; the writing device determines the target read / write area from multiple read / write areas where the target code file can be written, and the target read / write area is the read / write area where the corresponding two code files are consistent.

[0119] As an example, the coding device writes a second test code file and a third test code file to the second and third read / write areas respectively, according to the target configuration file. After coding is completed, the coding device obtains the code files for the second and third read / write areas respectively. By comparing the second test code file with the code file of the corresponding area written to the second test code file, the coding device determines that if they are consistent, the second read / write area is the target area to be read / written. By comparing the third test code file with the code file of the corresponding area written to the third test code file, the coding device determines that if they are inconsistent, the third read / write area is not the target area to be read / written.

[0120] In one possible embodiment of this application, after step 440 above, the method provided in this application embodiment further includes the following steps: when the writing device determines that the target code file has been successfully written to the target writing device, the writing device sends feedback information to the electronic device through a wireless communication connection. The feedback information is used to report that the target code file has been successfully written to the target writing device.

[0121] As an example, after determining that the target code file has been successfully written to the target writing device, the writing device also needs to send feedback information to the electronic device to indicate that the target code file has been successfully written. Optionally, after receiving the feedback information, the electronic device can also send a prompt message to the user on the electronic device's display screen to indicate that the target code file has been successfully written to the target writing device.

[0122] In one possible embodiment of this application, the writing device determines that the target code file has been successfully written to the target code-writing device. The method provided in this embodiment includes: the writing device reading the code file from the target read-write area, the target read-write area being the area where the writing device writes the target code file; if the code file read by the writing device is consistent with the target code file, the writing device determines that the target code file has been successfully written to the target code-writing device.

[0123] As an example, when the target read / write area includes a first read / write area and a second read / write area, the writing device reads code files from the first and second read / write areas respectively. The writing device determines that the target code file has been successfully written to the target writing device by determining whether the code file read from the first read / write area matches the code file to be written to the first read / write area in the target code file, and by determining whether the code file read from the second read / write area matches the code file to be written to the second read / write area in the target code file. If the code file read from the first read / write area matches the target code file, and the code file read from the second read / write area matches the target code file, the writing device determines that the target code file has been successfully written to the target writing device.

[0124] In one possible embodiment of this application, after step 440 above, the method provided in this application further includes: an electronic device receiving feedback information from a writing device via a wireless communication connection, the feedback information being used to indicate that the target code file has been successfully written to the target writing device. In response to the feedback information, the electronic device outputs a prompt indicating successful writing.

[0125] In one possible embodiment of this application, the object code file and configuration file are obtained by the electronic device from a cloud server in the method provided in this application embodiment.

[0126] The above mainly describes the solutions of the embodiments of this application from the perspective of interaction between various network elements. It is understood that each device, such as a coding device or electronic device, includes corresponding structures and / or software modules to perform the above functions in order to achieve them. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0127] This application embodiment can divide functional units according to the above-described method example coding device and electronic device. For example, each function can be divided into separate functional units, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0128] The above combination Figures 1 to 5 The methods described in the embodiments of this application have been explained. The apparatus for executing the above methods provided in the embodiments of this application is described below. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced in each other. The code-writing apparatus provided in the embodiments of this application can execute the steps in the above code-writing method performed by the code-writing apparatus and the electronic device, respectively.

[0129] When using integrated units Figure 6 The above embodiments illustrate a coding device, which can be a coding device or a device applied in a coding device, such as a chip or processing circuit. The coding device may include: a wireless communication unit 510, a confirmation unit 520, and a coding unit 530.

[0130] In one alternative implementation, the writing device may further include a storage unit for storing the program code and data of the writing device.

[0131] In one example, the coding device is a coding device or a chip applied within a coding device. The device includes a wireless communication unit for acquiring one or more configuration files from an electronic device via a wireless communication connection. These configuration files indicate the rules for coding the device to be coded, with different configuration files indicating different hardware configuration parameters for different devices. A determination unit is used for the coding device to determine a target configuration file matching the target device from the one or more configuration files. The wireless communication unit is also used for the coding device to acquire a target code file from the electronic device via a wireless communication connection. A writing unit is used for the coding device to write the target code file into the target device according to the target configuration file.

[0132] In one possible implementation of this application, the wireless communication unit is further configured to allow the writing device to obtain the original code file from the target writing device.

[0133] In one possible implementation of this application, the writing unit is further configured to generate a test code file that is different from the original code file based on the original code file, and write the test code file into the target code writing device in turn according to each configuration file.

[0134] In one possible implementation of this application, the determining unit is further configured to determine the configuration file used by the writing device when it successfully writes the test code file into the target writing device as the target configuration file.

[0135] In one possible implementation of this application, the determining unit is further configured to determine, from multiple regions to be read and written, a target region to be read and written that can be written to the target code file, the target region to be read and written including a first region to be read and written and a region to be read and written that can be written to the corresponding test code file.

[0136] In one possible implementation of this application, the wireless communication unit is further configured to send feedback information to the electronic device via a wireless communication connection when the writing device determines that the target code file has been successfully written to the target code-to-write device. The feedback information is used to indicate that the target code file has been successfully written to the target code-to-write device.

[0137] The processing unit 520 may be a processor or controller, such as a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, etc. The storage module may be a memory.

[0138] Optional, such as Figure 2 The structure of the code writing device 100 shown may further include a memory, which may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a communication line. Alternatively, the memory may be integrated with the processor.

[0139] The memory stores computer execution instructions for implementing the scheme of this application, and the execution is controlled by the processor. The processor executes the computer execution instructions stored in the memory, thereby implementing the code writing method provided in the following embodiments of this application.

[0140] Optionally, the computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.

[0141] On the one hand, a computer-readable storage medium is provided, in which instructions are stored, which, when executed, implement as follows: Figure 3 or Figure 4 The function performed by the coding device.

[0142] On the one hand, a computer program product including instructions is provided, wherein the computer program product includes instructions that, when executed, implement such... Figure 3 or Figure 4 The function performed by the coding device.

[0143] On one hand, embodiments of this application provide a chip used in a coding device. The chip includes at least one processor and a communication interface, with the communication interface coupled to the at least one processor. The processor is used to execute instructions to achieve, for example... Figure 3 or Figure 4 The function performed by the coding device.

[0144] This application provides a coding system, which includes a coding device, an electronic device, and a coding device to be coded. The electronic device and the coding device have a wireless communication connection. The coding device to be coded establishes a connection with the coding device through the coding channel of the coding device. The coding device is used to perform... Figure 3 or Figure 4 The function performed by the coding device, the electronic device used to perform Figure 3 or Figure 4 Functions performed by electronic devices.

[0145] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).

[0146] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, the disclosure, and the appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.

[0147] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.

Claims

1. A method of coding, characterized by, The method, applied to a coding device having a wireless communication module, establishes a wireless communication connection between the coding device and an electronic device through the wireless communication module, includes: Through the wireless communication connection, one or more configuration files are obtained from the electronic device. The configuration files are used to indicate the rules for writing code to the code-to-write device. Different configuration files indicate different hardware configuration parameters of the code-to-write device. The code-to-write device includes multiple read-write areas. The first read-write area among the multiple read-write areas has the highest priority. The multiple read-write areas also include a second read-write area and a third read-write area. Obtain the original code file from the target code-to-write device; wherein the original code file includes a first code file read from the first read / write area, a second code file read from the second read / write area, and a third code file read from the third read / write area; Based on the source code file, a test code file different from the source code file is generated; wherein, the test code file includes a first test code file different from the first code file, a second test code file different from the second code file, and a third test code file different from the third code file; The test code file is written into the target code-to-write device in sequence according to each of the configuration files; The configuration file used when the first test code file is successfully written to the first read / write area is used as the target configuration file; The target code file is obtained from the electronic device via the wireless communication connection. According to the target configuration file, the target code file is written into the target code-to-write device; When the writing device determines that the target code file has been successfully written to the target code writing device, it sends feedback information to the electronic device through the wireless communication connection. The feedback information is used to indicate that the target code file has been successfully written to the target code writing device. Before writing the target code file into the target code-to-write device according to the target configuration file, the method further includes: determining a target read-to-write region from the plurality of read-to-write regions where the target code file can be written, wherein the target read-to-write region includes a first read-to-write region and the read-to-write region where a corresponding test code file can be written.

2. The method of claim 1, wherein, The writing device determines that the target code file has been successfully written to the target writing device, including: The code file is read from the target read-write area, which is the area where the writing device writes the target code file; If the read code file matches the target code file, the writing device determines that the target code file has been successfully written to the target code writing device.

3. An apparatus for coding, characterized by include: A wireless communication unit is used to obtain one or more configuration files from an electronic device via a wireless communication connection. The configuration files are used to indicate the rules for writing codes to a code-to-write device. Different configuration files indicate different hardware configuration parameters of different code-to-write devices. The code-to-write device includes multiple read / write areas. The first read / write area among the multiple read / write areas has the highest priority, and the multiple read / write areas also include a second read / write area and a third read / write area. A determining unit is configured to obtain a source code file from a target write-to-code device, the source code file including a first code file read from a first read / write area, a second code file read from a second read / write area, and a third code file read from a third read / write area; generate a test code file different from the source code file based on the source code file, the test code file including a first test code file different from the first code file, a second test code file different from the second code file, and a third test code file different from the third code file; sequentially write the test code file into the target write-to-code device according to each of the configuration files; and use the configuration file used when the first test code file is successfully written to the first read / write area as the target configuration file; The wireless communication unit is also used to obtain a target code file from the electronic device via the wireless communication connection; The writing unit is used to write the target code file into the target code-to-write device according to the target configuration file; The wireless communication unit is further configured to send feedback information to the electronic device via the wireless communication connection when the writing device determines that the target code file has been successfully written to the target code writing device. The feedback information is used to indicate that the target code file has been successfully written to the target code writing device. The determining unit is further configured to: determine a target read-write region from the plurality of read-write regions that can be written to the target code file, wherein the target read-write region includes a first read-write region and the read-write region that can be written to the corresponding test code file.

4. A coding device, comprising a wireless communication module, a coding channel, a storage module, and a processing module, wherein the wireless communication module is used to establish a wireless communication connection between the coding device and an electronic device, the coding channel is used to connect the coding device to a device to be coded, and the storage module stores a computer program, characterized in that, The processing module is used to implement the method as described in any one of claims 1 to 2 when calling and executing the computer program.

5. A coding system, characterized in that, include: The invention comprises a coding device, an electronic device, and a coding device to be written, wherein the electronic device and the coding device have a wireless communication connection, the coding device to be written establishes a connection with the coding device through the coding channel of the coding device, and the coding device is used to implement the method as described in any one of claims 1 to 2.

6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is invoked and executed by the processor, it implements the method as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Optical module, equipment employing optical module and verification method

    CN103413087A

  • Method and device for modifying compatible code of optical module

    CN114900243A

  • Bluetooth card -writing ware

    CN206115446U