Chip platform upgrade method and related device

By creating multi-threading in the chip platform upgrade program to realize automated upgrade and testing of the chip platform, the problem of low chip platform upgrade and testing efficiency in the existing technology is solved, and the efficiency and unity of upgrade and testing is improved.

CN114296754BActive Publication Date: 2025-03-11FIBOCOM WIRELESS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111447658.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-03-11
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

In the prior art, chip platform upgrade and testing efficiency are inefficient, mainly due to the need to customize and develop multiple upgrade programs for different types of chip platforms, resulting in redundant and complex work for developers.

Method used

By creating multi-threads in the chip platform upgrade program, using the first thread to perform firmware upgrades, and testing the chip platform through the second thread, automated upgrades and testing processes are achieved. This method does not require custom development upgrade programs for each chip platform, and can realize one chip platform upgrade program for multiple chip platforms upgrades.

Benefits of technology

It improves the efficiency of chip platform upgrade and testing, reduces the work redundancy and complexity of developers, and realizes unified upgrade and testing of multiple chip platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114296754B_ABST
    Figure CN114296754B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a chip platform upgrade method and related devices, which are applied to electronic equipment. The electronic equipment is installed with a chip platform upgrade program, and the chip platform upgrade program is used to connect to at least one chip platform. The chip platform upgrade program includes a first process. The method creates a first thread and a second thread through the first process; determines a first interface function corresponding to the first chip platform according to the correspondence between the chip platform and the interface function through the first thread, and calls the first interface function. The first interface function is used for firmware upgrade of the first chip platform, and the first chip platform is any one of the at least one chip platform; tests the first chip platform through the second thread when the firmware upgrade is successful to obtain test information; the efficiency of chip platform upgrade and testing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electrical technology, and in particular to a chip platform upgrading method and related devices. Background Art

[0002] With the development of the times, various chip platforms are increasingly used in life. For various chip platforms, software upgrades are often required to meet actual application needs.

[0003] At present, chip platform software upgrades include firmware upgrades and customized function customization. Firmware upgrades can be implemented using the upgrade program provided by the chip platform manufacturer, while customized functions require the development of corresponding customized functions for different types of chip platforms.

[0004] However, because different types of chip platforms need to customize and develop multiple upgrade programs for upgrade and testing, the work of developers is redundant and complicated, resulting in low efficiency in chip platform upgrade and testing. Summary of the invention

[0005] The embodiments of the present application disclose a chip platform upgrade method and related devices, which can improve the efficiency of chip platform upgrade and testing.

[0006] In a first aspect, an embodiment of the present application discloses a chip platform upgrade method, which is applied to an electronic device, wherein the electronic device is installed with a chip platform upgrade program, the chip platform upgrade program is used to connect to at least one chip platform, the chip platform upgrade program includes a first process, and the method includes:

[0007] Creating a first thread and a second thread through the first process;

[0008] Determine, by the first thread, a first interface function corresponding to the first chip platform according to a correspondence between the chip platform and the interface function, and call the first interface function, wherein the first interface function is used for firmware upgrade of the first chip platform, and the first chip platform is any one of the at least one chip platform;

[0009] When the firmware upgrade is successful, the first chip platform is tested through the second thread to obtain test information.

[0010] In a possible implementation manner of the first aspect, the chip platform upgrade program further includes a second process, and the method further includes:

[0011] The test information is displayed on the interface of the chip platform upgrade program through the second process.

[0012] In a possible implementation manner of the first aspect, the first interface function includes at least one of a first full erase function, a first partial formatting function, and a first upgrade function.

[0013] In a possible implementation manner of the first aspect, testing the first chip platform to obtain test information includes:

[0014] Executing a customized function through the second thread, wherein the code segment of the customized function is built into the firmware;

[0015] The execution result of the customized function is tested by the second thread to obtain the test information.

[0016] In a possible implementation of the first aspect, the customized function includes a number writing function, and the method further includes:

[0017] Obtaining the first number segment information of the first chip platform through the first process;

[0018] The executing of the customized function by the second thread includes:

[0019] Executing the number writing function through the second thread, the number writing function is used to write the first number segment information into the number segment storage space of the first chip platform;

[0020] The above-mentioned test information obtained by testing the execution result of the above-mentioned customized function through the above-mentioned second thread includes:

[0021] The second number segment information in the number segment storage space is obtained through the second thread, the first number segment information is compared with the second number segment information, and the number writing test information is obtained. The test information includes the number writing test information.

[0022] In a possible implementation manner of the first aspect, the acquiring the first number segment information of the first chip platform through the first process includes:

[0023] Acquire the two-dimensional code parsing information of the first chip platform through the first process, wherein the two-dimensional code parsing information includes the first number segment information of the first chip platform;

[0024] Alternatively, the data management system is connected through the first process to receive the first number segment information of the first chip platform sent by the data management system.

[0025] In a possible implementation manner of the first aspect, the method further includes:

[0026] Create a slot function through the above second process;

[0027] The test information is sent to the slot function through the second thread.

[0028] In a second aspect, an embodiment of the present application discloses a chip platform upgrade device, which is applied to an electronic device, wherein the electronic device is installed with a chip platform upgrade program, wherein the chip platform upgrade program is used to connect to at least one chip platform, wherein the chip platform upgrade program includes a first process, and wherein the device includes:

[0029] A creating unit, used for creating a first thread and a second thread through the first process;

[0030] A determining unit, configured to determine a first interface function corresponding to the first chip platform according to a correspondence between the chip platform and the interface function through the first thread;

[0031] A calling unit, configured to call the first interface function through the first thread, wherein the first interface function is used for firmware upgrade of the first chip platform, and the first chip platform is any one of the at least one chip platform;

[0032] The testing unit is used to test the first chip platform through the second thread when the firmware upgrade is successful, and obtain test information.

[0033] In a possible implementation manner of the second aspect, the device further includes:

[0034] The display unit is used to display the test information on the interface of the chip platform upgrade program through the second process.

[0035] In a possible implementation of the second aspect, the test unit is specifically configured to execute a customized function through the second thread, and a code segment of the customized function is built into the firmware;

[0036] The testing unit is specifically used to test the execution result of the customized function through the second thread to obtain the testing information.

[0037] In a possible implementation manner of the second aspect, the device further includes:

[0038] An acquiring unit, configured to acquire the first number segment information of the first chip platform through the first process;

[0039] The test unit is specifically used to execute the number writing function through the second thread, and the number writing function is used to write the first number segment information into the number segment storage space of the first chip platform;

[0040] The above-mentioned test unit is specifically used to obtain the second number segment information in the above-mentioned number segment storage space through the above-mentioned second thread, compare the above-mentioned first number segment information with the above-mentioned second number segment information, and obtain the number writing test information. The above-mentioned test information includes the above-mentioned number writing test information.

[0041] In a possible implementation manner of the second aspect, the acquisition unit is specifically configured to acquire the two-dimensional code parsing information of the first chip platform through the first process, where the two-dimensional code parsing information includes the first number segment information of the first chip platform;

[0042] Alternatively, the data management system is connected through the first process to receive the first number segment information of the first chip platform sent by the data management system.

[0043] In a possible implementation of the second aspect, the creation unit is specifically configured to create a slot function through the second process;

[0044] The above device also includes:

[0045] A sending unit is used to send the test information to the slot function through the second thread.

[0046] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing programs; a processor for executing the programs stored in the memory, and when the programs are executed, the processor is used to execute a method as any one of the optional implementations in the first aspect.

[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes a method according to any one of the optional implementations in the first aspect.

[0048] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes: instructions or computer programs; when the instructions or the computer programs are executed, the method in any optional implementation manner in the first aspect is implemented.

[0049] The chip platform upgrade method in the embodiment of the present application is applied to an electronic device, the electronic device is installed with a chip platform upgrade program, the chip platform upgrade program is used to connect at least one chip platform, the chip platform upgrade program includes a first process, and the method includes: creating a first thread and a second thread through the first process; determining the first interface function corresponding to the first chip platform according to the corresponding relationship between the chip platform and the interface function through the first thread, calling the first interface function, the first interface function is used for the firmware upgrade of the first chip platform, the first chip platform is any one of the at least one chip platform; through the second thread, in the case of successful firmware upgrade, the first chip platform is tested to obtain test information. The chip platform upgrade program can be connected to at least one chip platform, and when more than one chip platform is connected, a corresponding process and thread are created for each chip platform for upgrading and testing the chip platform, without the need to customize and develop an upgrade program for each chip platform, and a chip platform upgrade program can be used for upgrading multiple chip platforms, which can improve the efficiency of chip platform upgrade and testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the following is a brief introduction to the drawings required for use in the embodiments of the present application or the background technology.

[0051] Figure 1 A flowchart of a chip platform upgrade method provided in an embodiment of the present application;

[0052] Figure 2 A flowchart of another chip platform upgrade method provided in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of the structure of a chip platform upgrade device provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described below in conjunction with the accompanying drawings.

[0056] The terms "first" and "second" in the specification, claims and drawings of this application are only used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0057] The "embodiment" mentioned in this article means that the specific features, structures or characteristics described in conjunction with the embodiment can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It can be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0058] In the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c".

[0059] The embodiments of the present invention provide a chip platform upgrade method, device, equipment and storage medium. In order to more clearly describe the scheme of the present invention, some knowledge involved in the chip platform upgrade method, device, equipment and storage medium provided in the embodiments of the present application is first introduced below.

[0060] Chip platform: The chip platform is a module including the chip provided by the chip manufacturer. The original chip manufacturer will also provide a burning tool for the corresponding chip platform, which can download or upgrade the packaged module for the chip platform. Each chip manufacturer will also leave an interface for secondary development for the chip platform to realize some customized functions for the chip platform.

[0061] Firmware: Firmware refers to the device driver stored inside the device. Through firmware, the operating system can implement the operation of a specific machine according to the standard device driver. Firmware plays the most basic and bottom-level role in a system. In hardware devices, firmware determines the function and performance of the hardware device. With the advent of the information age, it is difficult for manufacturers to fully meet customer needs with their designs. Firmware needs to be upgraded to improve performance or solve compatibility issues between software and hardware.

[0062] Signals and slots: Signals and slots are a high-level interface used for communication between objects. A signal is an event sent under specific circumstances, and a slot is a function used to respond to a signal. Like a general function, a slot function can be defined anywhere in a class, has any parameters, and can be called directly. The difference between a slot function and a general function is that a slot function can be associated with a signal, and when a signal is emitted, the associated slot function will be automatically executed. Signals and slots can carry any number and type of parameters. You can connect many signals to a single slot, or you can connect a single signal to many slots.

[0063] Process and thread: A process is a program in a computer that runs on a certain set of data. It is the basic unit for resource allocation and scheduling in a computer system and the foundation of the operating system structure. In the contemporary thread-oriented computer structure, a process is a container for threads. A program is a description of instructions, data and their organizational form, and a process is the entity of a program. A thread is the smallest unit that an operating system can schedule operations on. It is contained in a process and is the actual operating unit in the process. A thread refers to a single sequential control flow in a process. Multiple threads can run concurrently in a process, and each thread executes different tasks in parallel.

[0064] With the development of the times, various chip platforms are increasingly used in life. For various chip platforms, software upgrades are often required to meet the actual application needs.

[0065] At present, chip platform software upgrades include firmware upgrades and customized functions. Firmware upgrades can be implemented using the upgrade program provided by the chip platform manufacturer, while customized functions require the development of corresponding customized functions for different types of chip platforms.

[0066] However, because different types of chip platforms need to customize and develop multiple upgrade programs for upgrade and testing, the work of developers is redundant and complicated, resulting in low efficiency in chip platform upgrade and testing.

[0067] In view of the defects of the above method, an embodiment of the present application provides a chip platform upgrade method, which is applied to an electronic device, wherein the electronic device is installed with a chip platform upgrade program, the chip platform upgrade program is used to connect to at least one chip platform, and the chip platform upgrade program includes a first process, such as Figure 1 As shown, the method comprises the following steps:

[0068] 101. Create a first thread and a second thread through a first process.

[0069] Since the first thread and the second thread are created by the first process, they share all resources of the first process, including field information, functions, etc. obtained by the first process. The memory accessible by the first process can also be accessed by the first thread and the second thread. The first thread is used for firmware upgrade of the first chip platform, and the second thread is used to test the first chip platform to obtain test progress and test results if the firmware upgrade of the first chip platform is successful.

[0070] 102. Determine, through the first thread, a first interface function corresponding to the first chip platform according to a correspondence between the chip platform and the interface function, and call the first interface function.

[0071] The first chip platform is any one of the at least one chip platform, and each of the at least one chip platform has a corresponding interface function; the interface function corresponding to the first chip platform is obtained through the first thread, and the firmware on the first chip platform can be upgraded by calling the first interface function. The first interface function includes functions for formatting and upgrading the first chip platform, the formatting function is used to clear the existing data of the first chip platform, and the upgrading function is used to write the software files to be burned into the first chip platform.

[0072] In some embodiments of the present application, the first interface function includes at least one of a first full erase function, a first partial formatting function and a first upgrade function.

[0073] The above-mentioned first full erase function and the above-mentioned first partial formatting function are used for different upgrade situations. When it is necessary to erase the data on the above-mentioned first chip platform and re-download the firmware on the first chip platform, the above-mentioned first thread executes the first full erase function; when the firmware on the first chip platform is updated, the above-mentioned first thread executes the first partial formatting function to clear the existing data in the storage area corresponding to the updated firmware.

[0074] 103. When the firmware upgrade is successful, the first chip platform is tested through the second thread to obtain test information.

[0075] During the firmware upgrade process, the first thread writes a code segment and a file to be burned into the firmware, and the code segment is used to execute certain customized functions. If the firmware upgrade is successful, it means that the code segment has been written into the firmware of the first chip platform. During the test process, the second thread executes the customized function corresponding to the code segment, tests the execution result of the customized function corresponding to the code segment, and obtains the test information. Through the test information, the user can determine whether the first chip platform is successfully upgraded and the progress of the first chip platform during the upgrade process.

[0076] In some implementations of the present application, step 103 includes:

[0077] Executing a customized function through the second thread, wherein the code segment of the customized function is built into the firmware;

[0078] The execution result of the customized function is tested by the second thread to obtain the test information.

[0079] After the first thread calls the first interface function, the code segment of the customized function is written into the corresponding storage area in the firmware of the first chip platform. The customized function is used to implement customized functions. Exemplarily, the customized function can be a write number function, a write key function, an encryption function or a write address function, etc. The write number function is used to write the product serial number or the international mobile identity code and other number segment information in the storage space of the first chip platform. The write address function can be used to write the Bluetooth address or other address information such as the wireless network address of the first chip platform. The write key function is used to write the key into the first chip platform, which can be used for data encryption of the first chip platform. The encryption function is used to encrypt part of the data of the first chip platform using a preset encryption algorithm. By executing the customized function and testing the results after execution, some additional functions can be added on the basis of meeting the firmware upgrade of the chip platform to meet new requirements in actual application and improve the scalability of the chip platform.

[0080] In some implementations of the present application, the customized function includes a number writing function, and the method further includes:

[0081] Obtaining the first number segment information of the first chip platform through the first process;

[0082] The executing of the customized function by the second thread includes:

[0083] Executing the number writing function through the second thread, the number writing function is used to write the first number segment information into the number segment storage space of the first chip platform;

[0084] The above-mentioned test information obtained by testing the execution result of the above-mentioned customized function through the above-mentioned second thread includes:

[0085] The second number segment information in the number segment storage space is obtained through the second thread, the first number segment information is compared with the second number segment information, and the number writing test information is obtained. The test information includes the number writing test information.

[0086] Exemplarily, the customized function may be a write number function. The second thread executes the write number function to write the first number segment information into the number segment storage space corresponding to the first chip platform. The second thread obtains the second number segment information in the number segment storage space and compares it with the first number segment information to obtain the write number test information. The test information includes the write number test information obtained by the second thread test. By executing customized functions and testing the results after execution, the embodiment of the present application can add some additional functions on the basis of satisfying the firmware upgrade of the chip platform, meet new requirements in actual application, and improve the scalability of the chip platform.

[0087] In some embodiments of the present application, obtaining the first number segment information of the first chip platform through the first process includes:

[0088] Acquire the two-dimensional code parsing information of the first chip platform through the first process, wherein the two-dimensional code parsing information includes the first number segment information of the first chip platform;

[0089] Alternatively, the data management system is connected through the first process to receive the first number segment information of the first chip platform sent by the data management system.

[0090] The embodiment of the present application does not limit the manner in which the first process obtains the first number segment information. Exemplarily, the first process can scan the QR code of the first chip platform to extract the first number segment information from the QR code; the data management system can also be connected, and the data management system sends the first number segment information corresponding to the first chip platform to the first process. The embodiment of the present application can obtain the first number segment information through the above two methods, can adapt to a variety of chip platform upgrade and test scenarios, and improve the efficiency of chip platform upgrade and test.

[0091] In some implementations of the present application, the above method further includes:

[0092] Create a slot function through the above second process;

[0093] The test information is sent to the slot function through the second thread.

[0094] The slot function is a function for responding to a signal. The second thread sends the test information to the slot function in the form of a signal. When the test information is sent, the slot function associated with the test information will be automatically executed. After the second process receives the test information, it can display the test information on the interface of the chip platform upgrade program. The embodiment of the present application sends and receives test information through the mechanism of signals and slot functions, and does not adopt the method of the second thread directly communicating with the second process. In the case where the second threads corresponding to multiple chip platforms communicate with the second process, the chip platform upgrade program may cause untimely data processing due to too many threads. The use of the mechanism of signals and slot functions can solve this problem, improve the stability and timeliness of the chip upgrade program, and avoid jamming.

[0095] In some implementations of the present application, the above method further includes:

[0096] The test information is displayed on the interface of the chip platform upgrade program through the second process.

[0097] The above-mentioned test information includes the test results and test progress of the above-mentioned first chip platform in each step of the upgrade test. Displaying the above-mentioned test information on the interface of the above-mentioned chip platform upgrade program can clearly show the process information of the chip platform upgrade process. The user can control the upgrade process according to the above-mentioned test information, such as pausing the upgrade process, or when the above-mentioned test information indicates that an error occurs during the upgrade, the upgrade process of the chip platform can be terminated in time, thereby improving the efficiency of the chip platform upgrade.

[0098] In an embodiment of the present application, the above-mentioned chip platform upgrade program can be connected to at least one chip platform. When more than one chip platform is connected, corresponding processes and threads are created for each chip platform for upgrading and testing the chip platform. There is no need to customize the upgrade program for each chip platform. One chip platform upgrade program can be used to upgrade multiple chip platforms, which can improve the efficiency of chip platform upgrade and testing.

[0099] The following describes the chip platform upgrade method in combination with specific application scenarios. Figure 2 The method is applied to an electronic device, the electronic device is installed with a chip platform upgrade program, the chip platform upgrade program is used to connect to at least one chip platform, the chip platform upgrade program includes a first process, and the method includes the following steps:

[0100] 201. Create a first thread and a second thread through a first process.

[0101] The execution process of step 201 is the same as that of the aforementioned step 101, and will not be repeated here.

[0102] 202. Create a slot function through the second process.

[0103] The second process creates a slot function, which is used to receive signals. When the second thread test is completed, test information is obtained, and the test information is sent to the slot function in the form of a signal.

[0104] 203. Determine, through the first thread, a first interface function corresponding to the first chip platform according to the correspondence between the chip platform and the interface function, and call the first interface function.

[0105] The execution process of step 203 is the same as that of the aforementioned step 102, and will not be repeated here.

[0106] 204. Obtain first number segment information of the first chip platform through the first process.

[0107] In practical applications, it is necessary to write segment information into the storage area of ​​the first chip platform. The first segment information may be a product serial number, an international mobile identity code, or other segment information, which is not limited in the present embodiment. Optionally, the first process may scan the QR code corresponding to the first chip platform to obtain other information such as the first segment information; the first process may also connect to the data management system in production to receive other field information such as the first segment information sent by the data management system.

[0108] 205. Execute the number writing function through the second thread.

[0109] Exemplarily, the customized function includes a write function, the code segment of which is built into the firmware, and during the firmware upgrade process, the code segment of which has been written into the firmware. The write function is used to write the first number segment information into the corresponding number segment storage area.

[0110] 206. Obtain second number segment information through the second thread, compare the first number segment information with the second number segment information, and obtain number writing test information.

[0111] The second segment information is the segment information read by the second thread from the segment storage area. By comparing the first segment information and the second segment information to see if they are equal, it can be confirmed whether the written segment information is the first segment information obtained by the first process.

[0112] 207. Send test information to the slot function through the second thread.

[0113] The second thread sends a signal to the slot function, which includes the test information. After the second process receives the signal, the slot function will be automatically executed. Exemplarily, the slot function will display the test information on the interface of the chip platform upgrade program. The slot function can also upload the test information to the data management system, which will manage the data generated in the test in a unified manner.

[0114] 208. Display the test information on the interface of the chip platform upgrade program through the second process.

[0115] The second process displays the test information on the interface of the chip platform upgrade program according to different chip platforms, so that the progress and results of the chip platform upgrade and test can be intuitively observed.

[0116] The embodiment of the present application creates the first thread and the second thread through the above-mentioned first process to upgrade and test the chip platform, and adopts two different methods to obtain the above-mentioned first number segment information, so that the upgrade and test of the chip platform are suitable for different situations; for the test information of the customized function, the signal and slot mechanism is used to interact with the front-end interface to avoid multiple threads from interacting with the front-end interface process, which can improve the stability of the operation of the above-mentioned chip platform upgrade program and the efficiency of the upgrade test.

[0117] The following describes the chip platform upgrade process in conjunction with the structure of the chip platform upgrade device. Figure 3 A schematic diagram of the structure of a chip platform upgrade device provided in an embodiment of the present application. Figure 3 As shown, the chip platform upgrade device is applied to an electronic device, the electronic device is installed with a chip platform upgrade program, the chip platform upgrade program is used to connect at least one chip platform, the chip platform upgrade program includes a first process, and the device includes:

[0118] A creating unit 302, configured to create a first thread and a second thread through the first process;

[0119] A determining unit 303 is configured to determine a first interface function corresponding to the first chip platform according to a correspondence between the chip platform and the interface function through the first thread;

[0120] A calling unit 304 is configured to call the first interface function through the first thread, where the first interface function is used for firmware upgrade of the first chip platform, where the first chip platform is any one of the at least one chip platform;

[0121] The testing unit 305 is used to test the first chip platform through the second thread when the firmware upgrade is successful, and obtain test information.

[0122] In a possible implementation manner, the above device further includes:

[0123] The display unit 307 is used to display the test information on the interface of the chip platform upgrade program through the second process.

[0124] In a possible implementation, the test unit 305 is specifically configured to execute a customized function through the second thread, and a code segment of the customized function is built into the firmware;

[0125] The testing unit 305 is specifically configured to test the execution result of the customized function through the second thread to obtain the testing information.

[0126] In a possible implementation manner, the above device further includes:

[0127] An acquiring unit 301 is configured to acquire the first number segment information of the first chip platform through the first process;

[0128] The test unit 305 is specifically used to execute the number writing function through the second thread, and the number writing function is used to write the first number segment information into the number segment storage space of the first chip platform;

[0129] The above-mentioned test unit 305 is specifically used to obtain the second number segment information in the above-mentioned number segment storage space through the above-mentioned second thread, compare the above-mentioned first number segment information with the above-mentioned second number segment information, and obtain the number writing test information. The above-mentioned test information includes the above-mentioned number writing test information.

[0130] In a possible implementation manner, the acquisition unit 301 is specifically configured to acquire the two-dimensional code parsing information of the first chip platform through the first process, where the two-dimensional code parsing information includes the first number segment information of the first chip platform;

[0131] Alternatively, the data management system is connected through the first process to receive the first number segment information of the first chip platform sent by the data management system.

[0132] In a possible implementation, the creation unit 302 is specifically configured to create a slot function through the second process;

[0133] The above device also includes:

[0134] The sending unit 306 is used to send the test information to the slot function through the second thread.

[0135] It should be understood that the division of each unit in the above partitioning device is only a division of logical functions. In actual implementation, it can be fully or partially integrated into a physical entity, or it can be physically separated. For example, the above units can be separately established processing elements, or they can be integrated in a chip of the terminal for implementation. In addition, they can also be stored in the storage element of the controller in the form of program code, and called and executed by a processing element of the processor. The functions of the above units. In addition, the units can be integrated together or implemented independently. The processing element here can be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method or the above units can be completed by hardware integrated logic circuits in the processor element or software instructions. The processing element can be a general processor, such as a central processing unit (CPU), or one or more integrated circuits configured to implement the above method, such as one or more application-specific integrated circuits (ASICs), or one or more microprocessors (DSPs), or one or more field programmable gate arrays (FPGAs).

[0136] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 400 includes a processor 401, a memory 402 and a communication interface 403; the processor 401, the memory 402 and the communication interface 403 are interconnected via a bus.

[0137] The memory 402 includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CDROM), and the memory 402 is used for related instructions and data. The communication interface 403 is used to receive and send data, and can realize the functions of the acquisition unit 301, the sending unit 306, and the display unit 307.

[0138] The processor 401 may be one or more central processing units (CPUs). When the processor 401 is a CPU, the CPU may be a single-core CPU or a multi-core CPU. Specifically, the processor 401 may implement the functions of the creation unit 302, the determination unit 303, the calling unit 304, and the testing unit 305.

[0139] The processor 401 in the electronic device 400 is used to read the program code stored in the memory 402 and execute the chip platform upgrade method in the above-mentioned embodiment.

[0140] In an embodiment of the present application, a computer-readable storage medium is provided, and the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the following is achieved: creating a first thread and a second thread through a first process; determining a first interface function corresponding to the first chip platform according to the correspondence between the chip platform and the interface function through the first thread, and calling the first interface function; and testing the first chip platform through the second thread to obtain test information when the firmware upgrade is successful.

[0141] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0142] The present invention is described by flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0143] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

Claims

1. A chip platform upgrade method, characterized in that: Applied to an electronic device, the electronic device is installed with a chip platform upgrade program, the chip platform upgrade program is used to connect to at least one chip platform, the chip platform upgrade program includes a first process, and the method includes: Creating a first thread and a second thread by the first process; Determining, by the first thread, a first interface function corresponding to the first chip platform according to a correspondence between the chip platform and the interface function, and calling the first interface function, wherein the first interface function is used for firmware upgrade of the first chip platform, and the first chip platform is any one of the at least one chip platform; When the firmware upgrade is successful, the first chip platform is tested by the second thread to obtain test information; The testing of the first chip platform to obtain test information includes: executing a customized function through the second thread, wherein a code segment of the customized function is built into the firmware; Testing the execution result of the customized function through the second thread to obtain the test information; The customized function includes a number writing function, and the method further includes: Acquire the first number segment information of the first chip platform through the first process; The executing the customized function through the second thread includes: Executing the number writing function through the second thread, wherein the number writing function is used to write the first number segment information into the number segment storage space of the first chip platform; The step of testing the execution result of the customized function through the second thread to obtain the test information includes: The second number segment information in the number segment storage space is obtained through the second thread, the first number segment information is compared with the second number segment information, and number writing test information is obtained, wherein the test information includes the number writing test information.

2. The method according to claim 1, characterized in that: The chip platform upgrade program further includes a second process, and the method further includes: The test information is displayed on the interface of the chip platform upgrade program through the second process.

3. The method according to any one of claims 1 or 2, characterized in that: The first interface function includes at least one of a first full erase function, a first partial formatting function, and a first upgrade function.

4. The method according to claim 1, characterized in that The acquiring the first number segment information of the first chip platform through the first process includes: Acquire, through the first process, the two-dimensional code parsing information of the first chip platform, the two-dimensional code parsing information including the first number segment information of the first chip platform; Alternatively, the first process is used to connect to a data management system to receive the first number segment information of the first chip platform sent by the data management system.

5. The method according to claim 2, characterized in that: The method further comprises: Creating a slot function through the second process; The test information is sent to the slot function through the second thread.

6. A chip platform upgrade device, characterized in that: Applied to an electronic device, the electronic device is installed with a chip platform upgrade program, the chip platform upgrade program is used to connect at least one chip platform, the chip platform upgrade program includes a first process, and the device includes: A creating unit, configured to create a first thread and a second thread through the first process; a determining unit, configured to determine, through the first thread, a first interface function corresponding to the first chip platform according to a correspondence between the chip platform and the interface function; a calling unit, configured to call the first interface function through the first thread, wherein the first interface function is used for firmware upgrade of the first chip platform, and the first chip platform is any one of the at least one chip platform; A testing unit, configured to test the first chip platform through the second thread when the firmware upgrade is successful, and obtain test information; The testing unit is specifically used to execute a customized function through the second thread, and the code segment of the customized function is built into the firmware; The testing unit is specifically used to test the execution result of the customized function through the second thread to obtain the test information; The customized function includes a number writing function; an acquiring unit, configured to acquire the first number segment information of the first chip platform through the first process; The testing unit is specifically configured to execute the number writing function through the second thread, wherein the number writing function is configured to write the first number segment information into the number segment storage space of the first chip platform; The test unit is specifically used to obtain the second number segment information in the number segment storage space through the second thread, compare the first number segment information with the second number segment information, and obtain number writing test information, and the test information includes the number writing test information.

7. An electronic device, characterized in that: include: Memory, used to store programs; A processor, configured to execute the program stored in the memory; when the program is executed, the processor is configured to execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • File upgrading method and device, computer equipment and storage medium

    CN111327454A

  • Bluetooth module production system

    CN113709270A