CN116821433B - Charging pile charging power query method, device, equipment and medium - Google Patents

Charging pile charging power query method, device, equipment and medium Download PDF

Info

Publication number
CN116821433B
CN116821433B CN202310695913.9A CN202310695913A CN116821433B CN 116821433 B CN116821433 B CN 116821433B CN 202310695913 A CN202310695913 A CN 202310695913A CN 116821433 B CN116821433 B CN 116821433B
Authority
CN
China
Prior art keywords
charging
order
charging pile
query
pile
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.)
Active
Application number
CN202310695913.9A
Other languages
Chinese (zh)
Other versions
CN116821433A (en
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.)
Guangdong Xingyun Kaiwu Technology Co ltd
Original Assignee
Guangdong Xingyun Kaiwu 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 Guangdong Xingyun Kaiwu Technology Co ltd filed Critical Guangdong Xingyun Kaiwu Technology Co ltd
Priority to CN202310695913.9A priority Critical patent/CN116821433B/en
Publication of CN116821433A publication Critical patent/CN116821433A/en
Application granted granted Critical
Publication of CN116821433B publication Critical patent/CN116821433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention provides a charging pile charging power query method, a device, equipment and a medium, and relates to the technical field of charging piles, wherein the method comprises the following steps: acquiring a charging power inquiry command of a charging pile, and creating a timing task corresponding to the inquiry command; acquiring order information of a charging order corresponding to the query instruction based on the timing task, and determining a valid order in the charging order according to the order information; and inquiring the charging power corresponding to the effective order. The method has the advantages that the effective orders are obtained through creating the timing tasks, and the charging power corresponding to the effective orders is inquired, so that the delay inquiry of the charging power of the charging pile is realized, the ineffective inquiry of the charging power of the ineffective orders and the repeated inquiry of the charging power of the effective orders are reduced, and the resource occupation is reduced.

Description

Charging pile charging power query method, device, equipment and medium
Technical Field
The invention relates to the technical field of charging piles, in particular to a charging pile charging power query method, a charging pile charging power query device, charging pile charging power query equipment and charging pile charging power query media.
Background
Along with the development of electric automobiles and electric bicycles, the use of the shared charging piles is also more and more widespread, charging of the shared charging piles is mainly related to charging time and charging power, some charging piles are charged according to the charging time, and some charging piles are charged according to the charging power, so that users are generally concerned with the charging power in the whole charging process in the charging process, and query requirements on the charging power exist.
For the client capable of inquiring the charging power, different types of charging piles may be connected, the time for reporting data by the different types of charging piles in the charging process is different, for the query request of the charging power initiated by the user, the condition that the data cannot be acquired in a response period to cause invalid query may exist, and if the query request is frequently initiated, more invalid queries are generated to cause resource occupation.
Disclosure of Invention
The invention provides a charging pile charging power query method, a charging pile charging power query device, charging pile charging power query equipment and a charging pile charging power query medium, which are used for solving the defect of resource occupation caused by invalid query generated by inconsistent time of reporting data in a charging process of charging piles of different types in the prior art.
The invention provides a charging pile charging power query method, which comprises the following steps:
acquiring a query instruction of charging power of a charging pile, and creating a timing task corresponding to the query instruction;
acquiring order information of a charging order corresponding to the query instruction based on the timing task, and determining a valid order in the charging order according to the order information;
and inquiring the charging power corresponding to the effective order.
According to the charging pile charging power query method provided by the invention, the timing tasks comprise a first timing task and a second timing task; the step of acquiring order information of the charging order corresponding to the query instruction based on the timing task and determining the effective order in the charging order according to the order information comprises the following steps:
Based on the first timing task, acquiring order information of a charging order corresponding to the query instruction at intervals of a first timing length;
traversing order information of each charging order every second timing time length based on the second timing task, and determining order states of each charging order according to the order information; the second timing period is longer than the first timing period; the order state comprises an inactive state, a timeout off state, a charging state and a charging completion state;
and determining valid orders in the charging orders according to the order states.
According to the charging pile charging power query method provided by the invention, the order information of the charging order corresponding to the query instruction is obtained based on the timing task, and the effective order in the charging order is determined according to the order information, and the method comprises the following steps:
Generating a delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue; the delay time of the delay inquiry message is a third timing time;
When the message queue has the message to be consumed, the waiting time length of which reaches the third timing time length, starting a query thread corresponding to the message to be consumed;
Acquiring order information of a charging order corresponding to the query instruction by utilizing the query thread, and determining an order state of the charging order according to the order information; the order state comprises an inactive state, a timeout off state, a charging state and a charging completion state;
And determining an effective order in the charging order according to the order state, returning and executing the delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue until the order state of the effective order is a charging completion state.
According to the charging pile charging power query method provided by the invention, after the charging power corresponding to the effective order is queried, the method further comprises the following steps:
And recycling the query thread.
According to the charging pile charging power query method provided by the invention, after the charging pile charging power query instruction is obtained, the method further comprises the following steps:
Determining whether a historical charging order for the charging stake exists;
If so, acquiring a historical charging order of the charging pile, and determining the reporting frequency of the charging pile to the charging process data according to the historical charging order; the charging process data includes charging power;
if the charging pile does not exist, charging detection is carried out on the charging pile so as to determine the reporting frequency of the charging pile on the charging process data;
and determining the timing time length of the timing task corresponding to the charging pile according to the reporting frequency.
According to the charging pile charging power query method provided by the invention, the charging detection is performed on the charging pile to determine the reporting frequency of the charging pile on the charging process data, and the method comprises the following steps:
determining the equipment type of the charging pile, and acquiring a plurality of target charging piles which are the same as the equipment type of the charging pile and have charging orders with order states of charge;
Performing charging detection on the target charging pile to obtain reporting frequency of the target charging pile on charging process data;
And determining the reporting frequency of the charging pile to the charging process data based on the average value of the reporting frequencies of the target charging piles.
According to the charging pile charging power query method provided by the invention, the charging detection is carried out on the target charging pile to obtain the reporting frequency of the target charging pile to the charging process data, and the method comprises the following steps:
Inquiring whether the charging process data of the target charging pile is updated or not at intervals of a third timing length based on the charging order of the target charging pile;
determining the query times when the charging process data of the target charging pile is updated in two adjacent times;
And determining the reporting frequency of the target charging pile to the charging process data according to the query times.
The invention also provides a charging pile charging power inquiry device, which comprises:
The instruction acquisition module is used for acquiring a query instruction of the charging power of the charging pile and creating a timing task corresponding to the query instruction;
the order inquiry module is used for acquiring order information of the charging orders corresponding to the inquiry instructions based on the timing tasks and determining effective orders in the charging orders according to the order information;
and the power inquiry module is used for inquiring the charging power corresponding to the effective order.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the charging pile charging power query method according to any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a charging pile charging power query method as described in any one of the above.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a charging pile charging power query method as described in any one of the above.
According to the charging pile charging power query method, device, equipment and medium, the query instruction of the charging pile charging power is obtained, the timing task corresponding to the query instruction is created, the information of the charging order is obtained based on the created timing task, and therefore the effective order in the charging order is determined, and the charging power of the effective order is queried. The method has the advantages that the effective orders are obtained through creating the timing tasks, the charging power corresponding to the effective orders is inquired, the delay inquiry of the charging power of the charging pile is realized, the ineffective inquiry of the charging power of the ineffective orders and the repeated inquiry of the charging power of the effective orders are reduced, and therefore the resource occupation is reduced.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a charging power query method of a charging pile according to the present invention;
FIG. 2 is a second flow chart of a method for inquiring charging power of a charging pile according to the present invention;
FIG. 3 is a third flow chart of a method for inquiring charging power of a charging pile according to the present invention;
Fig. 4 is a schematic structural diagram of a charging pile charging power query device provided by the invention;
Fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the embodiments of the present application, it should be noted that the terms "center", "longitudinal", "lateral", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the apparatus or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the embodiments of the present application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In describing embodiments of the present application, it should be noted that, unless explicitly stated and limited otherwise, the terms "coupled," "coupled," and "connected" should be construed broadly, and may be either a fixed connection, a removable connection, or an integral connection, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium. The specific meaning of the above terms in embodiments of the present application will be understood in detail by those of ordinary skill in the art.
In embodiments of the application, unless expressly specified and limited otherwise, a first feature "up" or "down" on a second feature may be that the first and second features are in direct contact, or that the first and second features are in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is less level than the second feature.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Referring to fig. 1, fig. 1 is a flow chart of a charging power query method of a charging pile according to an embodiment of the present invention, and based on fig. 1, the charging power query method of a charging pile according to an embodiment of the present invention includes:
step 100, acquiring a query instruction of charging power of a charging pile, and creating a timing task corresponding to the query instruction;
The charging power query method provided by the embodiment of the invention is used for querying the charging power of the charging pile, the charging power belongs to charging process data, and the charging process of the charging pile mainly comprises the stages of order creation, power query, order closing and the like. In the order creation stage, a user creates a charging order to charge by means of card swiping, cash coin inserting, cash payment and the like, wherein the card swiping and the cash coin inserting payment can directly create the charging order at a charging pile or a user side corresponding to the charging pile, and the code scanning payment can create and activate the charging order through a payment callback of a third party payment mechanism. In the power query stage, firstly, a query instruction of the charging power of the charging pile is acquired, wherein the query instruction can be generated by manually triggering a user when the user wants to query the charging power, for example, in the charging process, the user can trigger the query instruction to query the charging power at a corresponding user side such as an APP, an applet, a webpage and the like; or may be automatically generated upon detection of the creation of a charge order, without limitation. In the charging process of the charging pile, charging process data including charging power is actively reported to a server corresponding to the user side or a device server corresponding to the charging pile, so that a user can inquire the charging process data at the user side.
When a user wants to inquire the charging power, based on the created charging order, an inquiry request is initiated at the user side to generate a corresponding inquiry instruction, and charging process data reported by the charging pile is called from the server. The obtained charging power query instruction of the charging pile comprises information such as equipment identification, equipment type, order identification and the like of the charging pile to be queried. Based on the acquired query instruction of the charging pile, a corresponding timing task is created, and the timing task is executed once every other timing time length, so that the periodic delay query of the charging power can be realized.
It should be noted that, when there are multiple query instructions, the same user may create multiple query requests initiated by charging orders based on different charging piles, or multiple query requests initiated by different users based on charging orders created by the same user, and multiple charging orders may be created for different charging piles, which is not limited in detail herein.
Step 200, acquiring order information of a charging order corresponding to the query instruction based on the timing task, and determining a valid order in the charging order according to the order information;
Based on the created timing task, order information of the charging order corresponding to the query instruction is obtained, the timing time of the timing task is 1 minute, and the order information of the charging order corresponding to the query instruction is pulled from the server every other minute so as to confirm the order state, the charging state and the like.
As can be seen, for a charging order created by a user, an invalid order is generated due to the fact that the user can terminate charging at any time in the charging process, or due to the fact that payment fails, overtime response and the like, and for a charging power query request initiated by the user based on the invalid order, the corresponding charging power cannot be queried naturally due to the fact that the order is invalid, so that invalid query is generated, and resources are occupied and wasted. By creating a timing task with a timing time length, order information can be acquired at regular time intervals to determine a valid order, so that power inquiry on invalid orders can be reduced, and resource occupation is reduced.
And step 300, inquiring the charging power of the effective order.
According to the determined effective order, the charging power of the effective order is inquired, so that the inquiry command of a user is responded, the charging order corresponding to the obtained inquiry command can be the effective order or the invalid order, and only the charging power corresponding to the effective order is obtained, so that the invalid inquiry can be reduced, and the occupation and the waste of resources are reduced. In addition, because the frequencies of reporting data of the charging pile equipment of the two different types are different, when an effective order and charging power are obtained, a timing task is created to carry out delay inquiry, so that repeated inquiry of newly added data which cannot be inquired can be effectively reduced, and resource occupation is further reduced.
Further, for the acquisition of the charging power, the charging power corresponding to each valid order is acquired when each valid order is acquired based on a timing task, that is, the charging power is queried every time period; or after the timing task is finished, the charging power of the effective order in the whole charging process is obtained at one time. The manner of obtaining the charging power is not particularly limited here as well.
In this embodiment, by acquiring a query instruction of charging power of a charging pile, creating a timing task corresponding to the query instruction, acquiring order information of a charging order corresponding to the query instruction based on the created timing task, determining an effective order in the charging order according to the acquired order information, and querying charging power of the effective order. The method has the advantages that the effective order is obtained through creating the timing task, and the charging power of the effective order is inquired, so that the delay inquiry of the charging power of the charging pile is realized, the ineffective inquiry of the charging power of the ineffective order and the repeated inquiry of the charging power of the effective order are reduced, and the resource occupation is reduced.
Preferably, in one embodiment, the created timed tasks include a first timed task and a second timed task, the timing durations of the first and second timed tasks being different. In step 200, obtaining order information of the charging order corresponding to the query instruction based on the timing task, and determining a valid order in the charging order according to the order information may include:
step 201, based on the first timing task, acquiring order information of a charging order corresponding to the query instruction at intervals of a first timing period;
Step 202, traversing order information of each charging order every second timing time based on the second timing task, and determining an order state of each charging order according to the order information; the second timing period is longer than the first timing period; the order state comprises an inactive state, a timeout off state, a charging state and a charging completion state;
And step 203, determining a valid order in the charging order according to the order state.
For determining the effective orders, firstly, order information of each charging order is acquired every first timing time based on the created first timing task, and each charging order and the acquired order information can be cached in a collective form.
And traversing the order information of each charging order at intervals of a second timing duration based on the created second timing task for the acquired order information of each charging order, so as to determine the order state of each charging order. Wherein the second timing period is longer than the first timing period, preferably the second timing period may be an integer multiple of the first timing period. For convenience of description, the first timing period is 1 minute and the second timing period is 20 minutes will be described below as an example.
Based on the acquired query instruction, a first timing task and a second timing task with different timing durations are respectively established, wherein order information of a charging order corresponding to the query instruction is acquired every 1 minute based on the established first timing task. And pulling the acquired order information every 1 minute, traversing the order information of each charging order every 20 minutes based on the created second timing task, thereby determining the order state of each charging order, and determining the effective order according to the order state of each charging order. The order state comprises an unactivated state, a overtime closing state, a charging state and a charging completion state, the effective order comprises a charging order of the order state and the charging completion state, the order state is the unactivated state and the overtime closing state, and the charging order with the missing charging time length is an invalid order, and for the invalid order, the charging power of the invalid order cannot be obtained, so that the query of the charging power of the invalid order is an invalid query, and resources are occupied.
Referring to fig. 2, fig. 2 is another flow chart of a charging pile charging power query method provided by the embodiment of the invention, based on fig. 2, in an order creation stage, a user creates a charging order through payment of a third party, activates the order through payment callback, if the payment fails, the order cannot be activated, and if the payment succeeds, the order is activated; the user may also create a charge order by swiping a card or cash coin-in payment. The created charge order is sent to a server cache list for caching. For the cached charging orders, pulling order information once every first timing time based on the created first timing task, wherein the upper limit of the quantity of the charging orders which can be pulled is configurable, traversing all the pulled order information once every second timing time based on the created second timing task for the order information pulled every first timing time, thereby determining the order state of each charging order, ending the query task according to the order state if no valid order exists, and querying the port power of the charging pile corresponding to the valid order if the valid order exists, and obtaining the charging power corresponding to the valid order; then determining whether the effective order is charged or not according to the order state, if so, rejecting the order, and not continuously acquiring order information of the order when inquiring power next time so as to reduce resource occupation; after the order with the charge completed is removed, whether an effective order exists is determined, if the order with the charge completed is removed, the effective order still exists, or the order state of the effective order is not the charge completed state, the order information is continuously pulled based on the created first timing task, and if the order with the charge completed is removed, the query task is ended, and the current charge power query is completed. And when the invalid order is closed, the invalid order can be closed periodically by creating a new timing task, or can be closed in real time after the invalid order is determined according to the order state based on a second timing task, and the method is not particularly limited. The closed invalid orders form a closed order list, and when the timing task is executed, the closed charging orders can be removed based on matching of the closed order list, so that inquiry of the closed orders is reduced, and resource occupation is reduced. It should be noted that, the first timing duration corresponding to the first timing task and the second timing duration corresponding to the second timing task are also configurable.
In one embodiment, it may be appreciated that the time intervals for reporting data by different types of charging stake equipment may be different, and thus, the query policy may be optimized based on the equipment type of the charging stake, the equipment type of the charging stake may be marked in the charging order, and timing tasks with different timing durations may be set for the different equipment types. However, when the number of the charging piles is large, the situation of order sharp increase is likely to occur, and when the number of the devices is continuously increased, the pressure increase caused by the device power is intensively inquired in batches according to the timing tasks to the server, so that the stability of the server is possibly affected, and the server is down; if the timing time of the timing task is shortened, the inquiry time interval is shortened, which causes the increase of the task number and the thread number, and the normal scheduling execution of the service may be affected. Based on this, in the present embodiment, the query method of the charging power is further optimized based on the message queue. When the charging order is generated, writing an order power inquiry delay message with a certain time delay time length of 20 minutes into the message queue; then, when inquiring the charging power, the consumption is carried out according to the delay message in the message queue, so that the effect of dispersing the inquiring pressure is achieved under the condition of realizing delay inquiry and reducing useless inquiry times. Based on this, step 200 may include:
Step 204, generating a delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue; the delay time of the delay inquiry message is a third timing time;
Step 205, when a message to be consumed with a waiting time length reaching the third timing time length exists in the message queue, starting a query thread corresponding to the message to be consumed;
step 206, acquiring order information of a charging order corresponding to the query instruction by using the query thread, and determining an order state of the charging order according to the order information; the order state comprises an inactive state, a timeout off state, a charging state and a charging completion state;
Step 207, determining a valid order in the charging order according to the order state, returning and executing the delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue until the order state of the valid order is a charging completion state.
Specifically, for the query instruction of the obtained charging power of the charging pile, a corresponding timing task is created based on the query instruction, and a delay query message corresponding to the timing task is generated, wherein the delay time of the delay query message is the timing time of the timing task, namely, a third timing time, and the third timing time can be the same as or different from the second timing time. Taking the example that the third timing time length is the same as the second timing time length and is 20 minutes, for the generated delay inquiry message for delay inquiry, sending the delay inquiry message to a preset message queue for waiting consumption, wherein the delay time length of the generated delay message is the third timing time length corresponding to the timing task, and the third timing time length is configurable and can be set according to the equipment type of the charging pile.
And starting a corresponding query thread for consuming the delay query message of the arrival time in the message queue when the message to be consumed reaching the set waiting time is detected, and executing a corresponding charging power query task. The inquiry thread is started when the waiting time of the delay inquiry message in the message queue reaches the timing time of the timing task, and after the inquiry thread is started, the acquired order information of the charging orders is traversed, so that the order state of each charging order is determined according to the order information of each charging order, and the effective order in each charging order is acquired. When a delay inquiry message corresponding to a certain charging order in the message queue is consumed, a new delay inquiry message is generated immediately and sent to the message queue, so that the effect of timing inquiry is realized, the order state of an effective order is changed into a charging completion state until the order state of the charging order is changed into the charging completion state, namely, a charging task corresponding to the charging order is completed, no new charging process data report exists in the follow-up process after charging is stopped, all charging power data of the charging process are acquired, and therefore the timing task corresponding to the charging power inquiry can not be continuously executed.
Referring to fig. 3, fig. 3 is a schematic flow chart of another method for inquiring charging power of a charging pile according to an embodiment of the present invention, and similarly, in an order creation stage, when a user creates a charging order through payment of a third party, the user activates the order through payment callback; the user may also create a charge order by cash coin or swipe payment. For the created charging order, or the charging order activated by payment callback, generating a delay inquiry message and sending the delay inquiry message to a preset message queue, wherein the waiting time of the delay inquiry message in the message queue is the delay time, starting a corresponding inquiry thread for consumption for the delay inquiry message reaching the time in the message queue, and executing a timing inquiry task corresponding to the delay inquiry message. Based on the inquiry thread, acquiring order information of the current charging order, determining an order state of the charging order, and if the current charging order is a valid order, inquiring charging pile port power corresponding to the valid order, and acquiring charging power of the charging pile. And then determining whether the order state of the current charging order is a charging completion state, if the order state of the current charging order is the charging completion state or the current charging order is not a valid order, ending the query task, and if the order state of the current charging order is not the charging completion state, generating a delay query message and sending the delay query message to a message queue for waiting so as to realize the timing power query of the current charging order. And for invalid orders, closing in an order closing stage to form a closed order list for caching, and when a timing task is executed, matching can be performed based on the closed order list, closed charging orders are removed, and inquiry of the closed orders is reduced, so that resource occupation is reduced.
When the message queue is not used, order information is pulled regularly and power inquiry is carried out by traversing the order information based on the created timing task, and the charging order is processed in a timed batch mode. The delay inquiry message is processed by adopting the message queue, and timing power inquiry can be performed in a self-adaptive manner according to the time of charge order creation, so that the charge order is subjected to decentralized processing according to the order creation time, the centralized inquiry and batch processing conditions can be effectively reduced, the pressure of a server is reduced, and the stable operation of the server is ensured. It can be understood that, for the batch processing manner of regularly acquiring the order information, the timing tasks may be also subjected to decentralized query in the form of a message queue, so as to balance the server pressure, avoid centralized query, generate query messages corresponding to the first timing task and the second timing task based on the message queue, and send the query messages corresponding to the first timing task and the second timing task to the message queue, where the processing manner of the query messages corresponding to the first timing task and the second timing task is the same as the processing manner of the delayed query message, and will not be described herein.
Further, based on the power query mode of the message queue, after step 300, the method may further include:
and 310, recycling the query thread.
For an effective order, power inquiry at regular intervals can be realized based on a timing task, discrete inquiry can be realized according to the time of creating the order by a user, and the pressure of centralized processing is reduced; after inquiring the charging power each time, the thread resources can be recovered according to the setting.
Preferably, for different types of charging pile devices, due to different time intervals for reporting charging process data in the charging process, timing tasks with different durations can be set when charging power is queried. For example, for device type 1 reporting data once every 20 minutes, it may be set to query the charging power once every 20 to 25 minutes, and for device type 2 reporting data once every 10 minutes, it may be set to query the charging power once every 10 to 15 minutes.
The data reporting time corresponding to different device types can be obtained through a test mode, for example, charging inquiry detection is performed on some devices with valid orders according to a short time interval (for example, once every 1 minute), and then the inquiry times used for inquiring the newly reported charging process data are recorded, so that the time interval of reporting the data by the charging pile can be converted. Further, the average value of the same type of equipment can be obtained, so that the data reporting frequency of the same type of equipment can be determined. On the basis of the time interval of the reported data, a certain redundancy time is added, so that the time duration of the timing task for inquiring the charging power can be used, and the timing tasks with different time durations can be created for different equipment types.
Specifically, after the charging power query instruction for the charging pile is obtained, the method may further include:
Step 01, determining whether a historical charging order of the charging pile exists;
Step 02, if the charging pile exists, acquiring a historical charging order of the charging pile, and determining the reporting frequency of the charging pile to the charging process data according to the historical charging order; the charging process data includes charging power;
step 03, if not, carrying out charging detection on the charging pile so as to determine the reporting frequency of the charging pile on the charging process data;
and step 04, determining the timing duration of the timing task corresponding to the charging pile according to the reporting frequency.
After acquiring the query instruction of the charging power of the charging pile, firstly determining whether a historical charging order of the charging pile exists, and if so, determining the reporting frequency of the charging pile to the charging process data according to the order information of the historical charging order of the charging pile. It is known that, for the queried charging power, each data point is detected by the charging pile at regular time in the charging process and reported to the server at regular time, so that a corresponding power curve can be generated according to the queried charging power and displayed on the user side, and meanwhile, the reporting frequency of the charging pile to the charging process data can be determined according to the reporting time of the charging process data recorded by the server.
If there is no historical charging order of the charging pile, or the reporting frequency of the charging pile to the charging process data cannot be determined according to the historical charging order of the charging pile, the charging pile can be subjected to charging detection, so that the reporting frequency of the charging pile to the charging process data is determined. Generally, when a charging pile is charged for the first time and is accessed to a server for the first time, historical charging data of the charging pile does not exist in the server, and when the time of reporting charging process data to the charging pile is not recorded by the server, according to a historical charging order of the charging pile, the reporting frequency of the charging pile to the charging process data is difficult to determine, so that the charging pile is used for carrying out spam detection, and the reporting frequency of the charging pile to the charging process data is determined.
According to the reporting frequency of the charging pile to the charging process data, determining the timing duration of a timing task corresponding to the charging pile, wherein the timing task corresponding to the charging pile comprises a first timing task for pulling order information of a charging order and a second timing task for acquiring an effective order and charging power corresponding to the effective order; the timing time length of the timing task comprises a first timing time length corresponding to the first timing task and a second timing time length corresponding to the second timing task. According to the reporting frequency of the charging pile to the charging process data, the time interval of the charging pile for reporting the charging process data is determined, and a certain redundancy time is added on the basis, so that the time duration of the charging pile timing task can be used, and the certain redundancy time is added, so that the newly reported charging power can be queried when the timing task queries each time, and the invalid query of the new data is reduced.
Preferably, in step 03, the charging pile is subjected to charging detection, and the reporting frequency of the charging pile to the charging process data is determined, which specifically includes:
Step 031, determining the equipment type of the charging pile, and obtaining a plurality of target charging piles which are the same as the equipment type of the charging pile and have order states of charging orders being charged;
Step 032, performing charging detection on the target charging pile to obtain reporting frequency of the target charging pile on charging process data;
step 033, determining reporting frequency of the charging pile to the charging process data based on the average value of the reporting frequencies of the plurality of target charging piles.
When the charging pile is subjected to charging detection, firstly, the equipment type of the charging pile is determined, so that a plurality of target charging piles with the same equipment type and charging orders with the order state being the charging state are obtained. And detecting charging of the plurality of charging target charging piles, so as to determine the reporting frequency of the charging process data by each target charging pile, calculating the average value of the reporting frequency of the charging process data by the plurality of target charging piles, and using the average value as the reporting frequency of the charging process data by the charging pile, thereby determining the reporting frequency of the charging process data by the charging pile.
Further, the charging detection is performed on the target charging pile, and the reporting frequency of the target charging pile to the charging process data is determined, which specifically comprises the following steps:
step 0321, inquiring whether the charging process data of the target charging pile is updated or not at intervals of a third timing length based on the charging order of the target charging pile;
Step 0322, determining the query times when the charging process data of the target charging pile is updated in two adjacent times;
And step 0323, determining the reporting frequency of the target charging pile to the charging process data according to the query times.
Based on the charging order of the target full charge pile in the charging state, inquiring whether the charging process data of the target charging pile is updated or not at intervals of a third timing length, such as 30 seconds, specifically, determining whether the newly reported charging process data exists or not by pulling order information of the charging order of the target charging pile at intervals of the third timing length. And then determining the query times when the charging process data of the target charging pile is queried for updating in two adjacent times, and determining the time interval of reporting the charging process data by the target charging pile according to the query times. And respectively carrying out charging detection on the charging piles of the same type, and taking the average value of the reporting frequency of the data of the charging piles of the same type to ensure the accuracy.
Preferably, for the plurality of target charging piles, when the charging detection is performed, the time interval of the plurality of target charging piles when acquiring order information of a charging order, that is, the third timing duration, may be the same or different, and for the same target charging pile, during the charging detection, the third timing duration may also be adjusted, for example, the time interval when acquiring order information is increased or decreased according to a preset gradient value, and the like. Further, for the query times when the charging process data of the target charging pile is updated in two adjacent times, an average value of query time lengths corresponding to the query times obtained in a certain time period can be used as a time interval for reporting the charging process data by the target charging pile in the same target charging detection process, and the time interval is not particularly limited herein.
In this embodiment, the delay inquiry task corresponding to the delay message is processed based on the message queue, so that the inquiry task of the charging power can be discretely inquired according to the time of the user request, and the pressure of centralized processing is reduced. And the reporting frequency of the charging pile to the charging process data is obtained in a charging detection mode, timing tasks with different time lengths can be set for different types of charging piles, the generation of invalid inquiry is further reduced on the basis of delay inquiry, the occupation of resources is further reduced, and the utilization efficiency of resources is improved.
The charging pile charging power inquiry device provided by the invention is described below, and the charging pile charging power inquiry device described below and the charging pile charging power inquiry method described above can be referred to correspondingly.
Referring to fig. 4, a charging pile charging power query device provided by an embodiment of the present invention includes:
The instruction acquisition module 10 is used for acquiring an inquiry instruction of the charging power of the charging pile and creating a timing task corresponding to the inquiry instruction;
The order inquiry module 20 is configured to obtain order information of a charging order corresponding to the inquiry instruction based on the timing task, and determine a valid order in the charging order according to the order information;
And the power inquiry module 30 is used for inquiring the charging power corresponding to the valid order.
In one embodiment, the timing tasks include a first timing task and a second timing task, and the order query module 20 is further configured to:
Based on the first timing task, acquiring order information of a charging order corresponding to the query instruction at intervals of a first timing length;
traversing order information of each charging order every second timing time length based on the second timing task, and determining order states of each charging order according to the order information; the second timing period is longer than the first timing period; the order state comprises an inactive state, a timeout off state, a charging state and a charging completion state;
and determining valid orders in the charging orders according to the order states.
In one embodiment, the order query module 20 is further configured to:
Generating a delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue; the delay time of the delay inquiry message is a third timing time;
When the message queue has the message to be consumed, the waiting time length of which reaches the third timing time length, starting a query thread corresponding to the message to be consumed;
Acquiring order information of a charging order corresponding to the query instruction by utilizing the query thread, and determining an order state of the charging order according to the order information; the order state comprises an inactive state, a timeout off state, a charging state and a charging completion state;
And determining an effective order in the charging order according to the order state, returning and executing the delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue until the order state of the effective order is a charging completion state.
In one embodiment, the charging pile charging power query device further includes a resource recycling module configured to:
And recycling the query thread.
In one embodiment, the charging pile charging power inquiry device further includes a charging detection module, configured to:
Determining whether a historical charging order for the charging stake exists;
If so, acquiring a historical charging order of the charging pile, and determining the reporting frequency of the charging pile to the charging process data according to the historical charging order; the charging process data includes charging power;
if the charging pile does not exist, charging detection is carried out on the charging pile so as to determine the reporting frequency of the charging pile on the charging process data;
and determining the timing time length of the timing task corresponding to the charging pile according to the reporting frequency.
In one embodiment, the charge detection module is further configured to:
determining the equipment type of the charging pile, and acquiring a plurality of target charging piles which are the same as the equipment type of the charging pile and have charging orders with order states of charge;
Performing charging detection on the target charging pile to obtain reporting frequency of the target charging pile on charging process data;
And determining the reporting frequency of the charging pile to the charging process data based on the average value of the reporting frequencies of the target charging piles.
In one embodiment, the charge detection module is further configured to:
Inquiring whether the charging process data of the target charging pile is updated or not at intervals of a third timing length based on the charging order of the target charging pile;
determining the query times when the charging process data of the target charging pile is updated in two adjacent times;
And determining the reporting frequency of the target charging pile to the charging process data according to the query times.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a charging pile charging power query method comprising:
acquiring a query instruction of charging power of a charging pile, and creating a timing task corresponding to the query instruction;
acquiring order information of a charging order corresponding to the query instruction based on the timing task, and determining a valid order in the charging order according to the order information;
and inquiring the charging power corresponding to the effective order.
Further, the logic instructions in the memory 330 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute a charging pile charging power query method provided by the above methods, and the method includes:
acquiring a query instruction of charging power of a charging pile, and creating a timing task corresponding to the query instruction;
acquiring order information of a charging order corresponding to the query instruction based on the timing task, and determining a valid order in the charging order according to the order information;
and inquiring the charging power corresponding to the effective order.
In still another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the charging pile charging power query method provided by the above methods, the method comprising:
acquiring a query instruction of charging power of a charging pile, and creating a timing task corresponding to the query instruction;
acquiring order information of a charging order corresponding to the query instruction based on the timing task, and determining a valid order in the charging order according to the order information;
and inquiring the charging power corresponding to the effective order.
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 invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will 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 technical solutions of the embodiments of the present invention.

Claims (8)

1. The charging pile charging power query method is characterized by comprising the following steps of:
acquiring a query instruction of charging power of a charging pile, and creating a timing task corresponding to the query instruction;
acquiring order information of a charging order corresponding to the query instruction based on the timing task, and determining a valid order in the charging order according to the order information;
Inquiring the charging power corresponding to the effective order;
The step of acquiring order information of the charging order corresponding to the query instruction based on the timing task and determining the effective order in the charging order according to the order information comprises the following steps:
Generating a delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue; the delay time of the delay inquiry message is a third timing time;
When the message queue has the message to be consumed, the waiting time length of which reaches the third timing time length, starting a query thread corresponding to the message to be consumed;
Acquiring order information of a charging order corresponding to the query instruction by utilizing the query thread, and determining an order state of the charging order according to the order information; the order state comprises an inactive state, a timeout off state, a charging state and a charging completion state;
And determining an effective order in the charging order according to the order state, returning and executing the delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue until the order state of the effective order is a charging completion state.
2. The method for inquiring charging power of charging pile according to claim 1, further comprising, after inquiring the charging power corresponding to the valid order:
And recycling the query thread.
3. The charging pile charging power query method according to claim 1, further comprising, after the obtaining the charging power query instruction of the charging pile:
Determining whether a historical charging order for the charging stake exists;
If so, acquiring a historical charging order of the charging pile, and determining the reporting frequency of the charging pile to the charging process data according to the historical charging order; the charging process data includes charging power;
if the charging pile does not exist, charging detection is carried out on the charging pile so as to determine the reporting frequency of the charging pile on the charging process data;
and determining the timing time length of the timing task corresponding to the charging pile according to the reporting frequency.
4. The charging pile charging power query method according to claim 3, wherein the detecting the charging pile to determine the reporting frequency of the charging pile to the charging process data includes:
determining the equipment type of the charging pile, and acquiring a plurality of target charging piles which are the same as the equipment type of the charging pile and have charging orders with order states of charge;
Performing charging detection on the target charging pile to obtain reporting frequency of the target charging pile on charging process data;
And determining the reporting frequency of the charging pile to the charging process data based on the average value of the reporting frequencies of the target charging piles.
5. The method for inquiring charging power of a charging pile according to claim 4, wherein the step of performing charging detection on the target charging pile to obtain reporting frequency of charging process data by the target charging pile includes:
Inquiring whether the charging process data of the target charging pile is updated or not at intervals of a third timing length based on the charging order of the target charging pile;
determining the query times when the charging process data of the target charging pile is updated in two adjacent times;
And determining the reporting frequency of the target charging pile to the charging process data according to the query times.
6. A charging pile charging power inquiry device, characterized by comprising:
The instruction acquisition module is used for acquiring a query instruction of the charging power of the charging pile and creating a timing task corresponding to the query instruction;
the order inquiry module is used for acquiring order information of the charging orders corresponding to the inquiry instructions based on the timing tasks and determining effective orders in the charging orders according to the order information;
The power inquiry module is used for inquiring the charging power corresponding to the effective order
The order inquiry module is further configured to:
Generating a delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue; the delay time of the delay inquiry message is a third timing time;
When the message queue has the message to be consumed, the waiting time length of which reaches the third timing time length, starting a query thread corresponding to the message to be consumed;
Acquiring order information of a charging order corresponding to the query instruction by utilizing the query thread, and determining an order state of the charging order according to the order information; the order state comprises an inactive state, a timeout off state, a charging state and a charging completion state;
And determining an effective order in the charging order according to the order state, returning and executing the delay inquiry message corresponding to the timing task, and sending the delay inquiry message to a preset message queue until the order state of the effective order is a charging completion state.
7. 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 charging pile charging power query method of any one of claims 1 to 5 when the program is executed.
8. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the charging pile charging power query method of any one of claims 1 to 5.
CN202310695913.9A 2023-06-12 2023-06-12 Charging pile charging power query method, device, equipment and medium Active CN116821433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310695913.9A CN116821433B (en) 2023-06-12 2023-06-12 Charging pile charging power query method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310695913.9A CN116821433B (en) 2023-06-12 2023-06-12 Charging pile charging power query method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN116821433A CN116821433A (en) 2023-09-29
CN116821433B true CN116821433B (en) 2024-07-05

Family

ID=88111972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310695913.9A Active CN116821433B (en) 2023-06-12 2023-06-12 Charging pile charging power query method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116821433B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117745350B (en) * 2024-01-16 2024-07-05 广东星云开物科技股份有限公司 Charging preferential scheme pushing method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872186A (en) * 2019-01-23 2019-06-11 深圳智链物联科技有限公司 Full of automatic stop advance charges calculation method, device, terminal device and storage medium
CN115330396A (en) * 2022-08-24 2022-11-11 中国平安财产保险股份有限公司 Payment state acquisition method and device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112477674A (en) * 2020-11-16 2021-03-12 深圳市康士柏实业有限公司 Remote cluster charging control method, device and system for charging pile
CN115760318A (en) * 2022-12-21 2023-03-07 中国航空结算有限责任公司 Order task updating method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872186A (en) * 2019-01-23 2019-06-11 深圳智链物联科技有限公司 Full of automatic stop advance charges calculation method, device, terminal device and storage medium
CN115330396A (en) * 2022-08-24 2022-11-11 中国平安财产保险股份有限公司 Payment state acquisition method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN116821433A (en) 2023-09-29

Similar Documents

Publication Publication Date Title
CN108011935B (en) Program upgrading method of NB-IOT (network node B-IOT) equipment, server and NB-IOT equipment
WO2016134590A1 (en) Transaction processing method, processing node, central node and cluster
CN116821433B (en) Charging pile charging power query method, device, equipment and medium
CN101636000A (en) Treating method and treatment device of alarm storms
CN113590337B (en) Method and device for automatically adjusting cloud host configuration in cloud environment
CN110018996A (en) A kind of the snapshot rollback method and relevant apparatus of distributed memory system
CN109218054B (en) Terminal dynamic configuration, corresponding server implementation method, device and storage medium
CN113157411B (en) Celery-based reliable configurable task system and device
CN113012336A (en) Queuing reservation method of banking business and device, storage medium and equipment thereof
CN112256776A (en) Form repeated submission detection method and device, computer equipment and storage medium
CN107103707B (en) Information interaction method and device for self-service washing equipment
CN110019372B (en) Data monitoring method, device, server and storage medium
CN115310963A (en) Query form supplementing method and device, electronic equipment and storage medium
CN108769244B (en) Storage task information acquisition method and related device
CN109245941B (en) Service compensation method and device
CN103714059A (en) Data updating method and device
CN109032509A (en) A kind of data-erasure method and relevant apparatus of distributed memory system
CN114331446B (en) Method, device, equipment and medium for realizing out-of-chain service of block chain
CN110868395B (en) Large concurrent service processing method, device and medium based on transceiving single frame
CN111046061B (en) Data query method, device, system, equipment and storage medium
CN115168767A (en) Voucher uploading method, device, system, equipment and storage medium
CN109995855B (en) Data acquisition method, device and terminal
CN107957942B (en) SQL script fault repairing method and terminal thereof
CN107728769B (en) Background application management method and device and computer readable storage medium
CN107633182B (en) Non-invasive map tile anti-theft device

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
GR01 Patent grant
GR01 Patent grant