CN117675945A - Quick charge protocol event processing method and device - Google Patents

Quick charge protocol event processing method and device Download PDF

Info

Publication number
CN117675945A
CN117675945A CN202311652085.7A CN202311652085A CN117675945A CN 117675945 A CN117675945 A CN 117675945A CN 202311652085 A CN202311652085 A CN 202311652085A CN 117675945 A CN117675945 A CN 117675945A
Authority
CN
China
Prior art keywords
processing
target
event
input
module
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.)
Pending
Application number
CN202311652085.7A
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.)
Zhuhai Zhirong Technology Co ltd
Original Assignee
Zhuhai Zhirong 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 Zhuhai Zhirong Technology Co ltd filed Critical Zhuhai Zhirong Technology Co ltd
Priority to CN202311652085.7A priority Critical patent/CN117675945A/en
Publication of CN117675945A publication Critical patent/CN117675945A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

The application discloses a fast charging protocol event processing method and device, and belongs to the technical field of fast charging protocols. The fast charging protocol event processing method comprises the following steps: receiving target input of a user, wherein the target input is used for inserting a target module and/or inputting a first processing function corresponding to a default module; the target module is used for executing the first processing logic, and the processing logic corresponding to the target module and the default module are different; the first processing function is used for modifying default processing logic corresponding to the default module; the target input is used for processing a target event; judging whether control right corresponding to the target event needs to be taken over or not based on the target input and the processing state of the last event corresponding to the target event; in response to a target input, processing the target event based on the first processing logic and/or the first processing function in the event that it is determined that control authority needs to be taken over and the last event is processed. According to the quick charge protocol event processing method, a user can modify or add codes by himself, and flexibility is high.

Description

Quick charge protocol event processing method and device
Technical Field
The application belongs to the technical field of fast charging protocols, and particularly relates to a fast charging protocol event processing method and device.
Background
With the wide application of the fast-charging protocol, the number of fast-charging protocol chips on the market is increasing, and users hope to modify or add application codes to realize special demands in the actual use process. In a common fast-charging protocol chip, a user often provides a requirement list, and then a chip former factory carries out custom programming, the common fast-charging protocol event processing method cannot modify or add application codes on a software system which has realized basic functions, and along with the increase of custom requirements, a great deal of manpower and time cost of the chip former factory are required to be consumed in the custom process, the flexibility of modifying or adding the application codes by the user is low, personalized customization cannot be carried out by the user, and the application scene is limited.
Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the prior art. Therefore, the application provides the quick charge protocol event processing method and the quick charge protocol event processing device, which can enable a user to modify or add application codes based on own requirements on a software system with a realized basic function so as to realize special function requirements, and enable the user to modify or add application codes to be customized by self on the basis of reducing the labor and time cost of developing a user scheme in a chip factory, so that the application code modifying or adding flexibility is high, and the application code customizing method and the application code customizing device can be used for widening the application scene.
In a first aspect, the present application provides a method for processing a fast charging protocol event, where the method includes:
receiving target input of a user, wherein the target input is used for inserting a target module and/or inputting a first processing function corresponding to a default module; the target module is used for executing first processing logic, and the processing logic corresponding to the target module and the default module are different; the first processing function is used for modifying default processing logic corresponding to the default module; the target input is used for processing a target event;
judging whether control right corresponding to the target event needs to be taken over or not based on the target input and the processing state of the last event corresponding to the target event;
and in the case that the control right needs to be taken over and the last event is processed, responding to the target input, and processing the target event based on the first processing logic and/or the first processing function.
According to the quick charge protocol event processing method provided by the embodiment of the application, under the condition of inserting the target module, the target event can be processed based on the first processing logic, and the user can modify or add the application code based on the own requirement on the software system with the basic function so as to realize the special function requirement; under the condition that a first processing function corresponding to the default module is input, reply content and response strategy in the PD protocol communication process can be automatically modified and realized based on the first processing function input by a user, under the condition that the content of the PD protocol version is updated or the user has special application, the response strategy code of the PD protocol is not required to be frequently modified by a factory, the flexibility of modifying or adding the application code by the user is higher on the basis of reducing the labor and time cost of developing a user scheme by the factory, personalized customization can be automatically carried out, and the use scene is widened.
In an embodiment of the present application, when the target input is used to input a first processing function corresponding to the default module, the processing the target event based on the first processing logic and/or the first processing function includes:
determining a target task node from a plurality of first task nodes corresponding to the fast-charging protocol based on the first processing function; the first processing function is determined based on second processing logic, the target task node is a task node which needs to be processed based on the second processing logic, and the default module corresponds to the plurality of first task nodes;
processing the target event based on the first processing function under the condition that the first processing function determines to take over the target event corresponding to the target task node; and processing first events corresponding to other task nodes based on default processing logic corresponding to other task nodes except the target task node in the plurality of first task nodes.
The fast charging protocol event processing method according to one embodiment of the present application, the plurality of first task nodes includes: regulating nodes corresponding to output voltage and output current, connecting nodes corresponding to removal Type-C, nodes corresponding to processing power transmission protocol and nodes corresponding to processing DPDM protocol.
The fast charging protocol event processing method according to one embodiment of the present application, wherein the processing the target event based on the first processing function includes:
assigning the address of the first processing function to a default pointer variable to obtain a first pointer variable; the address of the default pointer variable is 0;
calling the first processing function under the condition that the first pointer variable is legal value;
the target event is processed based on the first processing function.
The fast charging protocol event processing method according to one embodiment of the present application further includes:
and processing the target event based on the default processing logic if the target input is not received and/or if the control right corresponding to the target event is not taken over based on the first processing function.
In an embodiment of the present application, after the processing of the first event corresponding to the other task nodes based on the default processing logic corresponding to the other task nodes except the target task node in the plurality of first task nodes, the method further includes:
when an abnormal situation processing node exists, receiving a second input of a user, and determining to take over a second event corresponding to the abnormal situation processing node based on the second input, responding to the second input, and processing the second event based on a second processing function; the second input is used for inputting the second processing function;
When the processing task corresponding to the abnormal condition processing node is finished, receiving a third input of a user, and determining to execute a target application code corresponding to the third input based on the third input, responding to the third input, and processing the target application code based on a third processing function; the third input is for inputting the third processing function.
The fast charge protocol event processing method according to one embodiment of the present application, before the processing of the target event based on the first processing logic and/or the first processing function in response to the target input, further includes:
clearing an event mark corresponding to the target event and returning a target message; the target message is used for representing the control right corresponding to the target event to be taken over.
In a second aspect, the present application provides a fast charging protocol event processing apparatus, the apparatus comprising:
the first processing module is used for receiving target input of a user, wherein the target input is used for inserting the target module and/or inputting a first processing function corresponding to the default module; the target module is used for executing first processing logic, and the processing logic corresponding to the target module and the default module are different; the first processing function is used for modifying default processing logic corresponding to the default module; the target input is used for processing a target event;
The second processing module is used for judging whether the control right corresponding to the target event needs to be taken over or not based on the target input and the processing state of the last event corresponding to the target event;
and the third processing module is used for responding to the target input and processing the target event based on the first processing logic and/or the first processing function under the condition that the control right needs to be taken over and the last event is processed.
According to the fast charge protocol event processing device provided by the embodiment of the application, under the condition of inserting the target module, the target event can be processed based on the first processing logic, and the user can modify or add the application code based on the own requirement on the software system with the basic function so as to realize the special function requirement; under the condition that a first processing function corresponding to the default module is input, reply content and response strategy in the PD protocol communication process can be automatically modified and realized based on the first processing function input by a user, under the condition that the content of the PD protocol version is updated or the user has special application, the response strategy code of the PD protocol is not required to be frequently modified by a factory, the flexibility of modifying or adding the application code by the user is higher on the basis of reducing the labor and time cost of developing a user scheme by the factory, personalized customization can be automatically carried out, and the use scene is widened.
In a third aspect, the present invention provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method for processing a fast charging protocol event according to the first aspect.
In a fourth aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the fast charging protocol event processing method according to the first aspect when executing the computer program.
In a fifth aspect, the present application provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a fast charge protocol event processing method as described in the first aspect above.
In a sixth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements a method of fast fill protocol event handling as described in the first aspect above.
The above technical solutions in the embodiments of the present application have at least one of the following technical effects:
By processing the target event based on the first processing logic under the condition of inserting the target module, the user can modify or add the application code based on own needs on the software system with the basic function so as to realize special function needs; under the condition that a first processing function corresponding to the default module is input, reply content and response strategy in the PD protocol communication process can be automatically modified and realized based on the first processing function input by a user, under the condition that the content of the PD protocol version is updated or the user has special application, the response strategy code of the PD protocol is not required to be frequently modified by a factory, the flexibility of modifying or adding the application code by the user is higher on the basis of reducing the labor and time cost of developing a user scheme by the factory, personalized customization can be automatically carried out, and the use scene is widened.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, wherein:
Fig. 1 is a schematic flow chart of a fast charging protocol event processing method according to an embodiment of the present application;
FIG. 2 is a second flowchart of a fast fill protocol event processing method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a fast charging protocol event processing device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type and not limited to the number of objects, e.g., the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The following describes a fast charging protocol event processing method according to an embodiment of the present application with reference to fig. 1 to 2.
It should be noted that, the execution body of the fast charging protocol event processing method may be a server, or may be a fast charging protocol event processing device, or may also be a terminal of a user, including but not limited to a mobile terminal and a non-mobile terminal.
For example, mobile terminals include, but are not limited to, cell phones, PDA smart terminals, tablet computers, vehicle-mounted smart terminals, and the like; non-mobile terminals include, but are not limited to, PC-side and the like.
As shown in fig. 1, the fast charging protocol event processing method includes: step 110, step 120 and step 130.
It should be noted that the fast charging protocol event processing method can be applied to a charging protocol software system.
The charging protocol software system may include: and (5) defaulting to a module.
The default module defaults to hold the control right of the event corresponding to the task node.
And under the condition that the user has no special application requirement, processing the event corresponding to each task node based on the default module by default.
Step 110, receiving target input of a user, wherein the target input is used for inserting a target module and/or inputting a first processing function corresponding to a default module; the target module is used for executing the first processing logic, and the processing logic corresponding to the target module and the default module are different; the first processing function is used for modifying default processing logic corresponding to the default module; the target input is for processing a target event.
In this step, the target event may include: regulating output voltage and output current, connection removal Type-C, handling power transfer protocol, handling DPDM protocol, handling exception events, etc.
The target input is used to process a target event, and during processing of the fast charge protocol event, the target input of the user may be received.
The target input may be used to insert the target module, or may be used to input the first processing logic corresponding to the default module, or may also be used to insert both the target module and the first processing function.
Wherein the target input may be at least one of:
first, the target input may be a touch operation including, but not limited to, a click operation, a slide operation, a press operation, and the like.
In this embodiment, the receiving of the target input of the user may be receiving a touch operation of the user in the display area of the terminal display screen.
In order to reduce the user's misoperation rate, the action area of the target input can be limited to a specific area, such as an upper middle area of the insertion target module and/or the input first processing function interface; or displaying a target control on the current interface in a state of displaying the inserted target module and/or inputting the first processing function interface, and touching the target control to realize target input; or the target input is set as a continuous multi-tap operation of the display area within a target time interval.
Secondly, the target input may be a physical key input.
In this embodiment, the body of the terminal is provided with an entity key corresponding to the target module and/or the first processing function, and the target input of the user is received, which may be that the operation of pressing the corresponding entity key by the user is received; the target input may also be a combined operation of simultaneously pressing multiple physical keys.
Third, the target input may be a voice input.
In this embodiment, the terminal may trigger the display of the insert target module interface upon receiving a voice such as "insert target module".
Of course, in other embodiments, the target input may also be in other forms, including but not limited to character input, etc., which may be specifically determined according to actual needs, and the embodiments of the present application are not limited thereto.
The target module is to execute the first processing logic.
The first processing logic may be customized based on user requirements.
The default module corresponds to default processing logic, and the first processing logic is different from the default processing logic.
In some embodiments, the target event is processed based on default processing logic without receiving target input from the user.
Step 120, based on the target input and the processing state of the last event corresponding to the target event, it is determined whether the control right corresponding to the target event needs to be taken over.
In this step, in the process of implementing the fast charge protocol, a plurality of events need to be processed sequentially, and before a target event is processed, it needs to be determined whether control rights of the target event need to be taken over based on a target input and a processing state of a last event of the target event.
In some embodiments, in a case where the target input user inserts the target module, the target module is configured to execute the first processing logic, and in a case where the first logic has a higher priority than the default processing logic, it may be determined that the control right corresponding to the target event needs to be taken over.
Based on the determination of the control right to take over the target event based on the target input determination, it may be further determined whether the control right to take over the target event is required based on the processing state of the last event.
The processing state of the last event may include: there is default processing logic to process the last event or no processing logic to process the last event.
For example, where there is default processing logic to handle a last event, it may be determined that control of the target event need not be taken over.
In the event that it is determined based on the target input that control of the target event needs to be taken over, and that there is no processing logic to process the last event, control of the target event may be determined to be taken over.
Step 130, in the case that it is determined that control needs to be taken over and the last event is processed, in response to the target input, processing the target event based on the first processing logic and/or the first processing function.
In this step, in the process of implementing the fast charge protocol, a plurality of events need to be processed sequentially, and in the case where the last event processing of the target event is completed, the target event may be processed based on the first processing logic and/or the first processing function.
And under the condition that the target module is inserted and the last event is processed, and the control right of the target event needs to be taken over is determined, the target event can be processed based on the first processing logic.
When the first processing function is input and the last event is processed, and the control right of the target event needs to be taken over is determined, the target event can be processed based on the first processing function.
In the case where the target module is inserted and the first processing function is input, the target event may be processed together based on the first processing logic and the first processing function.
In some embodiments, where the target input is for inserting a target module, step 130 may include:
the target module obtains the control right corresponding to the target event and processes the target event based on the first processing logic.
In this embodiment, in the case where the target input is used to insert the target module and it is determined that the control right corresponding to the target event needs to be taken over, the control right corresponding to the target event may be transferred to the target module.
The target module may process the target event based on the first processing logic.
In some embodiments, after determining that control needs to be taken over, and before processing the target event based on the first processing logic and/or the first processing function in response to the target input, the method may further comprise:
clearing an event mark corresponding to the target event and returning a target message; the target message is used for representing the control right corresponding to the target event to be taken over.
In this embodiment, the target message may be sent to the micro-control module if it is determined that the control right corresponding to the target event needs to be taken over.
The target message may be used to characterize the control rights corresponding to the target event that need to be taken over.
The targeted message may be used to inform the system that current feedback is being communicated by external input.
Under the condition that the control right is required to be taken over, the user can acquire the processing right of the target event.
Before processing the target event, the event flag corresponding to the target event may also be cleared.
Clearing the event flag corresponding to the target event may be setting the event flag corresponding to the target event to 0.
The inventor finds that in the development process, in the common quick-charging protocol chip, a user often provides a requirement list, and then a chip former factory carries out custom programming, the common quick-charging protocol event processing method cannot modify or add application codes on a software system which has realized basic functions, along with the increase of custom requirements, a great deal of manpower and time cost of the chip former factory are required to be consumed in the custom process, the flexibility of modifying or adding the application codes by the user is low, personalized customization cannot be carried out by the user, and the application scene is limited.
In the application, under the condition of inserting the target module, the target event can be processed based on the first processing logic, and on a software system with the basic function, a user can modify or add application codes based on own requirements so as to realize special function requirements;
under the condition that a first processing function corresponding to the default module is input, reply content and response strategy in the PD protocol communication process can be automatically modified and realized based on the first processing function input by a user, under the condition that the content of the PD protocol version is updated or the user has special application, the response strategy code of the PD protocol is not required to be frequently modified by a factory, the flexibility of modifying or adding the application code by the user is higher on the basis of reducing the labor and time cost of developing a user scheme by the factory, personalized customization can be automatically carried out, and the use scene is widened.
In some embodiments, where the target input is for inputting a first processing function corresponding to the default module, processing the target event based on the first processing logic and/or the first processing function may include:
determining a target task node from a plurality of first task nodes corresponding to the fast-charging protocol based on the first processing function; the first processing function is determined based on the second processing logic, and the target task node is a task node which needs to be processed based on the second processing logic; the default module corresponds to the plurality of first task nodes;
under the condition that a target event corresponding to the take-over target task node is determined based on the first processing function, processing the target event based on the first processing function; and processing the first events corresponding to other task nodes based on default processing logic corresponding to other task nodes except the target task node in the plurality of first task nodes.
In this embodiment, the first processing function may be determined based on the second processing logic.
The second processing logic is determined based on the specific needs of the user.
The second processing logic is additional processing logic for user input in the case where the software system has implemented the underlying functionality.
The second processing logic is different from the first processing logic.
In the case that the user requires additional processing logic for the communication process of the fast charge protocol, the first processing function may be written on its own based on the second processing logic.
The first task node is a task node for implementing a fast-fill protocol.
The default module may correspond to a plurality of first task nodes.
The fast charge protocol is a battery charging technique that shortens the charging time of a device by improving the charging efficiency.
The fast charging protocol is a communication mechanism established between the charger and the equipment, and the charger can adjust the output voltage and current based on the requirements and the state of the equipment.
The target task node is any one of the first task nodes, and the target task node is a task node which needs to be processed based on the second processing logic.
Based on the first processing function, a target task node may be determined from the plurality of first task nodes.
For example, in the case where the user requires the software system to output a higher voltage, the target task node may be a node that adjusts the output voltage and output current to correspond to.
In some embodiments, the plurality of first task nodes may include: regulating nodes corresponding to output voltage and output current, connecting nodes corresponding to removal Type-C, nodes corresponding to processing power transmission protocol and nodes corresponding to processing DPDM protocol.
In this embodiment, the program code corresponding to the default processing logic when processing each first task node may be written for the chipset factory.
Each first task node corresponds to a first event.
The first event may include: regulating the output voltage and output current, connection removal Type-C, handling power transfer protocol and handling DPDM protocol, etc.
In the case that the target input is used to input the first processing function corresponding to the default module, the target event may be any event of the plurality of first events.
When executing each first task node, executing the first event corresponding to each first task node is needed.
For example, when the output voltage and the output current are regulated at corresponding nodes, the voltage and the current need to be output and regulated, and corresponding regulation tasks can be completed based on configuration parameters of a user, for example, corresponding slopes are regulated in the process of regulating the output voltage, and the like.
When the node corresponding to the Type-C is connected and removed, connection and removal of the Type-C port need to be detected, and corresponding processing logic, such as the disconnection time of the Type-C, can be completed based on configuration parameters of a user.
When executing the node corresponding to the PD protocol (USB Power Delivery, power transmission protocol), the relevant transaction of the PD protocol needs to be processed, and the corresponding processing logic, such as protocol switch, output voltage and current, can be completed based on the configuration parameters of the user.
When executing the corresponding node of the DPDM protocol, related transactions of the DPDM protocol such as QC (Quick Charge) and SCP (Super Charge Protocol, super fast Charge protocol) are required to be processed, and corresponding processing logic, such as protocol switch and output power, can be completed based on configuration parameters of the user.
After determining the target task node from the plurality of first task nodes, it may be determined whether a target event corresponding to the target task node needs to be taken over based on the first processing function.
In the case that the target event needs to be taken over, the target event is processed based on the first processing function.
The target event is a task event under the target task node.
For example, in the case where the target task node is a node to which the regulated output voltage and the output current correspond, the target event may be the regulation of the output voltage and the output current.
And after the target task node is determined, acquiring default processing logic corresponding to other task nodes except the target task node in the plurality of first task nodes.
Default program code corresponding to the first event may be executed to process the first event corresponding to the other task node based on default processing logic.
As shown in fig. 2, in the actual execution process, a first processing function input by a user to the software system may be received, and then, based on the first processing function, a target task node that needs to be processed based on second processing logic corresponding to the first processing function is determined from a plurality of first task nodes.
And then, under the condition that the target event corresponding to the target task node is determined to be taken over based on the first processing function, the target event is processed based on the first processing function, and the first event corresponding to other task nodes is processed based on default processing logic corresponding to other task nodes.
During actual execution, the user may write a first processing function based on actual demand to determine a target task node that requires additional processing logic.
For example, when the target task node is a node corresponding to the regulated output voltage and the output current, and when the sink device applies that the output voltage is 9V and the output current is 3A through the pd fix protocol, the user hopes to actually output a higher voltage, such as 9.6V, the user can write the first processing function by himself, input the first processing function into the software system, modify the voltage regulating value to 9.6V, execute the first processing function before the target task node starts, modify the voltage regulating value to 9.6V, and finally realize the special function requirement of actually outputting 9.6V.
Then, the node corresponding to the connection removal Type-C is executed based on the default processing logic for processing the Type-C, the node corresponding to the PD protocol is executed based on the default processing logic for processing the PD protocol, and then the node corresponding to the DPDM protocol is executed based on the default processing logic for processing the DPDM protocol.
It should be noted that, the same logic as that of the above-mentioned node for adjusting the output voltage and the output current, before the node corresponding to the connection removal Type-C, the node corresponding to the processing power transmission protocol, and the node corresponding to the processing DPDM protocol are executed, it is necessary to determine whether each node corresponds to additional processing logic, which is not described herein again.
In the application, a first processing function written by a user is input into a software system which has realized basic functions, then a target task node is determined from a plurality of first task nodes based on the first processing function, and then first events corresponding to other task nodes are processed based on default processing logic so as to realize the basic functions required by the software system; under the condition that the target event corresponding to the target task node is confirmed to be taken over, the target event is processed based on the first processing function, the user can modify or add the application code based on own requirements on a software system with the basic function, so that special function requirements are realized, the flexibility of modifying or adding the application code by the user is high on the basis of reducing the labor and time cost of developing a user scheme in a chip factory, personalized customization can be carried out by the user, and the use scene is widened.
In some embodiments, processing the target event based on the first processing function may include:
assigning the address of the first processing function to a default pointer variable to obtain a first pointer variable; the address of the default pointer variable is 0;
calling a first processing function under the condition that the first pointer variable is legal value;
the target event is processed based on the first processing function.
In this embodiment, the default pointer variable may be a global function pointer variable defined in the system.
In the case of initializing the global function pointer variable, the global function pointer variable points to the 0 address.
The first pointer variable is a pointer variable obtained after processing the default pointer variable.
The address of the first pointer variable may be a legal value or may be an illegal value.
And calling a first processing function under the condition that the first pointer variable is legal value.
The first processing function may be self-encoding in the event that additional processing logic is required for the user's communication process with the fast-fill protocol.
And then, assigning the function address of the first processing function to a default pointer variable to obtain a first pointer variable.
In some embodiments, the fast charge protocol event processing method may further include:
The target event is processed based on default processing logic in the event that the target input is not received and/or in the event that it is determined based on the first processing function that the control right corresponding to the target event is not taken over.
In this embodiment, the target event may be processed directly based on default processing logic without the user entering a target input.
After the first pointer variable is obtained based on the first processing function, the control right corresponding to the target event is not taken over under the condition that the first pointer variable is still 0.
Or the first pointer variable has application codes, but the application codes of the user can be directly skipped without paying attention, and the user does not need to take over the target event.
And under the condition that the control right corresponding to the target event is not taken over, the target event can be processed directly based on the default processing logic.
As shown in fig. 2, in some embodiments, after processing the first event corresponding to the other task node based on default processing logic corresponding to the other task node except the target task node in the plurality of first task nodes, the fast charge protocol event processing method may further include:
when the abnormal condition processing node exists, receiving second input of a user, and determining to take over a second event corresponding to the abnormal condition processing node based on the second input, responding to the second input, and processing the second event based on a second processing function; the second input is used for inputting a second processing function;
When the processing task corresponding to the abnormal condition processing node is finished, third input of a user is received, and the target application code corresponding to the third input is determined to be executed based on the third input, the target application code is processed based on a third processing function in response to the third input; the third input is for inputting a third processing function.
In this embodiment, there is an abnormal situation handling node, which may be a system-occurring abnormal situation, for example, an under-voltage abnormal situation.
The second input is for inputting a second processing function.
The second input may be the same touch operation as the target input, an entity key input, a voice input or any other input manner that can be achieved, which is not described herein.
The second processing function is written by the user, and the user can write the second processing function based on actual requirements.
The second event corresponding to the abnormal situation processing node may be to perform abnormal situation processing on the system.
Based on the second processing function input by the user, whether a second event corresponding to the abnormal condition processing node needs to be taken over or not can be determined.
In case the second event needs to be taken over, the second event may be processed based on the second processing function.
For example, in the case of an under-voltage abnormality, the user needs to raise the level of the GPIO (General Purpose I/O Ports, general purpose input/output Ports), and the user can write the second processing function by himself, process the second event based on the second processing function to raise the level of the GPIO, process the second event based on the second processing function before the under-voltage abnormality process starts, and finally, can realize the special function requirement of the GPIO to output a high level when the under-voltage abnormality occurs.
In the case where the second event is processed based on the second processing function input by the user, default program code corresponding to the exception processing may also be executed.
The default program code for exception handling is used for handling the situations of exception occurrence and exception contact, and is written based on a chip factory, and the source code is packaged and invisible.
The third input is for inputting a third processing function.
The third input may be the same touch operation as the target input, a physical key input, a voice input, or any other input manner that can be implemented, which is not described herein.
The third processing function is written by the user, and the user can write based on actual requirements.
The target application code corresponds to a third processing function.
The target application code is written by the user based on the third processing logic, and is used for realizing special functions required by the user.
Based on the third input, it may be determined whether to execute the target application code corresponding to the third input.
In the case where the abnormal-condition processing is ended and the target application code needs to be executed, the target application code may be processed based on the third processing function.
For example, under the condition that the undervoltage abnormality is relieved, the user needs to pull down the GPIO level, the user can write a third processing function by himself, execute the target application code based on the third processing function to pull down the GPIO level, execute the target application code after the undervoltage abnormality is processed, and finally realize the special function requirement that the GPIO outputs a low level after the undervoltage abnormality is relieved.
As shown in fig. 2, during actual execution, after pulling the GPIO level low, the system may begin processing other processing tasks for the user.
Other processing tasks may include, among others, lamp display, multi-chip interaction, power allocation, etc.
After processing other processing tasks of the user, the relevant processing of the system can be exited, and the system goes to sleep.
The default program code for the hibernation process is written based on the chip factory, the source code being packaged invisible.
In the case of executing the default program code of the sleep processing, the node corresponding to the regulated output voltage and the regulated output current may be returned to, and the loop execution of the next round may be entered.
With continued reference to fig. 2, in some embodiments, before determining the target task node from the plurality of first task nodes corresponding to the fast-fill protocol for execution based on the first processing function, the fast-fill protocol event processing method may further include:
receiving a fourth input from the user;
initializing configuration parameters corresponding to each first task node in response to a fourth input;
setting a hardware configuration of the target software system based on the initialized configuration parameters, wherein the hardware configuration comprises at least one of an analog-to-digital converter and a digital-to-analog converter; the target software system is used for executing the fast-charging protocol.
In this embodiment, the fourth input is used to input configuration parameters corresponding to each first task node.
The fourth input may be the same touch operation as the target input, a physical key input, a voice input, or any other input manner that can be implemented, which is not described herein.
When the system is powered on for the first time, all configuration parameters can be initialized and assigned based on a fourth input of a user, for example, the enabling of a fast charging protocol, the overvoltage and undervoltage threshold of output voltage and the like.
The configuration parameters corresponding to the first task nodes are global variables, and different processing flows and results exist for events corresponding to the same task node under the condition that the configuration parameters are different.
Based on the values of the configuration parameters, the corresponding hardware configuration, e.g., analog-to-digital converter and digital-to-analog converter, etc., may be set.
For example, the undervoltage threshold of the output voltage in the configuration parameters is written into the corresponding register.
After the hardware configuration of the target software system is set, the adjustment of the nodes corresponding to the output voltage and the output current may be started.
The following describes the fast charging protocol event processing device provided in the present application, and the fast charging protocol event processing device described in the following and the fast charging protocol event processing method described in the foregoing may be referred to correspondingly.
According to the fast charging protocol event processing method provided by the embodiment of the application, the execution main body can be a fast charging protocol event processing device. In the embodiment of the present application, a fast charging protocol event processing device executes a fast charging protocol event processing method as an example, and the fast charging protocol event processing device provided in the embodiment of the present application is described.
The embodiment of the application also provides a fast charging protocol event processing device.
As shown in fig. 3, the fast charging protocol event processing device includes: a first processing module 310, a second processing module 320, and a third processing module 330.
A first processing module 310, configured to receive a target input of a user, where the target input is used to insert a target module, and/or is used to input a first processing function corresponding to a default module; the target module is used for executing the first processing logic, and the processing logic corresponding to the target module and the default module are different; the first processing function is used for modifying default processing logic corresponding to the default module; the target input is used for processing a target event;
the second processing module 320 is configured to determine whether to take over the control right corresponding to the target event based on the target input and the processing state of the last event corresponding to the target event;
and a third processing module 330, configured to process, in response to the target input, the target event based on the first processing logic and/or the first processing function, in a case where it is determined that the control right needs to be taken over and the last event is processed.
According to the fast charge protocol event processing device provided by the embodiment of the application, under the condition of inserting the target module, the target event can be processed based on the first processing logic, and the user can modify or add the application code based on the own requirement on the software system with the basic function so as to realize the special function requirement; under the condition that a first processing function corresponding to the default module is input, reply content and response strategy in the PD protocol communication process can be automatically modified and realized based on the first processing function input by a user, under the condition that the content of the PD protocol version is updated or the user has special application, the response strategy code of the PD protocol is not required to be frequently modified by a factory, the flexibility of modifying or adding the application code by the user is higher on the basis of reducing the labor and time cost of developing a user scheme by the factory, personalized customization can be automatically carried out, and the use scene is widened.
In some embodiments, where the target input is for inputting a first processing function corresponding to the default module, the third processing module 330 may be further configured to:
determining a target task node from a plurality of first task nodes corresponding to the fast-charging protocol based on the first processing function; the first processing function is determined based on the second processing logic, the target task node is a task node which needs to be processed based on the second processing logic, and the default module corresponds to a plurality of first task nodes;
under the condition that a target event corresponding to the take-over target task node is determined based on the first processing function, processing the target event based on the first processing function; and processing the first events corresponding to other task nodes based on default processing logic corresponding to other task nodes except the target task node in the plurality of first task nodes.
In some embodiments, the fast charging protocol event processing apparatus may further include a fourth processing module, configured to set the plurality of first task nodes includes: regulating nodes corresponding to output voltage and output current, connecting nodes corresponding to removal Type-C, nodes corresponding to processing power transmission protocol and nodes corresponding to processing DPDM protocol.
In some embodiments, the third processing module 330 may also be configured to:
assigning the address of the first processing function to a default pointer variable to obtain a first pointer variable; the address of the default pointer variable is 0;
calling a first processing function under the condition that the first pointer variable is legal value;
the target event is processed based on the first processing function.
In some embodiments, the fast charge protocol event processing apparatus may further include a fifth processing module for:
and processing the target event based on default processing logic in the case that the target input is not received and/or in the case that the control right corresponding to the target event is determined not to be taken over based on the first processing function.
In some embodiments, the fast charge protocol event processing apparatus may further include a sixth processing module for:
after processing first events corresponding to other task nodes based on default processing logic corresponding to other task nodes except the target task node in the plurality of first task nodes, receiving second input of a user when the abnormal condition processing node exists, and processing the second event based on a second processing function in response to the second input under the condition that the second event corresponding to the abnormal condition processing node is determined to be taken over based on the second input; the second input is used for inputting a second processing function;
When the processing task corresponding to the abnormal condition processing node is finished, third input of a user is received, and the target application code corresponding to the third input is determined to be executed based on the third input, the target application code is processed based on a third processing function in response to the third input; the third input is for inputting a third processing function.
In some embodiments, where the target input is for inserting a target module, the third processing module 330 may also be configured to:
the target module obtains the control right corresponding to the target event and processes the target event based on the first processing logic.
In some embodiments, the fast charge protocol event processing apparatus may further include a seventh processing module configured to clear an event flag corresponding to the target event and return a target message after determining that control is required to be taken over and before processing the target event based on the first processing logic and/or the first processing function in response to the target input; the target message is used for representing the control right corresponding to the target event to be taken over.
The fast charge protocol event processing device in the embodiment of the present application may be an electronic device, or may be a component in the electronic device, for example, an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The fast-charging protocol event processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The fast charging protocol event processing device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to 2, and in order to avoid repetition, a description is omitted here.
In some embodiments, as shown in fig. 4, the embodiment of the present application further provides an electronic device 400, including a processor 401, a memory 402, and a computer program stored in the memory 402 and capable of running on the processor 401, where the program when executed by the processor 401 implements the respective processes of the foregoing embodiment of the fast charging protocol event processing method, and the same technical effects can be achieved, and for avoiding repetition, a description is omitted herein.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device described above.
In another aspect, the present application further provides a computer program product, where the computer program product includes a computer program stored on a non-transitory computer readable storage medium, where the computer program includes program instructions, when the program instructions are executed by a computer, can execute each process of the foregoing embodiment of the fast charge protocol event processing method, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
In yet another aspect, the present application further provides a non-transitory computer readable storage medium, on which a computer program is stored, where the computer program is implemented when executed by a processor to perform each process of the foregoing embodiment of the fast charging protocol event processing method, and the same technical effects can be achieved, so that repetition is avoided, and details are not repeated herein.
In still another aspect, an embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, implement each process of the foregoing embodiment of the fast charge protocol event processing method, and achieve the same technical effect, and in order to avoid repetition, details are not repeated herein.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (12)

1. A method for processing a fast charging protocol event, comprising:
receiving target input of a user, wherein the target input is used for inserting a target module and/or inputting a first processing function corresponding to a default module; the target module is used for executing first processing logic, and the processing logic corresponding to the target module and the default module are different; the first processing function is used for modifying default processing logic corresponding to the default module; the target input is used for processing a target event;
judging whether control right corresponding to the target event needs to be taken over or not based on the target input and the processing state of the last event corresponding to the target event;
and in the case that the control right needs to be taken over and the last event is processed, responding to the target input, and processing the target event based on the first processing logic and/or the first processing function.
2. The method according to claim 1, wherein in case the target input is used to input a first processing function corresponding to the default module, the processing the target event based on the first processing logic and/or the first processing function comprises:
Determining a target task node from a plurality of first task nodes corresponding to the fast-charging protocol based on the first processing function; the first processing function is determined based on second processing logic, the target task node is a task node which needs to be processed based on the second processing logic, and the default module corresponds to the plurality of first task nodes;
processing the target event based on the first processing function under the condition that the first processing function determines to take over the target event corresponding to the target task node; and processing first events corresponding to other task nodes based on default processing logic corresponding to other task nodes except the target task node in the plurality of first task nodes.
3. The method of claim 2, wherein the plurality of first task nodes comprises: regulating nodes corresponding to output voltage and output current, connecting nodes corresponding to removal Type-C, nodes corresponding to processing power transmission protocol and nodes corresponding to processing DPDM protocol.
4. The method of claim 2, wherein the processing the target event based on the first processing function comprises:
Assigning the address of the first processing function to a default pointer variable to obtain a first pointer variable; the address of the default pointer variable is 0;
calling the first processing function under the condition that the first pointer variable is legal value;
the target event is processed based on the first processing function.
5. The method according to claim 2, wherein after the processing of the first event corresponding to the other task node based on the default processing logic corresponding to the other task node except the target task node among the plurality of first task nodes, the method further comprises:
when an abnormal situation processing node exists, receiving a second input of a user, and determining to take over a second event corresponding to the abnormal situation processing node based on the second input, responding to the second input, and processing the second event based on a second processing function; the second input is used for inputting the second processing function;
when the processing task corresponding to the abnormal condition processing node is finished, receiving a third input of a user, and determining to execute a target application code corresponding to the third input based on the third input, responding to the third input, and processing the target application code based on a third processing function; the third input is for inputting the third processing function.
6. The method for processing a fast charging protocol event according to any one of claims 1 to 5, further comprising:
and processing the target event based on the default processing logic if the target input is not received and/or if the control right corresponding to the target event is not taken over based on the first processing function.
7. The fast charge protocol event processing method according to any one of claims 1-5, wherein after the determining that the control right needs to be taken over and before the processing the target event based on the first processing logic and/or the first processing function in response to the target input, the method further comprises:
clearing an event mark corresponding to the target event and returning a target message; the target message is used for representing the control right corresponding to the target event to be taken over.
8. A fast charge protocol event processing apparatus, comprising:
the first processing module is used for receiving target input of a user, wherein the target input is used for inserting the target module and/or inputting a first processing function corresponding to the default module; the target module is used for executing first processing logic, and the processing logic corresponding to the target module and the default module are different; the first processing function is used for modifying default processing logic corresponding to the default module; the target input is used for processing a target event;
The second processing module is used for judging whether the control right corresponding to the target event needs to be taken over or not based on the target input and the processing state of the last event corresponding to the target event;
and the third processing module is used for responding to the target input and processing the target event based on the first processing logic and/or the first processing function under the condition that the control right needs to be taken over and the last event is processed.
9. A chip comprising a processor and a communication interface, the communication interface being coupled to the processor, wherein the processor is configured to execute a program or instructions, the processor implementing the fast charge protocol event processing method according to any of claims 1-7 when executing the program or instructions.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the fast charge protocol event processing method of any of claims 1-7 when the program is executed by the processor.
11. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the fast charge protocol event processing method according to any of claims 1-7.
12. A computer program product comprising a computer program which, when executed by a processor, implements the fast fill protocol event handling method as claimed in any of claims 1 to 7.
CN202311652085.7A 2023-12-04 2023-12-04 Quick charge protocol event processing method and device Pending CN117675945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311652085.7A CN117675945A (en) 2023-12-04 2023-12-04 Quick charge protocol event processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311652085.7A CN117675945A (en) 2023-12-04 2023-12-04 Quick charge protocol event processing method and device

Publications (1)

Publication Number Publication Date
CN117675945A true CN117675945A (en) 2024-03-08

Family

ID=90063655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311652085.7A Pending CN117675945A (en) 2023-12-04 2023-12-04 Quick charge protocol event processing method and device

Country Status (1)

Country Link
CN (1) CN117675945A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309360A (en) * 2020-02-07 2020-06-19 腾讯科技(深圳)有限公司 Firmware updating method and device of quick charging equipment, computer equipment and storage medium
CN111316527A (en) * 2018-12-25 2020-06-19 华为技术有限公司 Optional terminal charging method, graphical user interface and electronic equipment
CN112148499A (en) * 2019-06-27 2020-12-29 腾讯科技(北京)有限公司 Data reporting method and device, computer equipment and medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111316527A (en) * 2018-12-25 2020-06-19 华为技术有限公司 Optional terminal charging method, graphical user interface and electronic equipment
CN112148499A (en) * 2019-06-27 2020-12-29 腾讯科技(北京)有限公司 Data reporting method and device, computer equipment and medium
CN111309360A (en) * 2020-02-07 2020-06-19 腾讯科技(深圳)有限公司 Firmware updating method and device of quick charging equipment, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US20170070069A1 (en) Electric Energy Dispatch Method and Apparatus, and Power Management Method and Apparatus
CN108540568B (en) Computing capacity sharing method and intelligent equipment
CN114257551A (en) Distributed current limiting method and system and storage medium
CN112947734B (en) Server power consumption control method, system, terminal and storage medium
CN104657037A (en) Terminal interface processing method
CN109491723A (en) A kind of application program operation method, application program running gear and mobile terminal
CN107291213B (en) Mode selection method, device, terminal and computer readable storage medium
CN117675945A (en) Quick charge protocol event processing method and device
CN110764905B (en) Network model generation method and device, computer equipment and storage medium
CN116932220A (en) Resource adjustment method and device for service cluster, electronic equipment and storage medium
CN116450309A (en) System service providing method and device, storage medium and electronic equipment
CN107292142B (en) Business operation processing method, business operation processing device and business terminal
CN113535020B (en) Method, apparatus, device, medium and product for generating application icons
CN113163236B (en) Data transmission method, device, equipment and storage medium based on frequency control
CN115185456A (en) Cluster capacity shrinkage risk prompting method, device, equipment and medium
CN110971696B (en) System and method for realizing virtual electronic card communication
CN110427092B (en) Battery switching method, device, terminal and computer readable storage medium
CN112000462A (en) Data processing method and device based on shared peripheral resources
CN115826961B (en) Design method and device for data analysis system for separated reuse of designer and engine
CN117667141A (en) Charging protocol software system and multiparty cooperative processing method
CN111061576A (en) Method and system for creating entity object
CN110213435A (en) A kind of function shows condition processing method and system
CN113055250B (en) Networking communication method, device, terminal equipment and storage medium
CN112769688B (en) Method and device for protocol stack adaptation, electronic equipment and storage medium
CN115905288B (en) General method and device for generating reconciliation data by data reporting

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