Data Processing Method, System, Terminal Device, and Storage Medium

By designing a firmware containing public logical code and peripheral configuration information, the compatibility problem caused by the differences in POS terminal models is solved, compatibility of different terminals is achieved, and software research and development resources are saved.

CN114327443BActive Publication Date: 2025-06-17PAX COMP TECH SHENZHEN
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111662392.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-06-17
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The operating system development and maintenance on the security processor of existing POS terminals is poor software compatibility due to model differences, resulting in waste of software R&D resources.

Method used

A firmware is designed, which includes common logic code and configuration information corresponding to multiple peripherals. Configuration information is obtained through the instruction set to drive the target peripheral to achieve compatibility of different models of POS terminals.

Benefits of technology

It realizes compatibility of different models of POS terminals, saves software R&D resources, and reduces the workload and storage space of R&D personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114327443B_ABST
    Figure CN114327443B_ABST
Patent Text Reader

Abstract

This application is applicable to the field of computer technology, and provides a data processing method, system, terminal device, and storage medium. The method is applied to a first terminal in which a first firmware has been loaded. The first firmware includes a first instruction set and first configuration information corresponding to each of multiple peripherals. The method includes: The first terminal obtains second configuration information from the first firmware according to the first instruction set, where the second configuration information is the first configuration information corresponding to a target peripheral in the first terminal; The first terminal drives the target peripheral according to the first instruction set and the second configuration information. The above method can save software R & D resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and particularly relates to a data processing method, system, terminal device, and storage medium. Background Art

[0002] With the rapid development of electronic technology and network technology, the transaction volume of non-cash business is in a stage of rapid development. As an important form of electronic payment, the transaction of the point of sale (POS) has been more and more widely used. At present, different models of POS terminals have been developed in the POS industry, and the corresponding function configurations of different models of POS terminals are different, so as to meet the different needs of the payment market.

[0003] In order to cope with the differences in the security processor model, peripheral modules, peripheral communication interface resources, peripheral general input / output resources, and function configurations of different models of POS terminals, in the prior art, different software code baselines and firmware are used for the development and maintenance of the operating systems on the security processors of different models of POS terminals. One firmware can only be applicable to one type of terminal, and its compatibility is poor, resulting in a large waste of software R & D resources. Summary of the Invention

[0004] The embodiments of this application provide a data processing method, system, terminal device, and storage medium. All terminals of the same type share a set of firmware generated by software code, and the firmware has good compatibility, thus saving software R & D resources.

[0005] In a first aspect, the embodiments of this application provide a data processing method, which is applied to a first terminal. The first terminal has loaded a first firmware, and the first firmware includes a first instruction set and first configuration information corresponding to each of multiple peripherals. The method includes:

[0006] The first terminal obtains second configuration information from the first firmware according to the first instruction set, where the second configuration information is the first configuration information corresponding to a target peripheral in the first terminal;

[0007] The first terminal drives the target peripheral according to the first instruction set and the second configuration information.

[0008] In a second aspect, the embodiments of this application provide a data processing system. The data processing system includes a first terminal. The first terminal has loaded a first firmware, and the first firmware includes a first instruction set and first configuration information corresponding to each of multiple peripherals. The first terminal is used for:

[0009] Obtain second configuration information from the first firmware according to the first instruction set, where the second configuration information is the first configuration information corresponding to a target peripheral in the first terminal;

[0010] Drive the target peripheral according to the first instruction set and the second configuration information.

[0011] In a third aspect, an embodiment of the present application provides a terminal device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the data processing method described in any one of the first aspects above is implemented.

[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the data processing method described in any one of the first aspects above is implemented.

[0013] In a fifth aspect, an embodiment of the present application provides a computer program product, which when running on a terminal device causes the terminal device to execute the data processing method described in any one of the first aspects above.

[0014] The beneficial effects of the embodiment of the first aspect of the present application compared with the prior art are:

[0015] It can be understood that the beneficial effects of the above second to fifth aspects can refer to the relevant descriptions in the first aspect above, and will not be elaborated here.

[0016] The beneficial effects of the above second to fifth aspects can refer to the relevant descriptions in the first aspect above, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0018] Figure 1 is a schematic flowchart of a data processing method provided by an embodiment of the present application;

[0019] Figure 2 is a schematic flowchart of a data processing method provided by another embodiment of the present application;

[0020] Figure 3 is Figure 1 a schematic flowchart of the implementation steps of step S101 in

[0021] Figure 4 a schematic structural diagram of a terminal device provided by an embodiment of the present application. Detailed implementation manners

[0022] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are proposed to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, the detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0023] It should be understood that when used in the specification of the present application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0024] As used in the specification of the present application and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if detecting [the described condition or event]" can be interpreted as meaning "once determined", "in response to determining", "once detecting [the described condition or event]", or "in response to detecting [the described condition or event]" according to the context.

[0025] In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0026] Reference to "one embodiment" or "some embodiments" etc. described in the specification of this application means that in one or more embodiments of this application, specific features, structures or characteristics described in connection with that embodiment are included. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprise", "include", "have" and their variants all mean "include but not limited to", unless otherwise specifically emphasized in other ways.

[0027] Figure 1 A schematic flowchart of the data processing method provided by this application is shown. This method is applied to a first terminal in which a first firmware has been loaded. The first firmware includes a first instruction set and first configuration information corresponding to each of a plurality of peripherals. Referring to Figure 1 , the detailed description of this data processing method is as follows:

[0028] S101, the first terminal obtains second configuration information from the first firmware according to the first instruction set. The second configuration information is the first configuration information corresponding to the target peripheral in the first terminal.

[0029] Among them, the first instruction set is generated by common logic code, and the first configuration information corresponding to each of the plurality of peripherals is generated by the first configuration code corresponding to each of the plurality of peripherals.

[0030] Here, the common logic code refers to the software code corresponding to the same and stable software requirements between different terminals. The first configuration code corresponding to each of the plurality of peripherals refers to the software code corresponding to the different and changing software requirements between different terminals. Among them, the common logic code and the first configuration code corresponding to each of the plurality of peripherals form a set of software code, which is compiled to generate the first firmware.

[0031] That is to say, the first firmware is generated from a first preset source code, and the first preset source code includes common logic code and the first configuration code corresponding to each of the plurality of peripherals.

[0032] Specifically, after the processor of the first terminal is powered on, the processor of the first terminal starts based on the start instruction in the first instruction set, and then the processor of the first terminal obtains the second configuration information from the first firmware based on the search instruction in the first instruction set. Here, for the specific implementation process, please refer to Part One of the embodiments.

[0033] S102, the first terminal drives the target peripheral according to the first instruction set and the second configuration information.

[0034] Among them, the processor of the first terminal drives the target peripheral based on the driving instructions in the first instruction set and uses the second configuration information.

[0035] Here, driving the target peripheral using the second configuration information aims to put the target peripheral into the working state.

[0036] It should be noted that the target peripheral in the first terminal refers to the peripherals installed in the first terminal other than the processor in the first terminal, which may include printers, magnetic cards, card readers, IC cards, etc. That is to say, the first configuration information corresponding to the target peripheral includes the first configuration information corresponding to each peripheral in the target peripheral.

[0037] As an example rather than a limitation, the same and stable software requirements between different POS terminals may include but are not limited to the following requirements:

[0038] a1) It is necessary to use a security processor to implement the security trigger detection function;

[0039] a2) It is necessary to support the key management system;

[0040] a3) It is necessary to support various security encryption algorithms;

[0041] a4) It is necessary to provide a remote call interface for the application processor;

[0042] a5) It is necessary to support the authorization system;

[0043] a6) It is necessary to support low-power management;

[0044] a7) It is necessary to support the secure password input function;

[0045] a8) It is necessary to support stack overflow detection;

[0046] a9) It is necessary to support the buzzer;

[0047] a10) It is necessary to implement the card function.

[0048] The different and changing software requirements between different POS terminals may include but are not limited to the following requirements:

[0049] b1) Different security processor models;

[0050] b2) Different operating frequencies of the security processor;

[0051] b3) Different memory capacities and memory layouts;

[0052] b4) Different flash capacities and layouts;

[0053] b5) Different function configurations. For example, some POS terminals support magnetic cards while some do not;

[0054] b6) Different communication interface resources;

[0055] b7) Different general-purpose input / output (GPIO) resources;

[0056] b8) Different data communication methods. For example, some POS terminals start serial port DMA communication, while some do not support it;

[0057] b9) Different peripheral models. For example, different POS terminals select different printer / contactless / card models;

[0058] b10) Different sleep / wake-up sources;

[0059] b11) Different printer paper-out detection sampling values;

[0060] b12) Different communication rates;

[0061] b13) Different chip pin multiplexing functions;

[0062] b14) Different serial port flow control requirements;

[0063] b15) Different serial port channels;

[0064] b16) Different card type numbers;

[0065] b17) Different printer models, and some POS terminals have no printers.

[0066] It should be noted that Figure 1 In the implementation method shown, the first firmware corresponds to the type of the processor in the first terminal. That is to say, if the type of the processor in the first terminal is changed, the firmware that the first terminal needs to load is no longer the first firmware, but the second firmware corresponding to the changed type of the processor. To achieve this purpose, it is necessary to pre-generate the firmware corresponding to different types of processors on another terminal. As Figure 2 shown, in a possible implementation method, the above method further includes:

[0067] S201, the second terminal obtains the type of the processor in the first terminal.

[0068] Optionally, the second terminal obtains the type of the target processor of the first terminal input by the user through the human-computer interaction interface on the second terminal.

[0069] S202, The second terminal selects, from multiple second preset source codes, a first preset source code corresponding to the type of the processor in the first terminal. The second preset source codes include common logic codes and configuration codes corresponding to multiple respective peripherals. The types of processors corresponding to different second preset source codes are different.

[0070] It should be noted that the multiple second preset source codes are pre-written. Optionally, the second preset source codes are written based on embedded C language.

[0071] Among them, the common logic codes in the second preset source codes are general codes, which are used to achieve function generality and interface unification for the same software requirements of different terminals.

[0072] The configuration codes corresponding to multiple respective peripherals in the second preset source codes are differential software codes, which are used to implement differential and changing software requirements between different terminals.

[0073] S203, The second terminal generates a first firmware according to the first preset source code, and loads the first firmware into the first terminal.

[0074] The first firmware corresponds to the type of the processor in the first terminal. That is to say, if the type of the processor in the first terminal is replaced, the firmware that the first terminal needs to load is no longer the first firmware, but the second firmware corresponding to the replaced type of the processor.

[0075] In order to further enhance the compatibility of the first firmware loaded into the first terminal, so that the first firmware is applicable not only to the configuration attribute differences of different peripherals of the terminal, but also to the configuration attribute differences of different types of processors of the terminal. In an optional implementation manner, the first firmware further includes third configuration information corresponding to multiple respective processors. The types of processors corresponding to different third configuration information are different; correspondingly, the above method further includes:

[0076] S103, The first terminal obtains, according to the first instruction set, fourth configuration information corresponding to the type of the processor in the first terminal from multiple third configuration information.

[0077] In this implementation manner, the first firmware includes a first instruction set, first configuration information corresponding to multiple respective peripherals, and third configuration information corresponding to multiple respective processors.

[0078] If the multiple first configuration information and the multiple third configuration information can be stored separately, the first terminal respectively obtains, according to the first instruction set, second configuration information corresponding to the first terminal from the multiple first configuration information, and obtains fourth configuration information corresponding to the type of the processor in the first terminal from the multiple third configuration information, that is, respectively executes step S101 and step S103.

[0079] It should be noted that different first configuration information can be distinguished by the identifiers of different terminals, and different third configuration information can be distinguished by the identifiers of different processor types. Generally, the types of processors corresponding to different terminals are different, so different third configuration information can also be distinguished by the identifiers of different terminals.

[0080] Based on this, multiple first configuration information and multiple third configuration information can also be stored merged. Specifically, the third configuration information of the processor and the first configuration information of the peripherals corresponding to the same terminal are grouped together, and different groups of configuration information are distinguished by the identifiers of different terminals.

[0081] S104, the first terminal changes the operating state parameters of the processor of the first terminal according to the fourth configuration information.

[0082] It should be noted that in this implementation, after the processor of the first terminal is powered on, the processor of the first terminal is started based on the startup instruction in the first instruction set. After that, the processor runs with a general parameter to enable the processor to drive the peripherals. In order to meet the processing requirements of the terminal, the performance parameters of the processors required by different terminals are different. Therefore, after the first terminal obtains the fourth configuration information corresponding to the type of the processor of the first terminal, it changes the operating state parameters of the processor of the first terminal according to the fourth configuration information to adapt to the subsequent processing requirements of the terminal.

[0083] It should be noted that steps S103 to S104 and the above steps S101 to S102 are two parallel execution schemes.

[0084] Embodiment 1

[0085] In a possible implementation manner, the implementation process of step S101 may include:

[0086] c1, the first terminal obtains the second configuration information from multiple first configuration information by using the identifier of the first terminal according to the first instruction set.

[0087] Here, as can be seen from the description of step S103 above, different first configuration information can be distinguished by the identifiers of different terminals. Therefore, the first terminal obtains the second configuration information from multiple first configuration information by using the identifier of the first terminal according to the first instruction set.

[0088] It should be noted that the first terminal obtains the identifier of the first terminal before loading the first firmware. For example, the identifier of the first terminal is written into the first terminal through an external device.

[0089] Optionally, the specific implementation process of step S1011 may include:

[0090] c11. The first terminal traverses a first preset list according to a first instruction set using the identifier of the first terminal to obtain a target storage address corresponding to the identifier of the first terminal. The first preset list includes identifiers of different terminals and storage addresses corresponding to the identifiers of each terminal, and the storage address is the memory address storing the configuration information of the peripheral device.

[0091] Optionally, the first preset list is a list of function pointers related to the identifier of the terminal and its corresponding storage address established through an array. The function pointer is used to indicate the storage address of the configuration information of the peripheral device corresponding to the terminal.

[0092] Specifically, the first terminal can call a selection function through a search instruction in the first instruction set, traverse the first preset list using the selection function, and after hitting the identifier of the first terminal, select the target function pointer corresponding to the identifier of the first terminal. Here, the target function pointer is used to indicate the storage of the configuration information of the target peripheral device of the first terminal.

[0093] c12. The first terminal obtains second configuration information according to the target storage address.

[0094] Specifically, the first terminal obtains the second configuration information from the memory corresponding to the target storage address.

[0095] The first firmware includes the configuration information of the peripheral devices corresponding to different terminals. That is, the first preset source code corresponding to the first firmware includes the configuration codes of the peripheral devices corresponding to different terminals. For two terminals that are not completely identical and only have a few differences, the configuration codes of the peripheral devices corresponding to these two terminals are highly similar. If two highly similar configuration codes of the peripheral devices are pre-written, it will increase the workload of R & D personnel and waste human resources. To solve the above problems, as Figure 3 shown, in a possible implementation manner, the implementation process of step S101 may include:

[0096] d1. The first terminal obtains fifth configuration information and sixth configuration information from the first firmware according to the first instruction set. The fifth configuration information is the first configuration information corresponding to the peripheral device in the third terminal, and the sixth configuration information is the first configuration information of the target peripheral device different from the peripheral device in the third terminal.

[0097] Here, the third terminal and the first terminal are two terminals that are not completely identical and only have a few differences. The fifth configuration information, that is, the first configuration information corresponding to the peripheral device in the third terminal, is the complete configuration information corresponding to the peripheral device in the third terminal. The sixth configuration information, that is, the first configuration information of the target peripheral device different from the peripheral device in the third terminal, is the configuration information that is different from the configuration information of the peripheral device in the third terminal and is not the complete configuration information corresponding to the target peripheral device.

[0098] d2. The first terminal extracts the seventh configuration information common to the first terminal and the third terminal from the fifth configuration information.

[0099] d3. The first terminal obtains the second configuration information according to the sixth configuration information and the seventh configuration information.

[0100] Here, the sixth configuration information is the configuration information that is different from the configuration information of the peripherals in the third terminal, and the seventh configuration information is the configuration information common to the target peripherals in the first terminal and the peripherals in the third terminal. Then, by combining the sixth configuration information and the seventh configuration information, the second configuration information can be obtained. Through the above processing, it can be seen that the R & D personnel only need to completely write the configuration code of the peripherals corresponding to one terminal, and only need to write the configuration code of the different parts for the peripherals corresponding to another terminal similar to this terminal, thereby reducing the workload, saving labor costs, and also saving the storage space of the first firmware on the first terminal to a certain extent.

[0101] The data processing method of the embodiment of this application is applicable to the first software framework. Among them, the first software framework is divided into an application layer, a peripheral driver layer, a bus general interface layer, a bus platform adaptation layer, and a processor platform implementation layer from top to bottom.

[0102] Among them, the application layer: is responsible for processing the application layer logic of the security system. Its core function is to provide a remote call interface for the application processor.

[0103] Here, the interfaces and software of the application layer are the same for different terminal products, and it is even not perceivable and does not need to perceive which product the current application layer is running on.

[0104] The peripheral driver layer: is responsible for the driving logic of each peripheral module.

[0105] It should be noted that since the differences between different terminal products are often related to the peripherals. The peripheral driver layer is the core layer for realizing one software for multiple hardware. Here, one software for multiple hardware means that one firmware (a set of software codes) is applicable to multiple terminals. This peripheral driver layer uses the configuration information of the peripherals in the corresponding terminal through object-oriented compilation technology to call the bus general interface layer downward to implement its functions.

[0106] The bus general interface layer: is responsible for the code independent of the platform implementation layer, unifies and defines the system bus interface, and provides an interface service independent of the platform implementation layer for the peripheral driver layer.

[0107] The bus platform adaptation layer: selects and adapts the bus operations of different processor platforms through compilation and function pointer means.

[0108] Here, the bus platform adaptation layer can mask the differences between processor platforms, so that the software above this layer does not need to concern itself with the differences between different processor platforms.

[0109] Processor platform implementation layer: Responsible for implementing the bus drivers for their respective platforms.

[0110] The data processing method of the embodiments of this application is mainly implemented through the peripheral driver layer. When the peripheral driver layer drives a peripheral, the processor needs to send a drive instruction to the peripheral through the corresponding bus to achieve peripheral driving. In this process, the processor needs to first call the corresponding bus interface in the bus general interface layer (the purpose is to send the drive instruction), and calling the corresponding bus interface requires first calling the processor platform adapted to the corresponding bus interface to achieve bus driving. After the software logic execution is completed, the processor sends a drive instruction to the peripheral through the corresponding bus and uses the configuration information to achieve the driving of the peripheral.

[0111] It should be noted that after the peripheral is driven, that is, after the system is initialized, corresponding transaction events can be initiated subsequently. For example, the processor of a POS terminal runs the application layer logic and initiates a printing service through the application layer. After that, the peripheral driver layer uses the configuration information corresponding to the printer to call the bus interface of the corresponding printer downward, and calling the bus interface of the printer requires first calling the processor platform adapted to the bus interface of the printer to achieve bus driving. After the software logic execution is completed, the processor sends a print instruction to the printer through the corresponding bus to achieve the printing service.

[0112] By adopting the method of the embodiments of this application, when developing a terminal product, the common logic code does not need to be modified at all. Only a configuration code corresponding to the peripheral of the terminal product needs to be added to the first preset source code, and the system development of the terminal product can be quickly completed after compilation. Since the common logic code does not need to be changed, while introducing a new terminal product, the stability of the existing terminal products is effectively guaranteed, enabling the enterprise terminal product update to transition stably.

[0113] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.

[0114] The embodiments of this application also provide a data processing system. The data processing system includes a first terminal, and a first firmware is loaded in the first terminal. The first firmware includes a first instruction set and first configuration information corresponding to each of a plurality of peripherals. The first terminal is used for:

[0115] Obtain second configuration information from the first firmware according to the first instruction set, where the second configuration information is the first configuration information corresponding to the target peripheral in the first terminal; drive the target peripheral according to the first instruction set and the second configuration information.

[0116] In a possible implementation, the data processing system further includes a second terminal, and the second terminal is used for:

[0117] Obtain the type of the processor in the first terminal;

[0118] Select, from multiple second preset source codes, the first preset source code corresponding to the type of the processor in the first terminal. The second preset source codes include common logic codes and configuration codes corresponding to multiple peripherals respectively, and different second preset source codes correspond to different types of processors;

[0119] Generate the first firmware according to the first preset source code and load the first firmware into the first terminal.

[0120] Optionally, the first firmware further includes third configuration information corresponding to multiple processors respectively, and different third configuration information corresponds to different types of processors; correspondingly, the first terminal is further used for:

[0121] According to the first instruction set, obtain fourth configuration information corresponding to the type of the processor in the first terminal from multiple third configuration information;

[0122] Change the operating state parameters of the processor in the first terminal according to the fourth configuration information.

[0123] Optionally, the first terminal is further used for:

[0124] According to the first instruction set, obtain the second configuration information from multiple first configuration information by using the identifier of the first terminal.

[0125] Optionally, the first terminal is further used for:

[0126] According to the first instruction set, traverse the first preset list by using the identifier of the first terminal to obtain the target storage address corresponding to the first terminal identifier, where the first preset list includes identifiers of different terminals and storage addresses corresponding to the identifiers of each terminal, and the storage address is the memory address for storing the configuration information of the peripheral;

[0127] The first terminal obtains the second configuration information according to the target storage address.

[0128] Optionally, the first terminal is further used for:

[0129] Obtain the fifth configuration information and the sixth configuration information from the first firmware according to the first instruction set, where the fifth configuration information is the first configuration information corresponding to the peripherals in the third terminal, and the sixth configuration information is the first configuration information corresponding to the target peripheral that is different from the peripherals in the third terminal;

[0130] Extract the seventh configuration information common to the first terminal and the third terminal from the fifth configuration information;

[0131] Obtain the second configuration information according to the sixth configuration information and the seventh configuration information.

[0132] The embodiments of the present application also provide a terminal device. Refer to Figure 4 , the terminal device 400 may include: at least one processor 410, a memory 420, and a computer program stored in the memory 420 and executable on the at least one processor 410. When the processor 410 executes the computer program, it implements the steps in any of the above method embodiments, such as Figure 4 Steps S101 to S102 in the illustrated embodiment.

[0133] Exemplarily, the computer program may be divided into one or more modules / units. One or more modules / units are stored in the memory 420 and executed by the processor 410 to complete the present application. The one or more modules / units may be a series of computer program segments capable of performing specific functions, and these program segments are used to describe the execution process of the computer program in the terminal device 400.

[0134] Those skilled in the art can understand that Figure 4 merely examples of the terminal device, which do not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, buses, etc.

[0135] The processor 410 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0136] The memory 420 can be an internal storage unit of the terminal device or an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. The memory 420 is used to store the computer program and other programs and data required by the terminal device. The memory 420 can also be used to temporarily store the data that has been output or will be output.

[0137] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.

[0138] The data processing method provided by the embodiments of this application can be applied to terminal devices such as computers, tablet computers, laptop computers, netbooks, personal digital assistants (PDAs), etc. The embodiments of this application do not impose any restrictions on the specific types of terminal devices.

[0139] In the above embodiments, the descriptions of the various embodiments each have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0140] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0141] In the embodiments provided in this application, it should be understood that the disclosed terminal devices, apparatuses, and methods can be implemented in other ways. For example, the terminal device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0142] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0143] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0144] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above method embodiments of this application, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by one or more processors, the steps of the above method embodiments can be implemented.

[0145] Similarly, as a computer program product, when the computer program product runs on a terminal device, the terminal device can execute the steps in the above method embodiments when executed.

[0146] Among them, the computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0147] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A data processing method, characterized in that, Applied to a first terminal, where a first firmware is already loaded in the first terminal, and the first firmware includes a first instruction set and first configuration information corresponding to respective peripherals of multiple different terminals. The method includes: The first terminal obtains second configuration information from the first firmware according to the first instruction set, where the second configuration information is the first configuration information corresponding to a target peripheral in the first terminal; The first terminal drives the target peripheral according to the first instruction set and the second configuration information; The first terminal obtaining second configuration information from the first firmware according to the first instruction set includes: The first terminal obtains fifth configuration information and sixth configuration information from the first firmware according to the first instruction set, where the fifth configuration information is the first configuration information corresponding to a peripheral in a third terminal, and the sixth configuration information is the first configuration information corresponding to the target peripheral and different from the peripheral in the third terminal; The first terminal extracts seventh configuration information common to the first terminal and the third terminal from the fifth configuration information; The first terminal obtains the second configuration information according to the sixth configuration information and the seventh configuration information.

2. The data processing method according to claim 1, characterized in that, The method further includes: A second terminal obtains the type of the processor in the first terminal; The second terminal selects a first preset source code corresponding to the type of the processor in the first terminal from multiple second preset source codes. The second preset source codes include common logic codes and configuration codes corresponding to respective peripherals, and different second preset source codes correspond to different types of processors; The second terminal generates the first firmware according to the first preset source code and loads the first firmware into the first terminal.

3. The data processing method according to claim 1, characterized in that, The first firmware further includes third configuration information corresponding to respective processors, and different third configuration information corresponds to different types of processors; The method further includes: The first terminal obtains fourth configuration information corresponding to the type of the processor in the first terminal from the multiple third configuration information according to the first instruction set; The first terminal changes the operating state parameters of the processor in the first terminal according to the fourth configuration information.

4. The data processing method according to claim 1, characterized in that, The first terminal obtaining second configuration information from the first firmware according to the first instruction set includes: The first terminal obtains the second configuration information from multiple pieces of the first configuration information according to the first instruction set by using the identifier of the first terminal.

5. The data processing method according to claim 4, characterized in that, The first terminal obtaining second configuration information from multiple pieces of the first configuration information according to the first instruction set by using the identifier of the first terminal includes: The first terminal traverses a first preset list according to the first instruction set by using the identifier of the first terminal to obtain a target storage address corresponding to the identifier of the first terminal. The first preset list includes identifiers of different terminals and storage addresses corresponding to the identifiers of respective terminals, and the storage address is the memory address storing the configuration information of the peripheral; The first terminal obtains the second configuration information according to the target storage address.

6. A data processing system, characterized in that, The data processing system includes a first terminal, in which a first firmware is loaded. The first firmware includes a first instruction set and first configuration information corresponding to respective peripherals of multiple different terminals. The first terminal is configured to: Obtain second configuration information from the first firmware according to the first instruction set, where the second configuration information is the first configuration information corresponding to a target peripheral in the first terminal; Drive the target peripheral according to the first instruction set and the second configuration information; The first terminal is further configured to: The first terminal obtains fifth configuration information and sixth configuration information from the first firmware according to the first instruction set, where the fifth configuration information is the first configuration information corresponding to a peripheral in a third terminal, and the sixth configuration information is the first configuration information corresponding to the target peripheral and different from the peripheral in the third terminal; The first terminal extracts seventh configuration information common to the first terminal and the third terminal from the fifth configuration information; The first terminal obtains the second configuration information according to the sixth configuration information and the seventh configuration information.

7. The data processing system according to claim 6, characterized in that, The data processing system further includes a second terminal, which is configured to: Obtain the type of the processor in the first terminal; Select, from multiple second preset source codes, a first preset source code corresponding to the type of the processor in the first terminal. The second preset source codes include common logic codes and configuration codes corresponding to respective peripherals, and different second preset source codes correspond to different types of processors; Generate the first firmware according to the first preset source code and load the first firmware into the first terminal.

8. A terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the data processing method according to any one of claims 1 to 5.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the data processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Application method of platform supporting a plurality of types of equipment, mobile terminal

    CN109062617A