CN109299028A - A kind of method and device for calling application strategy - Google Patents

A kind of method and device for calling application strategy Download PDF

Info

Publication number
CN109299028A
CN109299028A CN201811109233.XA CN201811109233A CN109299028A CN 109299028 A CN109299028 A CN 109299028A CN 201811109233 A CN201811109233 A CN 201811109233A CN 109299028 A CN109299028 A CN 109299028A
Authority
CN
China
Prior art keywords
main control
control chip
information
relationship
application strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201811109233.XA
Other languages
Chinese (zh)
Inventor
季恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811109233.XA priority Critical patent/CN109299028A/en
Publication of CN109299028A publication Critical patent/CN109299028A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0016Inter-integrated circuit (I2C)

Abstract

The embodiment of the present application discloses a kind of method for calling application strategy, comprising: obtains the information of main control chip;The quantity of main control chip is determined according to the information of main control chip;According to the quantity of main control chip, call the application strategy for having one-one relationship with main control chip, application strategy for realizing main control chip corresponding function.The embodiment of the present application also provides corresponding device.Technical scheme can efficiently solve the problems, such as the information for occurring omitting or detecting more main control chip when human control, and the quantity of operatively compatible main control chip, to call the application strategy for having corresponding relationship with main control chip, the corresponding function of main control chip is realized.

Description

A kind of method and device for calling application strategy
Technical field
This application involves fields of communication technology, and in particular to a kind of method and device for calling application strategy.
Background technique
In the design process of electronic product, often it is related to the main control chip, firmware, internal integrated circuit bus of equipment (inter-integrated-circuit, I2C) and I2C bus switch (inter-integrated-circuit Switch, I2C Switch).Main control chip is the core component of equipment, is the bridge between each equipment of connection;Firmware Rewritable read-only memory (eraseable read only memory, EROM) is exactly written or electric erazable programmable is read-only deposits Program in reservoir (electrically erasable programmable ROM, EEPROM) is applied in hardware device; I2C bus is a kind of simple, bidirectional two-line synchronous serial bus by PHILIPS Co.'s exploitation, it only needs both threads Information is transmitted between the device being connected in bus;I2C Switch can be expanded enough in limited I2C resource Interface, solve the problems, such as use I2C bus capacity.
Can be realized different functions based on electronic product, and reduce during designing electronic product cost because Element considers, does the design of compatible different number main control chip, in the same equipment often so as to call different master controls The corresponding application strategy of chip, realizes different functions.The prior art is the actual conditions according to equipment, manually carries out selection pair Main control chip and human control these main control chips answered.
Therefore, when manually being managed, the information of main control chip can be omitted or detect more, so that device hardware Can not the corresponding application strategy of operatively compatible main control chip, realize corresponding function.
Summary of the invention
The embodiment of the present application provides a kind of method and device for calling application strategy, effectively normally compatible can lead The quantity of chip is controlled, to call the application strategy for having relationship with main control chip, realizes the corresponding function of main control chip.
In view of this, the embodiment of the present application provides following scheme:
The first aspect of the application provides a kind of method for calling application strategy, and the method for the calling application strategy mainly relates to And main control chip, I2C bus address and corresponding device.This method comprises: obtaining the information of main control chip;According to master control core The information of piece determines the quantity of main control chip;According to the quantity of main control chip, calls and have one-one relationship with main control chip Application strategy, application strategy for realizing main control chip corresponding function.By the above first aspect as it can be seen that by obtaining master control core The information of piece can determine the quantity of main control chip, occur omitting or detecting more main control chip when solving human control The problem of information, the quantity of operatively compatible main control chip call the application strategy for having corresponding relationship with main control chip, thus Realize the corresponding function of main control chip.
Optionally, with reference to the above first aspect, in the first possible implementation, the information of main control chip is obtained, It may include: that corresponding relationship is scanned by automatic detecting machine system, corresponding relationship is main control chip and internal integrated circuit bus One-one relationship between I2C bus address, I2C bus address are that I2C bus switch is that each main control chip uniquely distributes Address;According to the I2C bus address in corresponding relationship, the information of main control chip is obtained, the information of main control chip includes I2C total Line address.It, can by main control chip and I2C due to the corresponding determining I2C bus address of each main control chip Corresponding relationship between location gets the information of main control chip, improves the accuracy for obtaining this process of information.
Optionally, with reference to the above first aspect or first aspect the first possible implementation, possible at second In implementation, the quantity of main control chip is determined according to the information of main control chip, may include: poll detection n times main control chip Information, N is integer greater than 1;Judge whether the information of the corresponding main control chip of poll detection n times is consistent;If consistent, unite Count the information number of main control chip;The quantity of main control chip is determined according to the information number of main control chip.Since one can be can be carried out The information of secondary poll detection main control chip can not veritably know the quantity of final main control chip, therefore multiple by carrying out Poll detection, and the consistency on messaging after each poll detection is matched, improve the accuracy for determining the quantity of main control chip.
Optionally, second of possible implementation with reference to the above first aspect, in the third possible implementation, Judge whether the information of the corresponding main control chip of poll detection n times is consistent, may include: the record first information, the first information is Carry out the information that first poll detects corresponding main control chip;The second information is recorded, the second information is after recording the first information Carry out the information that N-1 poll detects corresponding main control chip;Judge whether the first information matches with the second information;If matching, Then judge that the information of the corresponding main control chip of poll detection n times is consistent.Due to the letter the corresponding main control chip of poll detection n times Breath carries out the judgement of matching degree, can effectively illustrate the high consistency of the information of main control chip.
Optionally, with reference to the above first aspect or first aspect the first possible implementation, possible at the 4th kind In implementation, according to the quantity of main control chip, the application strategy for having one-one relationship with main control chip is called, can wrap It includes: in the information of the main control chip of acquisition, searching the information of the corresponding main control chip of quantity of main control chip, main control chip It include the I2C bus address of main control chip in information;According to the I2C bus address of main control chip, calling has with main control chip The application strategy of one-one relationship.Since main control chip and application strategy are one-to-one relationships, and the information of main control chip In include I2C bus address, therefore can be called according to I2C bus address and have the application of one-one relationship with main control chip Strategy is the corresponding application strategy of operatively compatible main control chip, realizes that corresponding function provides a variety of possibilities.
The application second aspect provides a kind of device for calling application strategy, the device have realize above-mentioned first aspect or The function of the method for any one possible implementation of first aspect.The function can be by hardware realization, can also be by hard Part executes corresponding software realization.The hardware or software include one or more units corresponding with above-mentioned function or module.
The application third aspect provides a kind of device for calling application strategy, comprising: processor and memory;The memory For storing program instruction, when the apparatus is operative, which executes the program instruction of memory storage, so that the dress Set the method for calling application strategy executed such as any one possible implementation of above-mentioned first aspect or first aspect.
The application fourth aspect provides a kind of computer readable storage medium, is stored in the computer readable storage medium Instruction, when run on a computer, allowing computer to execute above-mentioned first aspect or first aspect, any one can The method for being able to achieve the calling application strategy of mode.
The 5th aspect of the application provides a kind of computer program product comprising instruction, when run on a computer, Computer is allowed to execute the calling application strategy of above-mentioned first aspect or first aspect any one possible implementation Method.
The 6th aspect of the application provides a kind of chip system, which includes processor, for supporting device to realize Function involved in above-mentioned first aspect or first aspect any one possible implementation.In a kind of possible design In, chip system further includes memory, and memory is used for the necessary program instruction of save set and data.The chip system, can To be made of chip, chip and other discrete devices also may include.
Wherein, any implementation institute band in terms of second aspect, the third aspect, fourth aspect, the 5th, in the 6th aspect The technical effect come can be found in technical effect brought by different implementations in first aspect, and details are not described herein again.
As can be seen from the above technical solutions, the embodiment of the present application has the advantage that
It is polled detection by information of the automatic detecting machine system to main control chip, so that according to poll each time is judged The information of main control chip after detection unanimously determines main control chip quantity, thus corresponding according to these main control chip quantity I2C bus address in the information of main control chip calls the application strategy for having one-one relationship with main control chip.In this way, logical The automatic detecting machine system of mistake determines occur omitting or detect more master when the quantity of main control chip efficiently solves human control The problem of controlling the information of chip is capable of the quantity of operatively compatible main control chip, calls and has corresponding relationship with main control chip Application strategy, to realize the corresponding function of main control chip.
Detailed description of the invention
Fig. 1 is the schematic diagram of a scenario that application strategy is called in the embodiment of the present application;
Fig. 2 is one embodiment schematic diagram provided by the embodiments of the present application for calling application strategy method;
Fig. 3 is another embodiment schematic diagram provided by the embodiments of the present application for calling application strategy method;
Fig. 4 is another embodiment schematic diagram provided by the embodiments of the present application for calling application strategy method;
Fig. 5 is one embodiment schematic diagram of device provided by the embodiments of the present application;
Fig. 6 is another embodiment schematic diagram of device provided by the embodiments of the present application;
Fig. 7 is another embodiment schematic diagram of device provided by the embodiments of the present application.
Specific embodiment
The embodiment of the present application provides a kind of method and device for calling application strategy, enables device hardware effective The quantity that ground is normally compatible with main control chip realizes main control chip to call the application strategy for having relationship with main control chip Corresponding function.
Fig. 1 is the schematic diagram of a scenario that application strategy is called in the embodiment of the present application.
In the design process for being related to electronic product, the cooperation between all parts in equipment, ability are generally required Application strategy is called to realize corresponding function.For example main control chip is the core component of equipment, each main control chip is right Store different application strategies with answering;I2C bus is a kind of bidirectional two-line synchronous serial bus, it only needs both threads i.e. Information can be transmitted between the device being connected in bus;I2C Switch can be expanded enough in limited I2C resource More interfaces solves the problems, such as using I2C bus capacity.Usually after device power-up, I2C Switch can be each Main control chip distributes the address I2C uniquely fixed, and device can be according in each each main control chip of I2C call by location The corresponding application strategy that store, to realize the corresponding function of each main control chip.
Based on the considerations of factors such as costs, in the design process of electronic product, it will usually be compatible in the same apparatus The main control chip of different number, and use manually according to this mode of quantity for carrying out selection main control chip the case where equipment, and It is unfavorable for accurately selecting the quantity, therefore when the quantity of human control these main control chips, it just can not be effectively It detects the information of main control chip, cannot reasonably be compatible with the corresponding application strategy of main control chip, also just cannot achieve master control core The corresponding function of piece.
As shown in Figure 1, including device, main control chip and I2C Switch in the Fig. 1.Mainly exist in this programme Automatic detecting machine system is added in device, the corresponding I2C of each main control chip can be scanned by automatic detecting machine system in this way Bus address allows to call difference to judge the quantity of main control chip according to the information that scanning I2C bus address returns The corresponding application strategy of main control chip realizes the corresponding function of different main control chips.
Device involved by above-mentioned Fig. 1 can be firmware, is also possible to the device of other similar firmware, does not limit specifically It is fixed;The quantity of mentioned main control chip can be to be N number of, and N is positive integer, and particular number is without limitation.
Figure 1 above is the introduction to the schematic diagram of a scenario of this programme, in order to make it easy to understand, the embodiment of the present application is described below The provided method for calling application strategy.
Fig. 2 is one embodiment schematic diagram provided by the embodiments of the present application for calling application strategy method.
As shown in Fig. 2, one embodiment provided by the embodiments of the present application for calling application strategy method includes:
201, the information of main control chip is obtained.
In the present embodiment, the information of main control chip can be first obtained, is determined conducive to according to the information of these main control chips The quantity of main control chip.Main control chip information can be the return value either I2C bus address of main control chip, answer actual In, also more about the information of main control chip, specifically herein without limitation.
202, the quantity of main control chip is determined according to the information of main control chip.
In the present embodiment, if obtain main control chip information after, such as obtain main control chip return value or It is I2C bus address, then the quantity of main control chip can be determined according to these information.
203, according to the quantity of main control chip, the application strategy for having one-one relationship with main control chip is called, using plan Slightly for realizing the corresponding function of main control chip.
In the present embodiment, if after determining the quantity of main control chip according to the information of main control chip, then can be according to master The quantity for controlling chip, calls the corresponding application strategy of these main control chips, these application strategies are and the master control core determined Piece has one-one relationship, and is respectively used to realize the corresponding function of different main control chips.
It should be noted that above-mentioned mentioned application strategy can be storage strategy or calculative strategy, correspondingly The function of main control chip is then store function or computing function, these functions may include many kinds of parameters, such as executes speed Either power consumption etc., specifically herein without limitation.
In the present embodiment, main control chip quantity is determined by obtaining the information of main control chip, thus according to these masters The information of the corresponding main control chip of number of chips is controlled, the application strategy for having one-one relationship with main control chip is called.The implementation There is the problem of omitting or detecting the information of main control chip more, operatively compatible master control core when being able to solve human control in example The quantity of piece is called and has the application strategy of corresponding relationship with main control chip, to realize the corresponding function of main control chip.
In order to make it easy to understand, the detailed process in the embodiment of the present application is specifically introduced below, referring to Fig. 3, Fig. 3 It is another embodiment schematic diagram provided by the embodiments of the present application for calling application strategy method.
As shown in figure 3, another embodiment provided by the embodiments of the present application for calling application strategy method includes:
301, corresponding relationship is scanned by automatic detecting machine system.
In the present embodiment, in order to solve the problems, such as brought by manual operation, therefore automatic detecting machine system is added in a device, In this way corresponding relationship can be scanned by automatic detecting machine system.
It should be noted that corresponding relationship is between main control chip and the I2C bus address of internal integrated circuit bus One-one relationship, and it is the ground that each main control chip uniquely distributes that mentioned I2C bus address, which is I2C bus switch, Location.The address has the function of the corresponding main control chip of unique identification.
302, according to the I2C bus address in corresponding relationship, the information of main control chip is obtained.
It, can be according to I2C because corresponding relationship is connected to main control chip and I2C bus address in the present embodiment Bus address finds main control chip, to get the information of main control chip.
It should be noted that main control chip information can be the return value of main control chip, and certainly, the I2C bus address It is a part of the main control chip information, in actual application, also more about the information of main control chip, specifically herein not It limits.
303, the information of poll detection n times main control chip.
In the present embodiment, after the information for obtaining main control chip, it is necessary to by automatic detecting machine system to these master control cores The information of piece carries out the detection of n times poll, and avoiding may be having not been obtained the letter of main control chip caused by communicating the problems such as unsmooth Breath.
It should be noted that mentioned N is greater than 1 integer.
304, judge whether the information of the corresponding main control chip of poll detection n times is consistent.
In the present embodiment, after the information to main control chip is polled detection n times, it can be determined that the inspection of this n times poll There is the information of the main control chip of which time to be consistent in the information of survey, is conducive to the quantity for determining main control chip.
Judgment mode may is that after the information of first poll detection main control chip, so that it may detect first poll The information of main control chip is recorded, it is assumed that is recorded as the first information;Then after recording the first information, N-1 poll is carried out Detect the information of corresponding main control chip, it is assumed that it is recorded as the second information, it thus can be by judging the first information and second Whether information matches, also it is known that the first information and the second information whether be the same main control chip information.In reality Application in, there are also the modes that more judge, specifically without limitation.
305, the information number of main control chip is counted.
In the present embodiment, after the information for judging the corresponding main control chip of poll detection n times is consistent, then can be The information of main control chip after being polled and having detected n times, consistent information that this n times is detected as the same information, N times out can thus be added up and detect the consistent information number of information.
306, the quantity of main control chip is determined according to the information number of main control chip.
In the present embodiment, after counting the information number of main control chip because each main control chip correspond to it is different Information, so can know the quantity of main control chip according to the number of information.
307, the information of the corresponding main control chip of quantity of main control chip is searched, includes master control core in the information of main control chip The I2C bus address of piece.
In the present embodiment, after determining the quantity of main control chip, it is necessary in the information of the main control chip of above-mentioned acquisition In find the information for corresponding to the main control chip of these quantity, these quantity can be just known from the information of main control chip in this way Main control chip I2C bus address.
308, according to the I2C bus address of main control chip, the application strategy for having one-one relationship with main control chip is called.
In the present embodiment, after the information for the main control chip that the quantity for finding the above-mentioned main control chip referred to corresponds to, The application strategy for having relationship with main control chip can be called according to I2C bus address.It should be noted that main control chip with Application strategy is one-to-one relationship, and the application strategy of each main control chip is for realizing the phase of the main control chip corresponded to Answer function.
It should be noted that mentioned application strategy can be storage strategy or calculative strategy, correspondingly master control The function of chip is then store function or computing function, these functions may include many kinds of parameters, for example, execute speed or It is power consumption etc., specifically herein without limitation.
In the present embodiment, the I2C bus address in corresponding relationship is scanned by automatic detecting machine system to obtain main control chip Information, and the information for asking detection n times main control chip through automatic detecting machine ratch determines main control chip quantity, thus according to I2C bus address in the information of the main control chip corresponded to according to the quantity of these main control chips, calling have with main control chip The application strategy of one-one relationship realizes the corresponding function of main control chip.
Embodiment in above-mentioned Fig. 3 is to carry out the detection of n times poll to the information of main control chip, and lower mask body is refined to progress 3 polls detect the information of N number of main control chip, can most effectively determine the quantity of main control chip.
Fig. 4 is another embodiment schematic diagram provided by the embodiments of the present application for calling application strategy method.
As shown in figure 4, another embodiment of calling application strategy method provided by the embodiments of the present application includes:
401, corresponding relationship is scanned by automatic detecting machine system.
402, according to the I2C bus address in corresponding relationship, the information of main control chip is obtained.
Step 401-402 in the present embodiment is similar with the step 301-302 in Fig. 3, is not repeated herein.
403, poll detects the information of 3 main control chips.
In the present embodiment, after the information for obtaining main control chip, it is necessary to by automatic detecting machine system to these master control cores The information of piece is polled detection.
404, judge whether the information of poll 3 corresponding main control chips of detection is consistent.
In the present embodiment, after the information to main control chip is polled detection 3 times, it can be determined that this 3 poll inspections There is the information of the main control chip of which time to be consistent in the information of survey, is conducive to the quantity for determining main control chip.
Judgment mode may is that after the information of first time poll detection main control chip, so that it may examine first time poll The information of the main control chip of survey is recorded, and the first information is recorded as;Then after recording the first information, second of poll is carried out The information for detecting corresponding main control chip is recorded as the second information;Then after recording the second information, the inspection of third time poll is carried out The information for surveying corresponding main control chip is recorded as third information;It thus can be by judging the first information, the second information and Whether three information match, also it is known that whether the first information, the second information and third information are the same main control chip Information.In actual application, there are also the modes more judged, specifically without limitation.
405, the information number of main control chip is counted.
In the present embodiment, judge poll detect 3 corresponding main control chips information it is consistent after, then can be The information of main control chip after being polled and having detected 3 times, consistent information that this 3 times are detected as the same information, It can thus add up to detect the consistent information number of information 3 times out.
For example, detecting that the information of main control chip is A, B, C, D, E and F in first time poll;It is examined in second of poll The information for measuring main control chip is A, B, C, E and F;Third time poll detect main control chip information be C, D, E and F;The information for being so just clear the main control chip for knowing that this 3 polls detect is consistent for C, E and F, then information It is 3 that number, which just counts,.Certainly, the above-mentioned character referred to only plays the role of an explanation, specifically without limitation.
406, the quantity of main control chip is determined according to the information number of main control chip.
In the present embodiment, after counting the information number of main control chip because each main control chip correspond to it is different Information, so can know the quantity of main control chip according to the number of information.
For example, the information number of main control chip is 3, and each information is different in above-mentioned steps 405, So the quantity of main control chip is 3.
407, the information of the corresponding main control chip of quantity of main control chip is searched, includes master control core in the information of main control chip The I2C bus address of piece.
In the present embodiment, after determining the quantity of main control chip, it is necessary in the information of the main control chip of above-mentioned acquisition In find the information for corresponding to the main control chip of these quantity, these quantity can be just known from the information of main control chip in this way Main control chip I2C bus address.
For example, the quantity of the main control chip of above-mentioned determination is 3, then will be in the letter of all main control chips got The information that this 3 main control chips correspond to is found in breath, i.e., C, E and F are found in A, B, C, D, E and F;And these are believed It include the I2C bus address of respective main control chip in breath C, E and F.
408, according to the I2C bus address of main control chip, the application strategy for having one-one relationship with main control chip is called.
In the present embodiment, after finding information C, E and F that above-mentioned 3 referred to main control chip corresponds to, so that it may Respectively according to the I2C bus address for including in C, E and F, the application strategy for having relationship with main control chip is called.It needs to illustrate , main control chip and application strategy are one-to-one relationships, and the application strategy of each main control chip is for realizing correspondence Main control chip corresponding function.
It should be noted that mentioned application strategy can be storage strategy or calculative strategy, correspondingly master control The function of chip is then store function or computing function, these functions may include many kinds of parameters, for example, execute speed or It is power consumption etc., specifically herein without limitation.
In the present embodiment, the I2C bus address in corresponding relationship is scanned by automatic detecting machine system to obtain N number of master control core The information of piece, and the information of 3 main control chips of detection is ask through automatic detecting machine ratch to determine main control chip quantity, thus I2C bus address in the information for the main control chip that quantity according to these main control chips corresponds to calls and has with main control chip The application strategy of standby one-one relationship, realizes the corresponding function of main control chip.
It is above-mentioned that mainly scheme provided by the embodiments of the present application is described from unilateral angle.It can be understood that being Realization above-mentioned function contains and executes the corresponding hardware configuration of each function and/or software module.Those skilled in the art answer This is readily appreciated that, module described in conjunction with the examples disclosed in the embodiments of the present disclosure and algorithm steps, the application energy The combining form with hardware or hardware and computer software is reached to realize.Some function is driven actually with hardware or computer software The mode of dynamic hardware executes, the specific application and design constraint depending on technical solution.Professional technician can be right Each specific application is to use different methods to achieve the described function, but this realization is it is not considered that exceed the application Range.
The embodiment of the present application can carry out the division of functional module according to above method example to device, for example, can be right The each functional module of each function division is answered, two or more functions can also be integrated in a processing module. Above-mentioned integrated module both can take the form of hardware realization, can also be realized in the form of software function module.It needs Illustrate, is schematical, only a kind of logical function partition to the division of module in the embodiment of the present application, it is practical to realize When there may be another division manner.
Fig. 5 is one embodiment schematic diagram of device provided by the embodiments of the present application.
As shown in figure 5, device provided by the embodiments of the present application includes acquiring unit 501, determination unit 502, call unit 503;
Acquiring unit 501, for obtaining the information of main control chip;
The information of determination unit 502, the main control chip for being got according to acquiring unit 501 determines the number of main control chip Amount;
Call unit 503;Quantity for the main control chip determined according to determination unit 502, calling and main control chip Have an application strategy of one-one relationship, application strategy for realizing main control chip corresponding function.
In the present embodiment, according to the quantity for the main control chip that the information of the main control chip of acquisition is determined, thus according to number Amount calls the application strategy for having one-one relationship with main control chip, realizes the corresponding function of main control chip.
The device in the embodiment of the present application is understood in detail in order to make it easy to understand, please referring to Fig. 6, Fig. 6 is this Shen Please another embodiment schematic diagram of device for providing of embodiment, including acquiring unit 601, determination unit 602, call unit 603, it is similar with the function of above-mentioned 501-503;
Acquiring unit 601 in the present embodiment may include:
Scan module 6011, for scanning corresponding relationship by automatic detecting machine system, corresponding relationship be main control chip with it is interior One-one relationship between the I2C bus address of portion's IC bus, I2C bus address are that I2C bus switch is each The address that main control chip uniquely distributes;
Module 6012 is obtained, the I2C bus address in the corresponding relationship for scanning according to scan module 6011 obtains The information of main control chip, the information of main control chip include I2C bus address.
Further, in this embodiment determination unit 602 may include:
Poll detection module 6021, for the information of poll detection n times main control chip, N is the integer greater than 1;
Judgment module 6022, for judging the information of the corresponding main control chip of 6021 poll of poll detection module detection n times It is whether consistent;
Statistical module 6023, for judging the information one of the corresponding main control chip of poll detection n times when judgment module 6022 When cause, the information number of main control chip is counted;
The information number of determining module 6024, the main control chip for being counted according to statistical module 6023 determines master control core The quantity of piece.
In the present embodiment, the I2C bus address in corresponding relationship is scanned by automatic detecting machine system to obtain main control chip Information, then poll detection n times main control chip information come the quantity for the main control chip determined, thus according to quantity call with Main control chip has the application strategy of one-one relationship, realizes the corresponding function of main control chip.
The device in the embodiment of the present application is described from the angle of modular functionality entity above, below from hardware The apparatus module in the embodiment of the present application is described in the angle of reason, referring to Fig. 7, the device in the embodiment of the present application is another Embodiment includes:
Input interface 701, output interface 702, processor 703 and memory 704, (wherein processor 703 in device Quantity can be one or more, in Fig. 7 by taking a processor 703 as an example).In some embodiments of the present application, input interface 701, output interface 702, processor 703 and memory 704 can be connected by bus or other means, wherein to pass through in Fig. 7 For bus connection.
Pass through the operational order for calling memory 704 to store, processor 703, for realizing the calling application of above-mentioned offer Implementation of strategies example.
Specifically, acquiring unit 501, determination unit 502 in Fig. 5, call unit 503, acquiring unit 601 in Fig. 6, Determination unit 602, scan module 6011, obtains module 6012 and poll detection module 6021, judges mould call unit 603 Block 6022, statistical module 6023, determining module 6024 function/realization process can by the processor 703 in Fig. 7 call deposit The computer executed instructions that store in reservoir 704 are realized.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned includes: that read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory).
The above, above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although referring to before Embodiment is stated the application is described in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of method for calling application strategy characterized by comprising
Obtain the information of main control chip;
The quantity of the main control chip is determined according to the information of the main control chip;
According to the quantity of the main control chip, the application strategy for having one-one relationship with the main control chip is called, it is described to answer With strategy for realizing the corresponding function of the main control chip.
2. the method according to claim 1, wherein the information for obtaining main control chip, comprising:
Corresponding relationship is scanned by automatic detecting machine system, the corresponding relationship is the main control chip and internal integrated circuit bus I2C bus address between one-one relationship, the I2C bus address be I2C bus switch be each main control chip only The address of one distribution;
According to the I2C bus address in the corresponding relationship, the information of the main control chip is obtained, the main control chip Information includes the I2C bus address.
3. method according to claim 1 or 2, which is characterized in that the information according to the main control chip determines institute State the quantity of main control chip, comprising:
Poll detects the information of main control chip described in n times, and the N is the integer greater than 1;
Judge whether the information of the corresponding main control chip of the poll detection n times is consistent;
If consistent, the information number of the main control chip is counted;
The quantity of the main control chip is determined according to the information number of the main control chip.
4. according to the method described in claim 3, it is characterized in that, the corresponding master of the judgement poll detection n times Whether the information for controlling chip is consistent, comprising:
The first information is recorded, the first information is the information for carrying out first poll and detecting the corresponding main control chip;
The second information is recorded, second information is to carry out N-1 poll after recording the first information to detect corresponding institute State the information of main control chip;
Judge whether the first information matches with second information;
If matching, judge that the information of the corresponding main control chip of the poll detection n times is consistent.
5. method according to claim 1 or 2, which is characterized in that the quantity according to the main control chip, call with The main control chip has the application strategy of one-one relationship, comprising:
In the information of the main control chip of acquisition, the letter of the corresponding main control chip of quantity of the main control chip is searched It ceases, includes the I2C bus address of the main control chip in the information of the main control chip;
According to the I2C bus address of the main control chip, the application strategy for having one-one relationship with the main control chip is called.
6. a kind of device for calling application strategy characterized by comprising
Acquiring unit, for obtaining the information of main control chip;
Determination unit, the information for the main control chip according to the information acquired by the acquisition unit determine the main control chip Quantity;
Call unit, the quantity of the main control chip for being determined according to the determination unit are called and the master control core Piece has an application strategy of one-one relationship, the application strategy for realizing the main control chip corresponding function.
7. device according to claim 6, which is characterized in that the acquiring unit, comprising:
Scan module, for scanning corresponding relationship by automatic detecting machine system, the corresponding relationship be the main control chip with it is interior One-one relationship between the I2C bus address of portion's IC bus, the I2C bus address are that I2C bus switch is The address that each main control chip uniquely distributes;
Module is obtained, the I2C bus address in the corresponding relationship for scanning according to the scan module obtains The information of the main control chip, the information of the main control chip include the I2C bus address.
8. device according to claim 6 or 7, which is characterized in that the determination unit, comprising:
Poll detection module, for the information of main control chip described in poll detection n times, the N is the integer greater than 1;
Judgment module, for judge the corresponding main control chip of poll detection module poll detection n times information whether Unanimously;
Statistical module, for judging the information one of the corresponding main control chip of the poll detection n times when the judgment module When cause, the information number of the main control chip is counted;
The information number of determining module, the main control chip for being gone out according to the statistical module counts determines the master control core The quantity of piece.
9. a kind of device for calling application strategy, which is characterized in that described device includes: input/output (I/O) interface, processing Device and memory,
Program instruction is stored in the memory;
The processor executes such as side as claimed in any one of claims 1 to 5 for executing the program instruction stored in memory Method.
10. a kind of computer readable storage medium, including instruction, which is characterized in that when described instruction is transported on a computing device When row, so that the computer equipment executes method according to any one of claims 1 to 5.
CN201811109233.XA 2018-09-21 2018-09-21 A kind of method and device for calling application strategy Withdrawn CN109299028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811109233.XA CN109299028A (en) 2018-09-21 2018-09-21 A kind of method and device for calling application strategy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811109233.XA CN109299028A (en) 2018-09-21 2018-09-21 A kind of method and device for calling application strategy

Publications (1)

Publication Number Publication Date
CN109299028A true CN109299028A (en) 2019-02-01

Family

ID=65163810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811109233.XA Withdrawn CN109299028A (en) 2018-09-21 2018-09-21 A kind of method and device for calling application strategy

Country Status (1)

Country Link
CN (1) CN109299028A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947042A (en) * 2019-03-27 2019-06-28 北京龙鼎源科技股份有限公司 Polling method and device, storage medium, the electronic device of I/O module

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947042A (en) * 2019-03-27 2019-06-28 北京龙鼎源科技股份有限公司 Polling method and device, storage medium, the electronic device of I/O module

Similar Documents

Publication Publication Date Title
CN109544068A (en) Storage order sorting method based on robot
CN110297766A (en) Method for testing software and software testing system based on distributed test node cluster
CN109254864A (en) A kind of application failure restorative procedure, device and electronic equipment
CN110365536A (en) A kind of the fault cues method and relevant apparatus of internet of things equipment
CN108241853A (en) A kind of video frequency monitoring method, system and terminal device
CN110913447B (en) Network control method, network control device, storage medium and electronic equipment
CN110247796A (en) Monitoring alarm method, apparatus and relevant device
CN110069366A (en) A kind of reloading method, apparatus and server
CN106557308A (en) A kind of software continuous integrated approach and device
CN110711946A (en) Control method and device of marking machine and marking machine
CN108376110A (en) A kind of automatic testing method, system and terminal device
CN116185873A (en) Storage component testing method and system, storage medium and electronic equipment
CN108683550A (en) A kind of call method and relevant device of configuration interface
CN106201346B (en) A kind of data processing method and storage equipment
CN109299028A (en) A kind of method and device for calling application strategy
CN104765792A (en) Dimension data storing method, device and system
CN110334081A (en) The cleaning method and device of mass data
CN108924325A (en) Data processing method and relevant apparatus
CN112231251A (en) Board card slot identification method and device, communication equipment and readable storage medium
CN109254796A (en) A kind of upper disk configuration method and host of USB device
CN108628744A (en) Method for diagnosing faults, device and electronic equipment
CN108647139A (en) Test method, device, storage medium and the electronic device of system
CN108228340A (en) terminal control method and device, terminal device and computer readable storage medium
CN211982148U (en) Wireless signal detection system and wireless signal detection device
CN114371954A (en) Automatic recovery method of micro-service system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20190201

WW01 Invention patent application withdrawn after publication