Reader-writer device switching method, device and equipment for multi-protocol products

The method and device efficiently manage and switch read/write devices for multi-protocol products by using a configuration library for protocol-adapted devices, enhancing production efficiency through unified protocol switching.

CN118820165BActive Publication Date: 2024-12-06BEIJING HUAAN TIANCHENG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411303082.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-06
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

Existing methods fail to efficiently manage and switch read/write devices for multi-protocol products, leading to frequent replacements and reduced production efficiency.

Method used

A method and device for switching read/write devices in multi-protocol products by selecting and controlling protocol-adapted devices through a configuration library using protocol configuration and switching information, managing devices in a unified manner without frequent replacements.

Benefits of technology

Improves production efficiency by enabling seamless protocol switching and accurate connection to read/write devices, reducing the need for frequent device changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820165B_ABST
    Figure CN118820165B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and equipment for switching read / write devices of a multi-protocol product, which relates to the field of data communication technology. By means of protocol switching, the multi-protocol product can be accurately connected to the read / write device that adapts the protocol at different instruction stages, without the need to frequently replace the read / write devices of different protocols. The method includes: obtaining the protocol configuration information of the chip in the multi-protocol product, the protocol configuration information including the protocol description information and protocol switching information of the chip at different instruction stages; when the multi-protocol product is triggered to switch the protocol, the read / write device of the chip that adapts the protocol at different instruction stages is selected from the configuration library according to the protocol description information, and the configuration library is pre-configured with read / write devices of different protocols; according to the protocol switching information, the chip is controlled to switch between the read / write devices that adapt the protocol at different instruction stages, so that the multi-protocol product performs read / write operations through the read / write device connected after the switch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communication technology, and in particular to a method, device and equipment for switching read / write devices of a multi-protocol product. Background Art

[0002] In the mass production of embedded products, there are many different communication protocols. The choice of these communication protocols depends on the specific needs and design goals of the product. Common communication protocols include but are not limited to I2C, SPI, UTRA or Bluetooth protocols, etc. Each protocol has its specific uses and advantages. In order to cooperate with products with different protocols, it is necessary to use a read-write device that can support the corresponding protocol.

[0003] In the related art, products with different communication protocols require read-write devices of the corresponding protocols. When producing products with I2C protocol, read-write devices with I2C protocol are used, and when producing products with SPI protocol, read-write devices with SPI protocol are used. In other words, each change in the protocol of the product requires the replacement of the read-write device of the corresponding protocol. When facing multi-protocol products, it is necessary to frequently replace the read-write devices of different protocols, which affects the production efficiency of multi-protocol products. Summary of the invention

[0004] In view of this, the present application provides a method, device and equipment for switching read and write devices of a multi-protocol product. The main purpose is to solve the problem that the prior art needs to frequently replace read and write devices of different protocols when facing multi-protocol products, affecting the production efficiency of multi-protocol products.

[0005] According to a first aspect of the present application, a method for switching read / write devices of a multi-protocol product is provided, comprising:

[0006] Acquire protocol configuration information of a chip in a multi-protocol product, wherein the protocol configuration information includes protocol description information of the chip at different instruction stages and protocol switching information;

[0007] When a multi-protocol product is triggered to switch protocols, a read / write device for adapting the chip to the protocol at different instruction stages is selected from a configuration library according to the protocol description information, and the configuration library is pre-configured with read / write devices of different protocols;

[0008] The chip is controlled to switch connections between read-write devices that adapt protocols at different instruction stages according to the protocol switching information, so that the multi-protocol product performs read-write operations through the read-write devices connected after switching.

[0009] Furthermore, before acquiring the protocol configuration information of the chip in the multi-protocol product, the method further includes:

[0010] According to the instruction phase sequence of the chip in the multi-protocol product, obtain the protocol information used by the chip in different instruction phases;

[0011] Accordingly, the obtaining of the protocol configuration information of the chip in the multi-protocol product specifically includes:

[0012] Performing protocol adjustment on the chip in the multi-protocol product according to the protocol information to obtain protocol description information used by the chip in different instruction stages;

[0013] The protocol description information used by the chip in different instruction stages is written into the chip of the multi-protocol product in a script manner according to the instruction stage sequence to obtain the protocol configuration information.

[0014] Furthermore, the protocol description information used by the chip in different instruction stages is written into the chip of the multi-protocol product in a script manner according to the instruction stage sequence to obtain the protocol configuration information, specifically including:

[0015] Switching and configuring the timing of chip access protocol according to the protocol description information used by the chip in different instruction stages, and obtaining timing switching information for controlling chip protocol access;

[0016] According to the protocol description information used by the chip in different instruction stages, the pins of the chip access protocol are switched and configured to obtain the pin switching information for controlling the chip protocol access;

[0017] The timing switching information and the pin switching information are written into the chip of the multi-protocol product by means of a script in accordance with the instruction phase sequence, so as to perform timing switching configuration and pin switching configuration on the chip access protocol through the module parameters in the chip to obtain the protocol configuration information.

[0018] Further, after writing the timing switching information and the pin switching information into the chip of the multi-protocol product in a script in accordance with the instruction phase sequence, so as to perform timing switching configuration and pin switching configuration on the chip access protocol through the module parameters in the chip and obtain the protocol configuration information, the method further includes:

[0019] Query the pin multiplexing status of the protocol used by the chip in adjacent instruction stages according to the timing switching information and the pin switching information;

[0020] If the chip has pin multiplexing information in the protocol used in adjacent instruction stages, the multiplexed pin connection is retained during the pin switching configuration of the chip access protocol according to the pin multiplexing information to obtain updated protocol configuration information.

[0021] Furthermore, after selecting a read / write device whose chip adapts the protocol at different instruction stages in the configuration library according to the protocol description information, the method further includes:

[0022] If the configuration library does not contain a read / write device whose chip adapts the protocol at different instruction stages, an error message is generated to prompt that the configuration library does not contain a read / write device whose chip adapts the protocol at different instruction stages.

[0023] Further, controlling the chip to switch between read / write devices of the protocol adaptation protocol at different instruction stages according to the protocol switching information so that the multi-protocol product performs read / write operations through the read / write device connected after the switching specifically includes:

[0024] Determine the protocol switching timing and protocol switching pin of the read / write device according to the protocol switching information;

[0025] According to the protocol switching timing control chip, the chip disconnects the protocol connection with the read / write device of the previous instruction stage and executes the protocol connection with the read / write device of the next instruction stage, so as to switch the read / write device connected to the chip in the multi-protocol product;

[0026] According to the protocol switching pin control chip, the pin connection is switched while switching the read / write device, so that the multi-protocol product performs read / write operations through the read / write device connected after the switching.

[0027] Further, after controlling the chip to switch between read / write devices that adapt protocols at different instruction stages according to the protocol switching information, the method further includes:

[0028] Obtain personalized information passed by the chip in the next instruction stage; while switching the read-write device connected to the chip in the multi-protocol product, write the personalized information into the program through the read-write device connected after the switch for data assembly to obtain the data result information of the read-write operation performed by the read-write device.

[0029] According to a second aspect of the present application, a read / write device switching device for a multi-protocol product is provided, comprising:

[0030] A first acquisition unit is used to acquire protocol configuration information of a chip in a multi-protocol product, wherein the protocol configuration information includes protocol description information of the chip at different instruction stages and protocol switching information;

[0031] A selection unit, used for selecting a read / write device of the chip adapting the protocol at different instruction stages in a configuration library according to the protocol description information when triggering the multi-protocol product to switch the protocol, wherein the configuration library is pre-configured with read / write devices of different protocols;

[0032] The switching unit is used to control the chip to switch between read-write devices that adapt to the protocol at different instruction stages according to the protocol switching information, so that the multi-protocol product performs read-write operations through the read-write device connected after the switch.

[0033] Furthermore, the device also includes:

[0034] A second acquisition unit is used to acquire protocol information used by the chip in different instruction stages according to the instruction stage sequence of the chip in the multi-protocol product before acquiring the protocol configuration information of the chip in the multi-protocol product;

[0035] Accordingly, the first acquiring unit includes:

[0036] An adjustment module, used to perform protocol adjustment on the chip in the multi-protocol product according to the protocol information, so as to obtain protocol description information used by the chip in different instruction stages;

[0037] The writing module is used to write the protocol description information used by the chip in different instruction stages into the chip of the multi-protocol product in a script manner according to the instruction stage sequence to obtain protocol configuration information.

[0038] Furthermore, the writing module is specifically used for:

[0039] Switching and configuring the timing of chip access protocol according to the protocol description information used by the chip in different instruction stages, and obtaining timing switching information for controlling chip protocol access;

[0040] According to the protocol description information used by the chip in different instruction stages, the pins of the chip access protocol are switched and configured to obtain the pin switching information for controlling the chip protocol access;

[0041] The timing switching information and the pin switching information are written into the chip of the multi-protocol product by means of a script in accordance with the instruction phase sequence, so as to perform timing switching configuration and pin switching configuration on the chip access protocol through the module parameters in the chip to obtain the protocol configuration information.

[0042] Furthermore, the first acquiring unit further includes:

[0043] A query module, used to write the timing switching information and the pin switching information into the chip of the multi-protocol product in the form of a script in the order of the instruction phases, so as to perform timing switching configuration and pin switching configuration on the chip access protocol through the module parameters in the chip, and after obtaining the protocol configuration information, query the pin multiplexing of the protocol used by the chip in adjacent instruction phases according to the timing switching information and the pin switching information;

[0044] The update module is used to retain the multiplexed pin connection during the pin switching configuration of the chip access protocol according to the pin multiplexing information if the protocol used by the chip in the adjacent instruction stage has pin multiplexing information, so as to obtain updated protocol configuration information.

[0045] Furthermore, the device also includes:

[0046] A generating unit is used for generating an error message to prompt that after selecting a read / write device for adapting the protocol of the chip to different instruction stages in the configuration library according to the protocol description information, if the read / write device for adapting the protocol of the chip to different instruction stages does not exist in the configuration library, to prompt that the read / write device for adapting the protocol of the chip to different instruction stages does not exist in the configuration library.

[0047] Furthermore, the switching unit is specifically used for:

[0048] Determine the protocol switching timing and protocol switching pin of the read / write device according to the protocol switching information;

[0049] According to the protocol switching timing control chip, the chip disconnects the protocol connection with the read / write device of the previous instruction stage and executes the protocol connection with the read / write device of the next instruction stage, so as to switch the read / write device connected to the chip in the multi-protocol product;

[0050] According to the protocol switching pin control chip, the pin connection is switched while switching the read / write device, so that the multi-protocol product performs read / write operations through the read / write device connected after the switching.

[0051] Furthermore, the device also includes:

[0052] A third acquisition unit is used to acquire the personalized information transmitted by the chip in the next instruction phase after controlling the chip to switch between the read-write devices of the protocol adaptation protocols in different instruction phases according to the protocol switching information;

[0053] The assembly unit is used to write the personalized information into the program for data assembly through the read-write device connected after the switch while switching the read-write device connected to the chip in the multi-protocol product, so as to obtain the data result information of the read-write operation performed by the read-write device.

[0054] According to a third aspect of the present application, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for switching read and write devices of the multi-protocol product described in the first aspect are implemented.

[0055] According to a fourth aspect of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the read / write device switching method of the multi-protocol product described in the first aspect are implemented.

[0056] By means of the above technical scheme, the present application provides a method, device and equipment for switching read / write devices of a multi-protocol product. Compared with the current existing method of frequently changing read / write devices of different protocols to realize the switching of read / write devices, the present application selects read / write devices of different instruction phase adaptation protocols in the configuration library in advance through the protocol description information when triggering the multi-protocol product to switch protocols, and controls the chip to switch between the read / write devices of different instruction phase adaptation protocols through the protocol switching information, so that the multi-protocol product can perform read / write operations through the read / write devices connected after the switching. This process can manage the read / write devices of different protocols in a unified manner, and allow the multi-protocol product to be accurately connected to the read / write devices of different instruction phase adaptation protocols through protocol switching, without the need to frequently change the read / write devices of different protocols, thereby improving the production efficiency of the multi-protocol product.

[0057] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0059] Figure 1 It is a flowchart of a method for switching read / write devices of a multi-protocol product provided by an embodiment of the present application;

[0060] Figure 2 yes Figure 1 A schematic flow chart of a specific implementation of step 101;

[0061] Figure 3 yes Figure 1 A schematic flow chart of a specific implementation of step 103;

[0062] Figure 4 It is a flowchart of a method for switching read / write devices of a multi-protocol product provided by another embodiment of the present application;

[0063] Figure 5 It is a structural block diagram of a method for switching read / write devices of a multi-protocol product provided by another embodiment of the present application;

[0064] Figure 6 It is a structural schematic diagram of a read-write device switching device of a multi-protocol product in one embodiment of the present application;

[0065] Figure 7 It is a schematic diagram of the device structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0066] Now the content of the present invention will be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and thus implement the content of the present invention, rather than implying any limitation on the scope of the present invention.

[0067] As used herein, the term "including" and variations thereof are to be interpreted as open-ended terms meaning "including but not limited to." The term "based on" is to be interpreted as "based, at least in part, on." The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment." The term "another embodiment" is to be interpreted as "at least one other embodiment."

[0068] In the related art, products with different communication protocols require read-write devices of the corresponding protocols. When producing products with I2C protocol, read-write devices with I2C protocol are used, and when producing products with SPI protocol, read-write devices with SPI protocol are used. In other words, each change in the protocol of the product requires the replacement of the read-write device of the corresponding protocol. When facing multi-protocol products, it is necessary to frequently replace the read-write devices of different protocols, which affects the production efficiency of multi-protocol products.

[0069] In order to solve this problem, this embodiment provides a method for switching read / write devices of a multi-protocol product. Figure 1 As shown, the method is applied to the server corresponding to the multi-protocol product, and includes the following steps:

[0070] 101. Obtain protocol configuration information of chips in a multi-protocol product.

[0071] In embedded products, the communication methods of multiple chip components usually include serial communication and parallel communication. In the serial communication method, commonly used communication protocols include UART, SPI and I2C, while parallel communication transmits multiple data bits at the same time, which is often used in high-speed or large-capacity data exchange scenarios. Taking I2C as an example, the I2C protocol is a very popular serial communication protocol that uses two signal lines: a data line (SDA) and a clock line (SCL). This communication protocol supports multi-master and multi-slave communication methods and is suitable for connecting low-speed peripheral devices such as sensors, EEPROMs, etc. It allows multiple slave devices to share the same set of buses, and each device is accessed through a unique address, so that an effective data transmission channel can be established between different chips.

[0072] In this embodiment, the multi-protocol product is usually divided into multiple instruction stages, where the instruction stage is equivalent to an instruction cycle of the chip, that is, the process of executing an instruction, including fetching instructions, analyzing instructions, and executing instructions. Different instruction stages require different protocols. For example, the chip uses protocol A in the first instruction stage and protocol B in the second instruction stage.

[0073] Considering that the switching of different instruction stages will trigger protocol switching, the corresponding protocol switching process faces the configuration of protocol configuration and protocol switching. Specifically, the protocol information used by the chip in different instruction stages in the multi-protocol product can be obtained through product orders, and then the corresponding protocol configuration is performed on the different instruction stages in the chip according to the protocol information to obtain the protocol configuration information. Among them, the protocol configuration information includes the protocol description information and protocol switching information of the chip at different instruction stages. That is to say, by configuring the protocol parameters in the chip through the protocol information, the protocol description information of the chip at different instruction stages can be obtained, and by configuring the switching parameters in the chip through the protocol information, the protocol switching information of the chip at different instruction stages can be obtained.

[0074] The executor of this embodiment can be a read / write device switching device or equipment of a multi-protocol product, which can be configured on the corresponding server of the multi-protocol product. By acquiring the protocol configuration information of the chip in the multi-protocol product, the protocol description information and protocol switching information of the chip at different instruction stages can be written into the control module of the chip, so as to realize the protocol switching of the chip at different instruction stages through the control module of the chip.

[0075] 102. When the multi-protocol product is triggered to switch protocols, a read / write device of the chip adapting the protocol at different instruction stages is selected in the configuration library according to the protocol description information.

[0076] Among them, the configuration library is pre-configured with read-write devices of different protocols. The read-write devices can be readers, read-write boards, and read-write cards. The read-write devices can realize the read and write operations of personalized data according to the data transmission method of the set protocol. Considering that different read-write devices realize different data transmission methods through protocols, each read-write device in the configuration library can be connected to the chip as an external device. By configuring the external device, communication signals can be generated according to the protocol requirements, and data can be sent and received and cached. As long as the status of the external device is detected and the data register is accessed, the data can be sent and received.

[0077] Considering that multi-protocol products often use different protocols for data communication, the chip has different protocol configuration requirements for different read-write devices for different chip usage scenarios. When a multi-protocol product is triggered to switch protocols, the protocol information associated with the next instruction stage can be determined based on the protocol description information, and each read-write device in the configuration library can be traversed and queried through the protocol information associated with the next instruction stage to select the read-write device that adapts to the protocol for the next instruction stage, and the read-write device can be configured with protocols according to the chip usage scenario. For example, if the chip requires greater power for data transmission in a complex environment, the read-write device can be configured with protocol power so that the read-write device after the protocol power configuration can achieve high-power data transmission.

[0078] It should be noted that the chip is associated with a protocol in one instruction stage. That is to say, when the chip switches protocol connections in different instruction stages, it is necessary to disconnect the protocol from the current instruction stage and then connect the protocol to the next instruction stage to ensure that the chip uses one protocol for data communication in the current instruction stage. For example, if the chip uses UART for data download in the first instruction stage, the UART read and write device is selected in the configuration library according to the UART protocol description information.

[0079] 103. Control the chip to switch between read / write devices that adapt to protocols at different instruction stages according to the protocol switching information, so that the multi-protocol product performs read / write operations through the read / write devices that are connected after the switching.

[0080] It can be understood that the protocol switching information at least includes the timing information of the protocol switching and the connection information of the protocol switching. Here, the timing information of the protocol switching is equivalent to the protocol access timing of the chip in different instruction stages. For example, the chip accesses the protocol 7816 in the first instruction stage, and the chip accesses the protocol SPI in the second instruction stage. The connection information of the protocol switching is equivalent to the protocol connection pin of the chip in the corresponding instruction stage. Then, the switching of the chip connection to the read-write device is controlled according to the timing information of the protocol switching, and the switching of the chip connection pin is controlled according to the connection information of the protocol switching during the switching process of the read-write device.

[0081] For example, the pins that the chip needs to connect to protocol 7816 in the first instruction stage are pin1-5, and the pins that the chip needs to connect to protocol SPI in the second instruction stage are pin6-10. According to the timing switching information, the read / write device connected to the chip is switched from the read / write device adapted to protocol 7816 to the read / write device adapted to protocol SPI, and at the same time, according to the connection switching information, the chip connection is switched from pin1-5 to pin6-10.

[0082] Compared with the current existing method of switching read-write devices by frequently replacing read-write devices of different protocols, the method of switching read-write devices of multi-protocol products provided in the embodiment of the present application selects read-write devices of different instruction phase adaptation protocols in the configuration library in advance through protocol description information when triggering the multi-protocol product to switch protocols, and controls the chip to switch between read-write devices of different instruction phase adaptation protocols through protocol switching information, so that the multi-protocol product can perform read-write operations through the read-write devices connected after switching. This process can manage read-write devices of different protocols in a unified manner, and allow multi-protocol products to be accurately connected to read-write devices of different instruction phase adaptation protocols through protocol switching, without the need to frequently replace read-write devices of different protocols, thereby improving the production efficiency of multi-protocol products.

[0083] Considering that the production cycles of chips in multi-protocol products are different, the instruction stages and instruction stage sequences covered by each chip are also different. For example, the protocol information used by the chip in different instruction stages is also different. Specifically, before obtaining the protocol configuration information of the chip in the multi-protocol product, the protocol information used by the chip in different instruction stages can be obtained according to the instruction stage sequence of the chip in the multi-protocol product. Here, the protocol information includes but is not limited to the protocol type, protocol communication method, and protocol standard.

[0084] Accordingly, in the above embodiment, if Figure 2 As shown, step 101 includes the following steps:

[0085] 201. Perform protocol adjustment on a chip in the multi-protocol product according to the protocol information to obtain protocol description information used by the chip in different instruction stages.

[0086] 202. Write the protocol description information used by the chip in different instruction stages into the chip of the multi-protocol product in a script manner according to the instruction stage sequence to obtain protocol configuration information.

[0087] Among them, protocol adjustment is to adjust the instruction stage of the chip in the multi-protocol product and the read-write device of the protocol used in each instruction stage. For example, the first instruction stage is issued using the 7816 protocol, and the corresponding read-write device adapted to the 7816 protocol needs to be configured. The second instruction stage is issued using the SPI protocol, and the corresponding read-write device adapted to the SPI protocol needs to be configured.

[0088] Specifically, in the process of writing the protocol description information used by the chip in different instruction stages into the chip of the multi-protocol product by means of a script according to the order of the instruction stages, the timing of the chip access protocol can be switched and configured according to the protocol description information used by the chip in different instruction stages, and the timing switching information for controlling the chip protocol access can be obtained; the pins of the chip access protocol can be switched and configured according to the protocol description information used by the chip in different instruction stages, and the pin switching information for controlling the chip protocol access can be obtained; finally, the timing switching information and the pin switching information are written into the chip of the multi-protocol product by means of a script according to the order of the instruction stages, so as to perform timing switching configuration and pin switching configuration for the chip access protocol through the module parameters in the chip, and obtain the protocol configuration information.

[0089] In actual application scenarios, considering the pin reuse of the chip during the protocol switching process, the pins connected to the chip overlap in the current instruction stage and the next instruction stage. For example, the pins that need to be connected to the module in the first instruction stage protocol are pin1-pin5, and the pins that need to be connected to the module in the second instruction stage protocol are pin4-pin8. There is pin reuse between pin4 and pin5. Therefore, after writing the protocol description information used by the chip in different instruction stages to the chip of the multi-protocol product in the order of the instruction stages through scripts, the pin reuse of the protocol used by the chip in the adjacent instruction stages can be queried according to the timing switching information and the pin switching information. If there is pin reuse information for the protocol used by the chip in the adjacent instruction stages, the reused pin connection is retained according to the pin reuse information during the pin switching configuration of the chip access protocol to obtain updated protocol configuration information, that is, during the protocol switching process, the chip does not need to disconnect the pin connection and reconnect it, and the connection of the reused pin can be directly retained, avoiding the connection operation of the reused pin during the protocol switching process. Continuing with the pin multiplexing example above, if pins 4 and 5 in the chip are multiplexed in adjacent instruction stages, the chip only needs to disconnect pins 1-pin 3 during the protocol switching process without disconnecting pins 4 and 5.

[0090] In actual applications, considering that the chip needs to connect to the protocol-adapted read-write device at different instruction stages during the protocol switching process, when triggering the multi-protocol product to switch the protocol, it is necessary to traverse the read-write devices adapted to different protocols in the configuration library to obtain the read-write devices adapted to the chip at different instruction stages.

[0091] Furthermore, if the traversal result during the protocol switching process shows that there is no read-write device that is adapted to the protocol, an error message will be given in advance to prompt that there is no read-write device that is adapted to the protocol in the configuration library. Specifically, if there is no read-write device in the configuration library that adapts the protocol to the chip in different instruction stages, an error message will be generated to prompt that there is no read-write device in the configuration library that adapts the protocol to the chip in different instruction stages.

[0092] Specifically, in the above embodiment, if Figure 3 As shown, step 103 includes the following steps:

[0093] 301. Determine a protocol switching timing and a protocol switching pin of a read / write device according to the protocol switching information.

[0094] 302. According to the protocol switching timing control chip, disconnect the protocol connection with the read / write device of the previous instruction stage and execute the protocol connection with the read / write device of the next instruction stage, so as to switch the read / write device connected to the chip in the multi-protocol product.

[0095] 303. Switch the pin connection while switching the read / write device according to the protocol switching pin control chip, so that the multi-protocol product performs the read / write operation through the read / write device connected after the switching.

[0096] In this embodiment, the protocol switching timing is used to control the chip to switch and connect to read-write devices that are compatible with different protocols in the order of the instruction phase. The protocol switching timing allows the chip to be connected to the read-write device that is compatible with the protocol in the corresponding instruction phase, thereby avoiding mutual interference between the protocol-connected read-write devices between different instruction phases. The protocol switching pin is used to control the pin connected to the chip in the current instruction phase. The protocol switching pin allows the chip to be connected to the protocol-compatible pin in the corresponding instruction phase, thereby avoiding mutual interference between the protocol-connected pins between different instruction phases.

[0097] Furthermore, in the above embodiment, if Figure 4 As shown, after step 103, the method further includes the following steps:

[0098] 401. Obtain personalized information transmitted by the chip in the next instruction stage.

[0099] 402. While switching the read / write device connected to the chip in the multi-protocol product, the personalized information is written into the program through the read / write device connected after the switching for data assembly to obtain data result information of the read / write device performing the read / write operation.

[0100] It is understandable that during the protocol switching process, the chip after protocol configuration will pass the personalized data to be read and written into the program for assembly to obtain a complete script program, which is executed by the read-write device to obtain the data result information of the read-write operation performed by the read-write device.

[0101] Specifically, personalized information is stored in a database. The personalized data is retrieved from the database and combined with the script to form a complete execution program that is transmitted to the read-write device for read-write operations. If the read-write operation is successful, the data result information is marked as successful. If the read-write operation fails, the data result information is marked as failed, and the download of personalized data will be called repeatedly.

[0102] Further, as Figure 1-4 The specific implementation of the method, the embodiment of the present application provides a structural block diagram of a method for switching read and write devices of a multi-protocol product, such as Figure 5 As shown in the figure, the whole read-write device switching process of the multi-protocol product mainly involves the following functional modules: main control module, clock module, data module, program module, and line sequence management module; specifically, in the read-write device switching process of the multi-protocol product, the chip performs protocol configuration through the main control module to obtain the protocol configuration information of different instruction stages in the chip, and then configures the clock module according to the protocol configuration information to control the clock frequency of the protocol transmission through the clock module, and configures the line sequence management module according to the protocol configuration information to control the pin connection of the protocol switching through the line sequence management module. When the line sequence management module receives the switching instruction, it searches the configuration library for the pins. The read / write device corresponding to the protocol adaptation of the next instruction stage is queried, and the currently connected read / write device is switched and configured according to the read / write device corresponding to the protocol adaptation of the next instruction stage. After the line sequence management module completes the switching configuration, the protocol configuration information is passed to the main control module, and the corresponding data module is synchronously started through the main control module, and personalized information is obtained from the data module, and the personalized information is passed to the program module, and together with the script program in the program module, a complete script program is formed and then passed to the read / write device corresponding to the protocol adaptation of the current instruction stage. The read / write device performs read and write operations on the script program to obtain data result information of the read / write device performing read and write operations. It can be understood that personalized information is equivalent to information to be processed under different scene requirements, for example, download information in the transmission scene, activation information in the activation scene, and registration information in the login scene. Read / write devices adapted for different protocols can call different personalized information from the database, so as to form a script program through the set protocol, and then write it into the chip through the read / write device.

[0103] Further, as Figure 1-4 The specific implementation of the method, the embodiment of the present application provides a read-write device switching device for a multi-protocol product, such as Figure 6As shown, the device includes: a first acquisition unit 51, a selection unit 52, and a switching unit 53.

[0104] A first acquisition unit 51 is used to acquire protocol configuration information of a chip in a multi-protocol product, wherein the protocol configuration information includes protocol description information of the chip at different instruction stages and protocol switching information;

[0105] A selection unit 52 is used to select a read / write device of the chip adapting the protocol at different instruction stages in the configuration library according to the protocol description information when triggering the multi-protocol product to switch the protocol, and the configuration library is pre-configured with read / write devices of different protocols;

[0106] The switching unit 53 is used to control the chip to switch between read / write devices of the protocol adaptation protocol at different instruction stages according to the protocol switching information, so that the multi-protocol product performs read / write operations through the read / write device connected after the switching.

[0107] Compared with the current existing method of frequently changing read-write devices of different protocols to realize read-write device switching, the present invention provides a read-write device switching device for a multi-protocol product. When the multi-protocol product is triggered to switch protocols, the present invention selects read-write devices of different instruction phase adaptation protocols in the configuration library in advance through the protocol description information, and controls the chip to switch between the read-write devices of different instruction phase adaptation protocols through the protocol switching information, so that the multi-protocol product can perform read-write operations through the read-write devices connected after the switching. This process can manage read-write devices of different protocols in a unified manner, and allow multi-protocol products to be accurately connected to read-write devices of different instruction phase adaptation protocols through protocol switching, without the need to frequently change read-write devices of different protocols, thereby improving the production efficiency of multi-protocol products.

[0108] In a specific application scenario, the device further includes:

[0109] A second acquisition unit is used to acquire protocol information used by the chip in different instruction stages according to the instruction stage sequence of the chip in the multi-protocol product before acquiring the protocol configuration information of the chip in the multi-protocol product;

[0110] Accordingly, the first acquiring unit includes:

[0111] An adjustment module, used to perform protocol adjustment on the chip in the multi-protocol product according to the protocol information, so as to obtain protocol description information used by the chip in different instruction stages;

[0112] The writing module is used to write the protocol description information used by the chip in different instruction stages into the chip of the multi-protocol product in a script manner according to the instruction stage sequence to obtain protocol configuration information.

[0113] In a specific application scenario, the writing module is specifically used for:

[0114] Switching and configuring the timing of chip access protocol according to the protocol description information used by the chip in different instruction stages, and obtaining timing switching information for controlling chip protocol access;

[0115] According to the protocol description information used by the chip in different instruction stages, the pins of the chip access protocol are switched and configured to obtain the pin switching information for controlling the chip protocol access;

[0116] The timing switching information and the pin switching information are written into the chip of the multi-protocol product by means of a script in accordance with the instruction phase sequence, so as to perform timing switching configuration and pin switching configuration on the chip access protocol through the module parameters in the chip to obtain the protocol configuration information.

[0117] In a specific application scenario, the first acquisition unit further includes:

[0118] A query module, used to write the timing switching information and the pin switching information into the chip of the multi-protocol product in the form of a script in the order of the instruction phases, so as to perform timing switching configuration and pin switching configuration on the chip access protocol through the module parameters in the chip, and after obtaining the protocol configuration information, query the pin multiplexing of the protocol used by the chip in adjacent instruction phases according to the timing switching information and the pin switching information;

[0119] The update module is used to retain the multiplexed pin connection during the pin switching configuration of the chip access protocol according to the pin multiplexing information if the protocol used by the chip in the adjacent instruction stage has pin multiplexing information, so as to obtain updated protocol configuration information.

[0120] In a specific application scenario, the device further includes:

[0121] A generating unit is used for generating an error message to prompt that after selecting a read / write device for adapting the protocol of the chip to different instruction stages in the configuration library according to the protocol description information, if the read / write device for adapting the protocol of the chip to different instruction stages does not exist in the configuration library, to prompt that the read / write device for adapting the protocol of the chip to different instruction stages does not exist in the configuration library.

[0122] In a specific application scenario, the switching unit is specifically used to:

[0123] Determine the protocol switching timing and protocol switching pin of the read / write device according to the protocol switching information;

[0124] According to the protocol switching timing control chip, the chip disconnects the protocol connection with the read / write device of the previous instruction stage and executes the protocol connection with the read / write device of the next instruction stage, so as to switch the read / write device connected to the chip in the multi-protocol product;

[0125] According to the protocol switching pin control chip, the pin connection is switched while switching the read / write device, so that the multi-protocol product performs read / write operations through the read / write device connected after the switching.

[0126] In a specific application scenario, the device further includes:

[0127] A third acquisition unit is used to acquire personalized information transmitted by the chip in the next instruction stage;

[0128] The assembly unit is used to write the personalized information into the program for data assembly through the read-write device connected after the switch while switching the read-write device connected to the chip in the multi-protocol product, so as to obtain the data result information of the read-write operation performed by the read-write device.

[0129] It should be noted that for other corresponding descriptions of the functional units involved in the read / write device switching device of a multi-protocol product provided in this embodiment, reference can be made to Figure 1-Figure 4 The corresponding description in will not be repeated here.

[0130] Based on the above Figure 1-Figure 4 The method shown in the embodiment of the present application accordingly provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned Figure 1-Figure 4 The read / write device switching method of the multi-protocol product is shown.

[0131] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0132] Based on the above Figure 1-Figure 4 The method shown, and Figure 6 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides a physical device for switching the read and write devices of a multi-protocol product, which can be a computer, a smart phone, a tablet computer, a smart watch, a server, or a network device, etc. The physical device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1-Figure 4 The read / write device switching method of the multi-protocol product is shown.

[0133] Optionally, the physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0134] In an exemplary embodiment, see Figure 7 The physical device includes a communication bus, a processor, a memory and a communication interface, and may also include an input / output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the read / write device switching method of the multi-protocol product in the above embodiment.

[0135] Those skilled in the art will appreciate that the physical device structure of the read / write device switching of a multi-protocol product provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0136] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the physical device hardware and software resources of the read and write device switching of the above-mentioned multi-protocol product, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.

[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the technical solution of the present application, compared with the current existing methods, the present application manages the read-write devices of different protocols in a unified manner, and allows multi-protocol products to be accurately connected to the read-write devices of the adapted protocols at different instruction stages by means of protocol switching, without the need to frequently replace the read-write devices of different protocols, thereby improving the production efficiency of multi-protocol products.

[0138] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.

[0139] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.

Claims

1. A method for switching read / write devices of a multi-protocol product, characterized in that: include: According to the instruction phase sequence of the chip in the multi-protocol product, obtain the protocol information used by the chip in different instruction phases; Obtaining the protocol configuration information of the chip in the multi-protocol product, the protocol configuration information including the protocol description information and protocol switching information of the chip at different instruction stages, specifically including: adjusting the protocol of the chip in the multi-protocol product according to the protocol information to obtain the protocol description information used by the chip at different instruction stages; switching and configuring the timing of the chip access protocol according to the protocol description information used by the chip at different instruction stages to obtain the timing switching information for controlling the chip protocol access; switching and configuring the pins of the chip access protocol according to the protocol description information used by the chip at different instruction stages to obtain the pin switching information for controlling the chip protocol access; writing the timing switching information and the pin switching information into the chip of the multi-protocol product by means of a script according to the instruction stage sequence, so as to perform timing switching configuration and pin switching configuration on the chip access protocol through the module parameters in the chip to obtain the protocol configuration information; When a multi-protocol product is triggered to switch protocols, a read / write device for adapting the chip to the protocol at different instruction stages is selected from a configuration library according to the protocol description information, and the configuration library is pre-configured with read / write devices of different protocols; The chip is controlled to switch connections between read-write devices that adapt protocols at different instruction stages according to the protocol switching information, so that the multi-protocol product performs read-write operations through the read-write devices connected after switching.

2. The method according to claim 1, characterized in that After writing the timing switching information and the pin switching information into the chip of the multi-protocol product in a script in accordance with the instruction phase sequence, so as to configure the timing switching and the pin switching of the chip access protocol through the module parameters in the chip, and obtaining the protocol configuration information, the method further includes: Query the pin multiplexing status of the protocol used by the chip in adjacent instruction stages according to the timing switching information and the pin switching information; If the chip has pin multiplexing information in the protocol used in adjacent instruction stages, the multiplexed pin connection is retained during the pin switching configuration of the chip access protocol according to the pin multiplexing information to obtain updated protocol configuration information.

3. The method according to any one of claims 1 to 2, characterized in that: When the multi-protocol product is triggered to switch the protocol, after selecting the read / write device of the chip adapting the protocol in different instruction stages in the configuration library according to the protocol description information, the method further includes: If the configuration library does not contain a read / write device whose chip adapts the protocol at different instruction stages, an error message is generated to prompt that the configuration library does not contain a read / write device whose chip adapts the protocol at different instruction stages.

4. The method according to any one of claims 1 to 2, characterized in that The controlling the chip to switch between read / write devices of the protocol adaptation protocols at different instruction stages according to the protocol switching information, so that the multi-protocol product performs read / write operations through the read / write devices connected after the switching, specifically includes: Determine the protocol switching timing and protocol switching pin of the read / write device according to the protocol switching information; According to the protocol switching timing control chip, the chip disconnects the protocol connection with the read / write device of the previous instruction stage and executes the protocol connection with the read / write device of the next instruction stage, so as to switch the read / write device connected to the chip in the multi-protocol product; According to the protocol switching pin control chip, the pin connection is switched while switching the read / write device, so that the multi-protocol product performs read / write operations through the read / write device connected after the switching.

5. The method according to any one of claims 1 to 2, characterized in that: After controlling the chip to switch between read / write devices that adapt protocols in different instruction phases according to the protocol switching information, the method further includes: Obtain personalized information passed by the chip in the next instruction stage; While switching the read / write device connected to the chip in the multi-protocol product, the personalized information is written into the program through the read / write device connected after the switch for data assembly to obtain data result information of the read / write operation performed by the read / write device.

6. A read / write device switching device for a multi-protocol product, characterized in that: include: A first acquisition unit is used to acquire protocol configuration information of a chip in a multi-protocol product, wherein the protocol configuration information includes protocol description information of the chip at different instruction stages and protocol switching information; A selection unit, used for selecting a read / write device of the chip adapting the protocol at different instruction stages in a configuration library according to the protocol description information when triggering the multi-protocol product to switch the protocol, wherein the configuration library is pre-configured with read / write devices of different protocols; A switching unit, used for controlling the chip to switch between read / write devices of the protocol adaptation protocol at different instruction stages according to the protocol switching information, so that the multi-protocol product performs read / write operations through the read / write device connected after the switching; The device further comprises: a second acquisition unit, configured to acquire, before acquiring the protocol configuration information of the chip in the multi-protocol product, protocol information used by the chip in different instruction stages according to the instruction stage sequence of the chip in the multi-protocol product; Accordingly, the first acquisition unit includes: an adjustment module, which is used to perform protocol adjustment on the chip in the multi-protocol product according to the protocol information to obtain protocol description information used by the chip in different instruction stages; a writing module, which is used to write the protocol description information used by the chip in different instruction stages into the chip of the multi-protocol product in a script according to the instruction stage sequence to obtain protocol configuration information; The writing module is specifically used to: switch the timing of the chip access protocol according to the protocol description information used by the chip in different instruction stages, and obtain the timing switching information for controlling the chip protocol access; switch the pins of the chip access protocol according to the protocol description information used by the chip in different instruction stages, and obtain the pin switching information for controlling the chip protocol access; write the timing switching information and the pin switching information into the chip of the multi-protocol product in a script according to the instruction stage sequence, so as to perform timing switching configuration and pin switching configuration on the chip access protocol through the module parameters in the chip, and obtain the protocol configuration information.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method for switching read / write devices of a multi-protocol product according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for switching read / write devices of a multi-protocol product according to any one of claims 1 to 5 are implemented.