CN117667141A - Charging protocol software system and multiparty cooperative processing method - Google Patents

Charging protocol software system and multiparty cooperative processing method Download PDF

Info

Publication number
CN117667141A
CN117667141A CN202311652040.XA CN202311652040A CN117667141A CN 117667141 A CN117667141 A CN 117667141A CN 202311652040 A CN202311652040 A CN 202311652040A CN 117667141 A CN117667141 A CN 117667141A
Authority
CN
China
Prior art keywords
module
application code
power transmission
target
code 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
CN202311652040.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.)
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 CN202311652040.XA priority Critical patent/CN117667141A/en
Publication of CN117667141A publication Critical patent/CN117667141A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a charging protocol software system and a multiparty cooperative processing method, and belongs to the technical field of PD protocol chips. The charging protocol software system comprises: a first module; the first module corresponds to the control right of the power transmission protocol event; a first application code module; the first application code module is electrically connected with the first module; the first application code module is used for receiving a target processing function input by a user; and transferring the control right to the first application code module under the condition that the first application code module is determined to take over the power transmission protocol event based on the target processing function. The charging protocol software system improves the efficiency of processing the power transmission protocol event, reduces the labor and time cost of developing a user scheme by a chip factory, has higher flexibility of operation and wider application scene, and meets the privacy requirement of a user for realizing a PD response strategy by himself.

Description

Charging protocol software system and multiparty cooperative processing method
Technical Field
The application belongs to the technical field of PD protocol chips, and particularly relates to a charging protocol software system and a multiparty cooperative processing method.
Background
With the wide application of the PD protocol (USB Power Delivery, power transmission protocol), there are more and more PD protocol chips on the market, and users want to be able to modify the response policy of the relevant events of the PD protocol during the actual use. The common PD protocol chip comprises a micro control module and a power transmission protocol physical layer module, a default response strategy is formulated for each PD protocol message when leaving a factory, and under the condition that the content of the PD protocol version is updated or a user has special application, the response strategy code of the PD protocol can only be modified based on the original factory, the modification efficiency is low, and a large amount of manpower and material resources are consumed.
Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the prior art. Therefore, the charging protocol software system and the multiparty cooperative processing method provided by the application have the advantages that the efficiency of processing the power transmission protocol event is improved, the labor and time cost for developing a user scheme by a chip factory is reduced, the flexibility of operation is high, the application scene is wide, and the privacy requirement of a user for realizing a PD response strategy by himself is met.
In a first aspect, the present application provides a charging protocol software system comprising:
A first module; the first module corresponds to the control right of the power transmission protocol event;
a first application code module; the first application code module is electrically connected with the first module; the first application code module is used for receiving a target processing function input by a user; and transferring the control right to the first application code module under the condition that the first application code module is determined to take over the power transmission protocol event based on the target processing function.
According to the charging protocol software system provided by the embodiment of the application, the first module and the first application code module are arranged in the charging protocol software system, the first application code module is used for receiving the target processing function input by the user, the power transmission protocol event is processed based on the first module by default under the condition that the user has no special application requirement, the control right of the power transmission protocol event is transferred from the first module to the first application code module under the condition that the user needs to take over the power transmission protocol event, so that the user can input the target processing function according to the requirement to modify and realize the reply content and the response strategy in the PD protocol communication process by himself, the response strategy code of the PD protocol is not required to be frequently modified by the original factory under the condition that the PD protocol version content is updated or the user has special application, the efficiency of processing the power transmission protocol event is improved, the manpower and time cost of the development user scheme of the chip original factory are reduced, the operation flexibility is higher, the application scene is wider, and the privacy requirement of the PD response strategy is met by the user himself; besides, a first application code module is added in the charging protocol software system to receive the input of the user, so that the operation is simple and the implementation is easy.
The charging protocol software system of one embodiment of the present application, the first module includes:
a power transfer protocol physical layer module; the power transmission protocol physical layer module is electrically connected with the first application code module;
a second application code module; the second application code module is respectively and electrically connected with the power transmission protocol physical layer module and the first application code module; and the second application code module corresponds to the control right.
The charging protocol software system of one embodiment of the present application, the first application code module includes:
an input module; the input module is used for inputting the target processing function.
The charging protocol software system further comprises:
a micro control module; the micro control module is electrically connected with the first module and the first application code module respectively.
In a second aspect, the present application provides a multiparty cooperative processing method based on the charging protocol software system according to the first aspect, including:
acquiring a power transmission protocol event, wherein the power transmission protocol event corresponds to a default pointer variable;
processing the default pointer variable based on the input condition of the first application code module to obtain a first pointer variable; the input condition comprises receiving a target processing function input by a user or not receiving input information;
Determining a target module for processing the power transfer protocol event from a first module and the first application code module based on the first pointer variable and the power transfer protocol event; the target module corresponds to the control right of the power transmission protocol event;
and controlling the target module to process the power transmission protocol event.
According to the multiparty collaborative processing method provided by the embodiment of the application, the default pointer variable is processed based on the input condition of the first application code module to obtain the first pointer variable, then based on the first pointer variable and the power transmission protocol event, whether the first application code module needs to take over the power transmission protocol event is judged to determine the target module for processing the power transmission protocol event, and then the target module is controlled to process the power transmission protocol event, so that a user can input a target processing function according to requirements to automatically modify and realize the reply content and the response strategy in the PD protocol communication process, and 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 does not need to be frequently modified by an original factory, the efficiency of processing the power transmission protocol event is improved, the labor and time cost of developing the user scheme by the original factory of a chip is reduced, the flexibility of operation is high, the application scene is wide, and the privacy requirement of the user for realizing the PD response strategy by oneself is met.
In an embodiment of the multiparty cooperative processing method of the present application, in a case that the first module includes a power transmission protocol physical layer module and a second application code module, the determining, based on the first pointer variable and the power transmission protocol event, from the first module and the first application code module, a target module for processing the power transmission protocol event includes:
determining the first application code module as a target module under the condition that the first pointer variable is legal value and the first processing is required to be carried out on the power transmission protocol event; the first process includes at least one of a target reply and a response to the power transfer protocol event;
and determining the second application code module as a target module in the case that the first pointer variable is not the legal value and/or the first processing of the power transmission protocol event is not required.
The multiparty cooperative processing method according to one embodiment of the present application, wherein the processing the default pointer variable based on the input condition of the first application code module to obtain a first pointer variable includes:
updating the default pointer variable to obtain the first pointer variable under the condition that the input condition is the target processing function input by the receiving user;
And determining the default pointer variable as the first pointer variable in the case that the input condition is the condition that the input information is not received.
In an embodiment of the present application, the updating the default pointer variable to obtain the first pointer variable includes:
and assigning the address of the target processing function to the default pointer variable to obtain the first pointer variable.
In the multiparty cooperative processing method of an embodiment of the present application, in the case that the charging protocol software system includes a micro control module, the control right is transferred based on the following manner:
if the target module is the first module, keeping the first module to hold the control right;
under the condition that the target module is the first application code module, the first application code module clears an event mark corresponding to the power transmission protocol event;
the first application code module sends a target instruction to the micro control module;
the micro control module transfers control of the power transfer protocol event from the first module to the first application code module in response to the target instruction.
In an embodiment of the multiparty cooperative processing method of the present application, in a case that the target module is the first application code module, after the controlling the target module to process the power transmission protocol event, the method further includes:
and under the condition that the first application code module finishes processing the power transmission protocol event, the first application code module releases the control right of the power transmission protocol event.
In a third aspect, the present application provides a multiparty co-processing device based on the charging protocol software system according to the first aspect, the device comprising:
the first processing module is used for acquiring a power transmission protocol event, wherein the power transmission protocol event corresponds to a default pointer variable;
the second processing module is used for processing the default pointer variable based on the input condition of the first application code module to obtain a first pointer variable; the input condition comprises receiving a target processing function input by a user or not receiving input information;
a third processing module configured to determine, based on the first pointer variable and the power transfer protocol event, a target module for processing the power transfer protocol event from a first module and the first application code module; the target module corresponds to the control right of the power transmission protocol event;
And the fourth processing module is used for controlling the target module to process the power transmission protocol event.
According to the multiparty cooperative processing device provided by the embodiment of the application, the default pointer variable is processed based on the input condition of the first application code module to obtain the first pointer variable, then based on the first pointer variable and the power transmission protocol event, whether the first application code module needs to take over the power transmission protocol event is judged to determine the target module for processing the power transmission protocol event, and then the target module is controlled to process the power transmission protocol event, so that a user can input a target processing function according to requirements to automatically modify and realize the reply content and the response strategy in the PD protocol communication process, and 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 does not need to be frequently modified by an original factory, the efficiency of processing the power transmission protocol event is improved, the labor and time cost of developing the user scheme by the original factory of a chip is reduced, the flexibility of operation is high, the application scene is wide, and the privacy requirement of the user for automatically realizing the PD response strategy is met.
In a fourth 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 multiparty cooperative processing method according to the second aspect.
In a fifth 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 multiparty co-processing method according to the second aspect, when the processor executes the computer program.
In a sixth 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 multiparty co-processing method as described in the second aspect above.
In a seventh aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements a multiparty co-processing method as described in the second aspect above.
The above technical solutions in the embodiments of the present application have at least one of the following technical effects:
the first module and the first application code module are arranged in the charging protocol software system, the first application code module is used for receiving a target processing function input by a user, the power transmission protocol event is processed based on the first module by default under the condition that the user has no special application requirement, the control right for controlling the power transmission protocol event is transferred from the first module to the first application code module under the condition that the user needs to take over the power transmission protocol event, so that the user can input the target processing function according to the requirement to automatically modify and realize the reply content and the response strategy in the PD protocol communication process, and the response strategy code of the PD protocol is not required to be frequently modified by the original factory under the condition that the content of the PD protocol version is updated or the user has special application, thereby improving the efficiency of processing the power transmission protocol event, reducing the labor and time cost of the original chip factory for developing the user proposal, having higher operation flexibility, wider application scene and meeting the privacy requirement of the PD response strategy by the user; besides, a first application code module is added in the charging protocol software system to receive the input of the user, so that the operation is simple and the implementation is easy.
Further, the default pointer variable is processed under the input condition of the first application code module to obtain the first pointer variable, then, whether the first application code module needs to take over the power transmission protocol event or not is judged based on the first pointer variable and the power transmission protocol event, so that a target module for processing the power transmission protocol event is determined, then, the target module is controlled to process the power transmission protocol event, so that a user can input a target processing function according to requirements to automatically modify and realize replying contents and response strategies in the PD protocol communication process, and under the condition that the content of a PD protocol version is updated or the user has special application, the response strategy code of the PD protocol does not need to be frequently modified by a former factory, the efficiency of processing the power transmission protocol event is improved, the labor and time cost of developing a user scheme by the former factory of a chip is reduced, the flexibility of operation is high, the application scene is wide, and the privacy requirement of the user for realizing the PD response strategies by himself is met.
Further, under the condition that the first pointer variable is a legal value, whether the power transmission protocol event needs to be subjected to target reply or response is further judged based on a target processing function, under the condition that the power transmission protocol event needs to be subjected to special reply and response strategies, a user obtains the control right of the power transmission protocol event, and the power transmission protocol event is processed based on the first application code module, so that the first application code module obtains the control right of the power transmission protocol event under the condition that the user does not need to take over the power transmission protocol event, the flexibility is higher, and the efficiency of processing the protocol event is improved.
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 structural diagram of a charging protocol software system provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of a multiparty cooperative processing method according to an embodiment of the present application;
FIG. 3 is a second flowchart of a multi-party collaborative processing method according to an embodiment of the present disclosure;
FIG. 4 is a third flow chart of a multi-party collaborative processing method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a multiparty cooperative processing device provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Reference numerals:
a first module 110; a first application code module 120; a second application code module 130;
a power transfer protocol physical layer module 140.
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 charging protocol software system according to an embodiment of the present application with reference to fig. 1.
It should be noted that the charging protocol software system may be integrated in the PD protocol chip.
A PD protocol (USB Power Delivery, power transfer protocol) chip may be used to implement PD fast charging.
As shown in fig. 1, the charging protocol software system includes: a first module 110 and a first application code module 120.
In this embodiment, the first module 110 corresponds to control of a power transfer protocol event.
In the event that the user has no special application requirements, the power transfer protocol event is handled by default based on the first module 110.
The power transfer protocol event is a related event for implementing the PD fast charge protocol.
In some embodiments, the first module 110 may include: a power transfer protocol physical layer module 140 and a second application code module 130.
In this embodiment, the power transfer protocol physical layer module 140 is electrically connected to the first application code module 120.
The power transfer protocol physical layer module 140 is hardware-based.
The power transfer protocol physical layer module 140 is configured to perform a transmit-receive process of PD protocol data.
The second application code module 130 is electrically connected to the power transfer protocol physical layer module 140 and the first application code module 120, respectively.
The power transfer protocol physical layer module 140 may send a power transfer protocol event to the second application code module 130.
The second application code module 130 may receive the power transfer protocol event sent by the power transfer protocol physical layer module 140, and process the power transfer protocol event to implement the complete function of the PD protocol.
The second application code module 130 is a PD application code module of a chip factory, and the second application code module 130 is written based on the chip factory.
The second application code module 130 corresponds to control of the power transfer protocol event.
In the event that the user has no special application requirements, the power transfer protocol event is handled by default based on the second application code module 130.
The first application code module 120 is electrically connected to the power transfer protocol physical layer module 140 and the second application code module 130, respectively.
The first application code module 120 is configured to receive a target processing function input by a user.
The target processing function is written for the user himself.
In the case that the user needs additional processing logic in the communication process of the PD protocol, the target processing function can be written based on the processing logic.
Based on the target processing function, it may be determined whether the current power transfer protocol event requires the first application code module 120 to take over.
For example, in the case where a special reply and response policy is required for the power transfer protocol event, the first application code module 120 is required to take over the power transfer protocol event; the first application code module 120 is not required to take over the power transfer protocol event without requiring a special reply and response policy to the power transfer protocol event.
In the event that it is determined that the first application code module 120 needs to take over the power transfer protocol event based on the target processing function, control of the power transfer protocol event may be transferred to the first application code module 120.
The power transfer protocol physical layer module 140 may also send power transfer protocol events to the first application code module 120.
The first application code module 120 may receive the power transmission protocol event sent by the power transmission protocol physical layer module 140, and in the case that the first application code module 120 needs to take over the power transmission protocol event, obtain the control right of the power transmission protocol event, and autonomously complete the response policy code.
In some embodiments, the first application code module 120 may include: and an input module.
In this embodiment, the input module includes a touch display, physical keys, or a voice receiving device.
The input module is used for inputting target processing functions by a user.
In the actual implementation process, for example, in the case that the input module is a touch display screen, the user may perform a touch operation on the touch display screen to input the target processing function.
In the case that the input module is a physical key, the user may press the physical key to input the target processing function.
In the case where the input module is a voice receiving device, the user may make a voice input to input the target processing function.
Of course, in other embodiments, the input module may take other forms, and may be determined based on actual needs, which is not limited in this application.
The inventor finds that in the research and development process, there is a control method of an application program based on control right interaction of two terminals in the related technology, in the method, a first terminal receives a control right request instruction sent by a second terminal and sends control right data to the second terminal in response to the request instruction, and the method needs two different terminals to realize control right interaction, is complex in operation and has high cost.
In the application, only the first module 110 and the first application code module 120 need to be set in one chip, the target processing function input by the user is received based on the first application code module 120, and the control right of the power transmission protocol event is transferred to the first application code module 120 under the condition that the user has special application requirements, so that the user can modify and realize the reply content and the response strategy in the PD protocol communication process by himself, the operation is simple, and the cost is lower.
Under the condition that a user has special application requirements, the target processing function can be written by the user to realize the special application requirements without writing by a chip former factory, so that the privacy requirement of the user for realizing the PD response strategy by the user is met.
According to the charging protocol software system provided by the embodiment of the application, the first module 110 and the first application code module 120 are arranged in the charging protocol software system, the first application code module 120 is used for receiving a target processing function input by a user, under the condition that the user has no special application requirement, the power transmission protocol event is processed based on the first module 110 by default, and under the condition that the user has special application requirement and needs to take over the power transmission protocol event, the control right of the control power transmission protocol event is transferred from the first module 110 to the first application code module 120, so that the user can input the target processing function according to the requirement to automatically modify and realize the reply content and the response strategy in the PD protocol communication process, 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 the original factory, the efficiency of processing the power transmission protocol event is improved, the manpower and time cost of the original chip development user scheme is reduced, the flexibility of operation is higher, the application scene is wider, and the privacy requirement of the PD response strategy is met by the user by oneself; besides, a first application code module is added in the charging protocol software system to receive the input of the user, so that the operation is simple and the implementation is easy.
In some embodiments, the charging protocol software system may further comprise: and a micro control module.
In this embodiment, the micro-control module is electrically connected to the first module 110 and the first application code module 120, respectively.
The micro-control module is electrically connected to the power transfer protocol physical layer module 140, the first application code module 120, and the second application code module 130, respectively.
In the event that the first application code module 120 needs to take over the power transfer protocol event, the micro control module may transfer control of the power transfer protocol event to the first application code module 120.
In the actual implementation, in the case of a power transfer protocol event, the power transfer protocol physical layer module 140 sends the power transfer protocol event and the related data of the event to the first application code module 120 and the second application code module 130, respectively.
In the event that the user has no special application requirements and does not need to modify the response policy code, the second application code module 130 holds control of the power transfer protocol event, which is executed by default by the second application code module 130.
In the case that the user has a special application requirement or the content of the PD protocol version needs to be updated and the response policy code needs to be modified, the micro control module transfers the control right of the power transmission protocol event from the second application code module 130 to the first application code module 120, and the first application code module 120 processes the power transmission protocol event to realize the special application requirement.
The following describes a multiparty co-processing method according to an embodiment of the present application with reference to fig. 2 to 4.
It should be noted that, the execution body of the multiparty cooperative processing method may be a charging protocol software system, or may be a server electrically connected to the charging protocol software system, or may be a multiparty cooperative processing device disposed in the charging protocol software system, or may also be a user terminal communicatively connected to the charging protocol software system, 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. 2, the multiparty cooperative processing method includes: step 210, step 220, step 230 and step 240.
Step 210, a power transmission protocol event is acquired, and the power transmission protocol event corresponds to a default pointer variable.
In this step, the power transfer protocol event is a related event for implementing the PD fast charge protocol.
The power transfer protocol event corresponds to a default pointer variable.
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.
Step 220, processing a default pointer variable based on the input condition of the first application code module to obtain a first pointer variable; the input conditions include receiving a target processing function of user input or not receiving input information.
In this step, 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.
The first application code module may or may not receive input information, or may not receive the target processing function entered by the user.
The target processing function is self-written by the user, and can be self-written based on the processing logic under the condition that the communication process of the user to the PD protocol requires additional processing logic.
In some embodiments, step 220 may comprise:
under the condition that the input condition is a target processing function for receiving user input, updating a default pointer variable to obtain a first pointer variable;
in the case where the input condition is that the input information is not received, a default pointer variable is determined as a first pointer variable.
In this embodiment, the default pointer variable may be updated based on the target processing function to obtain the first pointer variable.
In some embodiments, updating the default pointer variable to obtain the first pointer variable may include:
and assigning the address of the target processing function to a default pointer variable to obtain a first pointer variable.
In this embodiment, a global function pointer variable may be defined in the system, i.e., a default pointer variable.
The target processing function may be encoded by itself in the case that additional processing logic is required for the user's communication process with the PD protocol.
And then, assigning the function address of the target processing function to a default pointer variable to obtain a first pointer variable.
In the case that the user does not input information to the first application code module, the default pointer variable does not need to be updated, and the default pointer variable can be directly determined as the first pointer variable.
Step 230, determining a target module for processing the power transfer protocol event from the first module and the first application code module based on the first pointer variable and the power transfer protocol event; the target module corresponds to the control right of the power transmission protocol event.
In this step, the target module is a module for handling power transfer protocol events.
The target module corresponds to the control right of the power transmission protocol event.
The target module may be the first module or the first application code module.
Based on the first pointer variable and the power transfer protocol event, a target module may be determined.
In some embodiments, where the first module includes a power transfer protocol physical layer module and a second application code module, step 230 may include:
under the condition that the first pointer variable is legal value and the first processing is required to be carried out on the power transmission protocol event, determining a first application code module as a target module; the first process includes at least one of a target reply and a response to a power transfer protocol event;
the second application code module is determined to be the target module in the event that the first pointer variable is not a legal value and/or that no first processing of the power transfer protocol event is required.
In this embodiment, after the first pointer variable is obtained, the first pointer variable may or may not be a legal value.
For example, after assigning the address of the target processing function to the default pointer variable, the first pointer variable is obtained, and the first pointer variable may be null, or there is application code in the first pointer variable, but without paying attention, the application code of the user may be skipped directly, and the user does not need to take over the power transmission protocol event.
And when the power transmission protocol event occurs, executing the processing logic of the target processing function under the condition that the first pointer variable is legal value.
In the event that the first pointer variable is not a legal value, the power transfer protocol event is passed to the system for default processing.
It may be determined whether a first processing of the power transfer protocol event is required based on the target processing function.
The first process includes at least one of a target reply and a response to a power transfer protocol event.
Based on the target processing function, the user can judge whether the current power transmission protocol event needs to do target reply and response strategy in real time.
In the case that a first processing of the power transfer protocol event is required, control may be transferred to the first application code module, which is determined to be the target module.
The second application code module may be determined to be the target module without first processing the power transfer protocol event.
According to the multiparty cooperative processing method provided by the embodiment of the application, under the condition that the first pointer variable is a legal value, whether the power transmission protocol event needs to be subjected to target reply or response is further judged based on the target processing function, under the condition that the power transmission protocol event needs to be subjected to special reply and response strategies, the user obtains the control right of the power transmission protocol event, and the power transmission protocol event is processed based on the first application code module, so that the control right of the power transmission protocol event is prevented from being obtained by the first application code module under the condition that the user does not need to take over the power transmission protocol event, the flexibility is high, and the efficiency of processing the protocol event is improved.
Step 240, the control target module processes the power transfer protocol event.
In this step, after determining the target module, the target module may be controlled to process the power transfer protocol event.
According to the multiparty collaborative processing method provided by the embodiment of the application, the default pointer variable is processed based on the input condition of the first application code module to obtain the first pointer variable, then based on the first pointer variable and the power transmission protocol event, whether the first application code module needs to take over the power transmission protocol event is judged to determine the target module for processing the power transmission protocol event, and then the target module is controlled to process the power transmission protocol event, so that a user can input a target processing function according to requirements to automatically modify and realize the reply content and the response strategy in the PD protocol communication process, and 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 does not need to be frequently modified by an original factory, the efficiency of processing the power transmission protocol event is improved, the labor and time cost of developing the user scheme by the original factory of a chip is reduced, the flexibility of operation is high, the application scene is wide, and the privacy requirement of the user for realizing the PD response strategy by oneself is met.
In some embodiments, where the charging protocol software system includes a micro-control module, control may be transferred based on:
if the target module is the first module, maintaining the first module to hold the control right;
under the condition that the target module is a first application code module, the first application code module clears an event mark corresponding to a power transmission protocol event;
the first application code module sends a target instruction to the micro control module;
the micro control module transfers control of the power transfer protocol event from the first module to the first application code module in response to the target instruction.
In this embodiment, the default first module holds control of the power transfer protocol event and processes the power transfer protocol event based on the first module in the event that the user has no special application requirements.
In the case that the target module is the first module, the first module can be kept to hold the control right without transferring the control right.
In the case where the target module is the first application code module, control may be transferred to the first application code module.
Under the condition that the user needs to acquire the control right of the power transmission protocol event, the first application code module can clear the event mark corresponding to the power transmission protocol event.
The first application code module may send a target instruction to the micro control module informing the system that the power transfer protocol event is currently taken over by the user.
For example, in the case of a PD reception event that receives one discover_id message, the system defaults to replying with a not_support message; in the event that the user wishes to write reply content by himself, the user may gain control of handling the event.
After receiving the target instruction, the micro control module may transfer control of the power transfer protocol event from the first module to the first application code module in response to the target instruction.
As shown in fig. 3, when the user has a special application requirement or the content of the PD protocol version needs to be updated and the response policy code needs to be modified, the micro control module transfers the control right of the power transmission protocol event from the second application code module to the first application code module, and the first application code module processes the power transmission protocol event to realize the special application requirement.
As shown in fig. 4, in some embodiments, where the target module is the first application code module, after step 240, the multiparty co-processing method may further include:
and under the condition that the first application code module finishes processing the power transmission protocol event, the first application code module releases the control right of the power transmission protocol event.
In this embodiment, when the first application code module finishes processing the power transfer protocol event, the first application code module may release the control right of the power transfer protocol event, and the second application code module re-holds the control right of the power transfer protocol event.
In the actual execution process, under the condition that a power transmission protocol event occurs, whether a user obtains the control right of the power transmission protocol event can be judged first, under the condition that the current user takes over the control right of the power transmission protocol event, the default processing flow of the PD protocol is skipped, and the power transmission protocol event is processed based on the processing flow of the power transmission protocol event written by the user in the first application code module;
and under the condition that the user does not need to take over the control right of the power transmission protocol event, continuing to process the power transmission protocol event based on the default processing flow of the PD protocol in the second application code module.
The default processing flow of the PD protocol is mainly responsible for processing all related transactions of the PD protocol, program codes of the default processing flow are designed and written based on the second application code module, and source codes are packaged and invisible.
In the default processing flow of the PD protocol, for all power transmission protocol events, default reply content and response policies are corresponding.
The processing flow of the power transmission protocol event written by the user is written by the user, and under the condition that the power transmission protocol event requiring special processing is detected, the first application code module completes all response strategies and other related transactions of the power transmission protocol event based on the processing flow of the power transmission protocol event written by the user.
And under the condition that the power transmission protocol event received by the first application code module is not processed, entering the next round of circulation to continue processing.
Under the condition that the first application code module finishes processing the received power transmission protocol event, the first application code module releases the control right of the power transmission protocol event and informs the micro control module that the communication transaction of the PD protocol can be continuously taken over.
The multi-party cooperative processing device provided by the application is described below, and the multi-party cooperative processing device described below and the multi-party cooperative processing method described above can be referred to correspondingly.
According to the multiparty collaborative processing method provided by the embodiment of the application, the execution main body can be a multiparty collaborative processing device. In the embodiment of the application, the multiparty coprocessing device provided in the embodiment of the application is described by taking the multiparty coprocessing method executed by the multiparty coprocessing device as an example.
The embodiment of the application also provides a multiparty cooperative processing device.
As shown in fig. 5, the multiparty co-processing apparatus includes: a first processing module 510, a second processing module 520, a third processing module 530, and a fourth processing module 540.
A first processing module 510, configured to obtain a power transmission protocol event, where the power transmission protocol event corresponds to a default pointer variable;
the second processing module 520 is configured to process the default pointer variable based on the input condition of the first application code module, to obtain a first pointer variable; the input condition comprises receiving a target processing function input by a user or not receiving input information;
a third processing module 530 for determining a target module for processing the power transfer protocol event from the first module and the first application code module based on the first pointer variable and the power transfer protocol event; the target module corresponds to the control right of the power transmission protocol event;
a fourth processing module 540 for controlling the target module to process the power transfer protocol event.
According to the multiparty cooperative processing device provided by the embodiment of the application, the default pointer variable is processed based on the input condition of the first application code module to obtain the first pointer variable, then based on the first pointer variable and the power transmission protocol event, whether the first application code module needs to take over the power transmission protocol event is judged to determine the target module for processing the power transmission protocol event, and then the target module is controlled to process the power transmission protocol event, so that a user can input a target processing function according to requirements to automatically modify and realize the reply content and the response strategy in the PD protocol communication process, and 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 does not need to be frequently modified by an original factory, the efficiency of processing the power transmission protocol event is improved, the labor and time cost of developing the user scheme by the original factory of a chip is reduced, the flexibility of operation is high, the application scene is wide, and the privacy requirement of the user for automatically realizing the PD response strategy is met.
In some embodiments, where the first module includes a power transfer protocol physical layer module and a second application code module, the third processing module 530 may be further configured to:
under the condition that the first pointer variable is legal value and the first processing is required to be carried out on the power transmission protocol event, determining a first application code module as a target module; the first process includes at least one of a target reply and a response to a power transfer protocol event;
the second application code module is determined to be the target module in the event that the first pointer variable is not a legal value and/or that no first processing of the power transfer protocol event is required.
In some embodiments, the second processing module 520 may also be configured to:
under the condition that the input condition is a target processing function for receiving user input, updating a default pointer variable to obtain a first pointer variable;
in the case where the input condition is that the input information is not received, a default pointer variable is determined as a first pointer variable.
In some embodiments, the second processing module 520 may also be configured to:
and assigning the address of the target processing function to a default pointer variable to obtain a first pointer variable.
In some embodiments, where the charging protocol software system includes a micro-control module, the multiparty co-processing device may further include a fifth processing module 550 for transferring control rights:
If the target module is the first module, maintaining the first module to hold the control right;
under the condition that the target module is a first application code module, the first application code module clears an event mark corresponding to a power transmission protocol event;
the first application code module sends a target instruction to the micro control module;
the micro control module transfers control of the power transfer protocol event from the first module to the first application code module in response to the target instruction.
In some embodiments, the multiparty co-processing apparatus may further include a sixth processing module 560 for:
and under the condition that the target module is the first application code module, after the control target module processes the power transmission protocol event, the first application code module releases the control right of the power transmission protocol event under the condition that the first application code module processes the power transmission protocol event.
The multiparty co-processing device in the embodiment of the present application may be an electronic device, or may be a component in an electronic device, such as 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 multiparty coprocessor device in the embodiment of the present application may be a device with 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 multiparty cooperative processing device provided in the embodiment of the present application can implement each process implemented by the embodiments of the methods of fig. 2 to fig. 4, and in order to avoid repetition, a description is omitted here.
In some embodiments, as shown in fig. 6, the embodiment of the present application further provides an electronic device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and capable of running on the processor 601, where the program when executed by the processor 601 implements the respective processes of the embodiments of the multiparty cooperative processing method, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
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 above-mentioned embodiment of the multi-party cooperative processing method, and the same technical effect can be achieved, and for avoiding repetition, a description is omitted herein.
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 above-mentioned embodiments of the multiparty collaborative processing method, and the same technical effects can be achieved, so that repetition is avoided, and no further description is given here.
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, to implement each process of the above embodiment of the multiparty cooperative processing method, and to achieve the same technical effect, so that repetition is avoided, and details are not repeated here.
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 (13)

1. A charging protocol software system, comprising:
a first module; the first module corresponds to the control right of the power transmission protocol event;
a first application code module; the first application code module is electrically connected with the first module; the first application code module is used for receiving a target processing function input by a user; and transferring the control right to the first application code module under the condition that the first application code module is determined to take over the power transmission protocol event based on the target processing function.
2. The charging protocol software system according to claim 1, wherein the first module comprises:
a power transfer protocol physical layer module; the power transmission protocol physical layer module is electrically connected with the first application code module;
a second application code module; the second application code module is respectively and electrically connected with the power transmission protocol physical layer module and the first application code module; and the second application code module corresponds to the control right.
3. The charging protocol software system according to claim 1, wherein the first application code module comprises: an input module; the input module is used for inputting the target processing function;
The charging protocol software system further comprises: a micro control module; the micro control module is electrically connected with the first module and the first application code module respectively.
4. A multiparty co-processing method based on a charging protocol software system according to any one of claims 1-3, comprising:
acquiring a power transmission protocol event, wherein the power transmission protocol event corresponds to a default pointer variable;
processing the default pointer variable based on the input condition of the first application code module to obtain a first pointer variable; the input condition comprises receiving a target processing function input by a user or not receiving input information;
determining a target module for processing the power transfer protocol event from a first module and the first application code module based on the first pointer variable and the power transfer protocol event; the target module corresponds to the control right of the power transmission protocol event;
and controlling the target module to process the power transmission protocol event.
5. The multi-party co-processing method of claim 4, wherein, in the case that the first module includes a power transfer protocol physical layer module and a second application code module, the determining, from the first module and the first application code module, a target module for processing the power transfer protocol event based on the first pointer variable and the power transfer protocol event, comprises:
Determining the first application code module as a target module under the condition that the first pointer variable is legal value and the first processing is required to be carried out on the power transmission protocol event; the first process includes at least one of a target reply and a response to the power transfer protocol event;
and determining the second application code module as a target module in the case that the first pointer variable is not the legal value and/or the first processing of the power transmission protocol event is not required.
6. The method according to claim 4, wherein the processing the default pointer variable based on the input condition of the first application code module to obtain the first pointer variable includes:
under the condition that the input condition is the target processing function input by the receiving user, assigning the address of the target processing function to the default pointer variable to obtain the first pointer variable;
and determining the default pointer variable as the first pointer variable in the case that the input condition is the condition that the input information is not received.
7. The multiparty co-processing method according to any one of claims 4-6, wherein in case the charging protocol software system comprises a micro control module, the control right is transferred based on the following way:
If the target module is the first module, keeping the first module to hold the control right;
under the condition that the target module is the first application code module, the first application code module clears an event mark corresponding to the power transmission protocol event;
the first application code module sends a target instruction to the micro control module;
the micro control module transfers control of the power transfer protocol event from the first module to the first application code module in response to the target instruction.
8. The multi-party co-processing method according to any of claims 4-6, wherein, in the case where the target module is the first application code module, after the controlling the target module to process the power transfer protocol event, the method further comprises:
and under the condition that the first application code module finishes processing the power transmission protocol event, the first application code module releases the control right of the power transmission protocol event.
9. A multiparty co-processing device based on a charging protocol software system according to any one of claims 1-3, comprising:
The first processing module is used for acquiring a power transmission protocol event, wherein the power transmission protocol event corresponds to a default pointer variable;
the second processing module is used for processing the default pointer variable based on the input condition of the first application code module to obtain a first pointer variable; the input condition comprises receiving a target processing function input by a user or not receiving input information;
a third processing module configured to determine, based on the first pointer variable and the power transfer protocol event, a target module for processing the power transfer protocol event from a first module and the first application code module; the target module corresponds to the control right of the power transmission protocol event;
and the fourth processing module is used for controlling the target module to process the power transmission protocol event.
10. 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 instruction, the processor implementing the multiparty co-processing method according to any one of claims 4-8 when executing the program or instruction.
11. 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 multiparty co-processing method according to any one of claims 4-8 when executing the program.
12. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the multiparty co-processing method according to any of claims 4-8.
13. A computer program product comprising a computer program which, when executed by a processor, implements a multiparty co-processing method according to any one of claims 4-8.
CN202311652040.XA 2023-12-04 2023-12-04 Charging protocol software system and multiparty cooperative processing method Pending CN117667141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311652040.XA CN117667141A (en) 2023-12-04 2023-12-04 Charging protocol software system and multiparty cooperative processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311652040.XA CN117667141A (en) 2023-12-04 2023-12-04 Charging protocol software system and multiparty cooperative processing method

Publications (1)

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

Family

ID=90082128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311652040.XA Pending CN117667141A (en) 2023-12-04 2023-12-04 Charging protocol software system and multiparty cooperative processing method

Country Status (1)

Country Link
CN (1) CN117667141A (en)

Similar Documents

Publication Publication Date Title
KR102194071B1 (en) Method and apparatus for authorized login
CN106547580B (en) Method and device for hooking function, mobile terminal and storage medium
CN113708930B (en) Data comparison method, device, equipment and medium for private data
US20170277526A1 (en) Software categorization method and electronic device
CN108984255B (en) Remote assistance method and related equipment
CN107959932B (en) Method and device for processing wireless access point information and computer readable storage medium
CN107920383B (en) Wireless hotspot connection method, mobile terminal and computer-readable storage medium
WO2018161955A1 (en) Method and device for controlling broadcast recipient, and mobile terminal
CN107346197B (en) Information display method and device
CN112711955A (en) NFC information transmission method, NFC information transmission device and NFC terminal
CN117667141A (en) Charging protocol software system and multiparty cooperative processing method
CN116596748A (en) Image stylization processing method, apparatus, device, storage medium, and program product
CN113966590A (en) Site session termination method, device, terminal equipment and medium
CN112988426A (en) Message processing method and device
CN111399928A (en) Application program starting method and device, electronic equipment and readable storage medium
CN114546171A (en) Data distribution method, data distribution device, storage medium and electronic equipment
CN112769688A (en) Method and device for protocol stack adaptation, electronic equipment and storage medium
CN110337074B (en) Interactive information transmission method, system and terminal equipment
CN108762633B (en) Picture adding method and device, terminal equipment and storage medium
CN110765426A (en) Equipment permission setting method, device, equipment and computer storage medium
CN112734453A (en) Electronic ticket collecting method, electronic ticket issuing method, electronic ticket collecting device, electronic ticket issuing device, electronic ticket equipment and storage medium
CN111885152B (en) Promotion information processing method, electronic device and computer-readable storage medium
CN113055250B (en) Networking communication method, device, terminal equipment and storage medium
CN113268300B (en) Information display method and device
CN114268653B (en) Equipment calling method, device, equipment, medium and product

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