Time-of-use electricity price updating method and device and electronic equipment

By determining the request type in the charging station's update request and updating the time-sharing electricity price using distributed cache and target message queues, the problem of low processing efficiency of time-sharing electricity price update requests is solved, and the real-time and accuracy of the time-sharing electricity price is improved.

CN119599714APending Publication Date: 2025-03-11AVATR CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411602215.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

How to efficiently handle time-sharing electricity price update requests and improve the real-time and accuracy of time-sharing electricity price, especially when the number of charging stations increases.

Method used

By responding to the time-sharing electricity price update request of the charging gun in the charging station, the type of update request is determined and the number of the charging station is added to the operator's target message queue. Check whether the charging station number is stored in the distributed cache, and if not, the time-sharing electricity price is updated in the target message queue and stored to the charging operation platform.

Benefits of technology

The preliminary classification and orderly processing of update requests are realized, which reduces the repeated update of time-sharing electricity prices in charging stations, and improves the real-time and accuracy of time-sharing electricity prices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599714A_ABST
    Figure CN119599714A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a time-of-use electricity price updating method and device and electronic equipment, and the method comprises the steps: responding to a time-of-use electricity price updating request of a charging gun in a charging station, and determining the type of the updating request; the updating request comprises the number of the charging station; based on the type of the updating request, adding the number of the charging station into a target message queue of an operator to which the charging station belongs; in the process of updating the time-of-use electricity price of the charging gun under the serial number of the charging station in the target message queue, determining whether the serial number of the charging station is stored in a distributed cache; and under the condition that the serial number of the charging station is not stored in the distributed cache, updating the time-of-use electricity price of the charging gun under the serial number of the charging station in the target message queue, and storing the updated time-of-use electricity price to a charging operation platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to, but is not limited to, the field of vehicle control technology, and in particular to a method for updating a time-of-use electricity price, an updating device, and an electronic device. Background Art

[0002] With the popularity of electric vehicles, the number and scale of charging stations are constantly expanding. In order to optimize the allocation of power resources and reduce users' charging costs, many charging stations have begun to adopt a time-of-use electricity price strategy, that is, setting different electricity prices in different time periods. As the number of charging stations increases, the number of time-of-use electricity price update requests will also increase accordingly. How to efficiently process time-of-use electricity price update requests and improve the real-time and accuracy of time-of-use electricity prices is a problem that needs to be solved. Summary of the invention

[0003] In view of this, embodiments of the present application provide a method, an updating device and an electronic device for updating a time-of-use electricity price.

[0004] The technical solution of this application is implemented as follows:

[0005] In the first aspect, an embodiment of the present application provides a method for updating time-of-use electricity prices, the method comprising: in response to a request for updating the time-of-use electricity price of a charging gun in a charging station, determining the type of the update request; the update request includes the number of the charging station; based on the type of the update request, adding the number of the charging station to the target message queue of the operator to which the charging station belongs; in the process of updating the time-of-use electricity price of the charging gun under the number of the charging station in the target message queue, determining whether the number of the charging station is stored in the distributed cache; if the number of the charging station is not stored in the distributed cache, updating the time-of-use electricity price of the charging gun under the number of the charging station in the target message queue, and storing the updated time-of-use electricity price to the charging operation platform.

[0006] In a second aspect, an embodiment of the present application provides a device for updating a time-of-use electricity price, the device comprising:

[0007] A first determination module, configured to determine the type of an update request for a time-of-use electricity price of a charging gun in a charging station in response to the update request; the update request includes a serial number of the charging station;

[0008] A adding module, configured to add the serial number of the charging station to a target message queue of the operator to which the charging station belongs based on the type of the update request;

[0009] A second determination module is used to determine whether the number of the charging station is stored in the distributed cache during the process of updating the time-sharing electricity price of the charging gun under the number of the charging station in the target message queue;

[0010] The first update module is used to update the time-of-use electricity price of the charging gun under the number of the charging station in the target message queue when the number of the charging station is not stored in the distributed cache, and store the updated time-of-use electricity price in the charging operation platform.

[0011] In a third aspect, an embodiment of the present application further provides an electronic device, wherein the memory stores a computer program that can be run on a processor, and the processor implements the steps in the above method when executing the program.

[0012] In the embodiments of the present application, on the one hand, by determining the type of update request and then adding the number of the charging station in the update request to the target message queue of the corresponding operator, preliminary classification and orderly processing of the update request are achieved; on the other hand, by checking the distributed cache to determine whether the time-of-use electricity price of the charging gun under the number of the charging station has been updated, the repeated update of the time-of-use electricity price of the charging gun under the number of the same charging station can be reduced; on the other hand, when the number of the charging station is not found in the distributed cache, the time-of-use electricity price of the charging gun under the number of the charging station is updated in the target message queue, and the updated time-of-use electricity price is stored in the charging operation platform, which can improve the real-time and accuracy of the time-of-use electricity price in the charging operation platform.

[0013] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0015] Figure 1 A schematic diagram of the implementation flow of a method for updating a time-of-use electricity price provided in an embodiment of the present application;

[0016] Figure 2 A schematic diagram of a method for regularly updating the time-of-use electricity price of a public charging station in a current-limited environment provided in an embodiment of the present application;

[0017] Figure 3 A schematic diagram of the implementation flow of a method for updating the time-of-use electricity price of a charging gun by using a message queue provided in an embodiment of the present application;

[0018] Figure 4 A schematic diagram of the composition structure of a time-of-use electricity price updating device provided in an embodiment of the present application;

[0019] Figure 5A hardware entity schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0021] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0022] The terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second / third" can be interchanged with a specific order or sequence where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application.

[0024] Users refer to car owners who own new energy electric vehicles owned by new energy vehicle companies.

[0025] Operators refer to power companies and new energy companies that build and operate public charging stations, connect charging stations, charging piles, and charging guns to the Internet, and provide charging services to car companies and electric vehicles.

[0026] Interoperability refers to the standard protocol for the exchange of information on electric vehicle charging and swapping services issued by the Electricity Council.

[0027] The charging operation platform refers to a system that new energy vehicle companies use to obtain the charging station, charging pile, and charging gun data of various operators through interconnection and manage these data as well as charging order data.

[0028] The time-of-use electricity price is based on the maximum unit price of electricity plus service fee for each charging gun under the charging station in each time period. Usually users will compare the prices of the current time period at the charging station to choose a charging station that suits them for charging and energy replenishment.

[0029] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0030] The present application embodiment provides a method for updating a time-of-use electricity price, such as Figure 1 As shown, the method for updating the time-of-use electricity price may include steps S101 to S104, wherein:

[0031] Step S101, in response to a request for updating a time-of-use electricity price of a charging gun in a charging station, determining a type of the update request;

[0032] Here, the update request includes the number of the charging station, which is used to identify the charging station for which the electricity price needs to be updated. The update request can be triggered when the charging operation platform regularly obtains the time-sharing electricity prices of all charging guns under each charging station from each operator, or when the user views the details of the charging station through an application (APPlication, APP) or scans the QR code on the charging gun.

[0033] Here, the number of the charging station can be a unique identification number assigned to each charging station by the charging station operator or management department. Through the number of the charging station, the operator or management department can easily manage and track the relevant information of the charging station, such as location information, equipment status information, operation data, etc. For users, the number of the charging station can be used as an important basis for finding and identifying the charging station. For example, users can find and navigate to a designated charging station on a charging app or map through the number of the charging station.

[0034] In some embodiments, in response to a request to update the time-of-use electricity price of a charging gun in a charging station, if the update request is triggered when a user views the charging station details through an application or scans a QR code on the charging gun, the type of the request is determined to be a first type; if the update request is triggered when the charging operation platform periodically obtains the time-of-use electricity prices of all charging guns under each charging station from each operator, the type of the request is determined to be a second type.

[0035] It should be noted that the first type of request is an instant update request, which is usually triggered by the user immediately. For example, when the user views the details of the charging station through the application or scans the QR code on the charging gun, it triggers a request to obtain the time-of-use electricity price of the charging gun. The first type of request requires a quick response to meet the immediate needs of users, provide accurate and timely time-of-use electricity price information, and enhance the user experience. The second type of request is a batch update request, which is usually processed in batches. For example, the charging operation platform regularly obtains the time-of-use electricity prices of all charging guns under each charging station from each operator. The second type of request is made at predetermined time intervals or plans.

[0036] Step S102: adding the serial number of the charging station to a target message queue of the operator to which the charging station belongs based on the type of the update request;

[0037] Here, the target message queue of the operator may be a message queue established for a specific operator, and is used to receive and process update requests related to the operator.

[0038] In some embodiments, for batch update requests, the numbers of the charging stations in the batch update requests are added to a target message queue (e.g., message queue A) that is specifically used to process batch update requests. This queue will be processed at a predetermined time interval or plan to ensure that the time-of-use electricity price information on the charging operation platform is updated in a timely manner.

[0039] In some embodiments, for an instant update request, the number of the charging station in the instant update request is added to a high priority target message queue (e.g., message queue B) specifically used to process such requests. This queue will prioritize instant update requests to ensure that user needs can be quickly responded to.

[0040] Step S103, in the process of updating the time-sharing electricity price of the charging gun under the number of the charging station in the target message queue, determining whether the number of the charging station is stored in the distributed cache;

[0041] Here, distributed cache can be a system for storing and quickly accessing data, usually used to increase data access speed and reduce database load.

[0042] In some implementations, during the process of updating the time-of-use electricity price of the charging gun in the charging station, it is checked whether the number of the charging station has been stored in the distributed cache to determine whether the time-of-use electricity price of the charging gun in the charging station has been updated.

[0043] In some embodiments, if the number of the charging station exists in the distributed cache, that is, the time-sharing electricity price of the charging gun in the charging station has been updated. At this time, the time-sharing electricity price of the charging gun under the number of the charging station will not be updated again. If the number of the charging station does not exist in the distributed cache, that is, the time-sharing electricity price of the charging gun in the charging station has not been updated. At this time, the time-sharing electricity price of the charging gun under the number of the charging station will be updated.

[0044] Step S104, when the number of the charging station is not stored in the distributed cache, the time-of-use electricity price of the charging gun under the number of the charging station is updated in the target message queue, and the updated time-of-use electricity price is stored in the charging operation platform.

[0045] In some embodiments, when the number of a specific charging station is not found in the distributed cache, the time-of-use electricity price of the charging gun under the number of the charging station will be updated in the target message queue; after the update is completed, the new time-of-use electricity price will be stored in the charging operation platform. Even if the system is restarted or fails, the latest time-of-use electricity price information will not be lost and can be used for subsequent operations.

[0046] In the embodiments of the present application, on the one hand, by determining the type of update request and then adding the number of the charging station in the update request to the target message queue of the corresponding operator, preliminary classification and orderly processing of the update request are achieved; on the other hand, by checking the distributed cache to determine whether the time-of-use electricity price of the charging gun under the number of the charging station has been updated, the repeated update of the time-of-use electricity price of the charging gun under the number of the same charging station can be reduced; on the other hand, when the number of the charging station is not found in the distributed cache, the time-of-use electricity price of the charging gun under the number of the charging station is updated in the target message queue, and the updated time-of-use electricity price is stored in the charging operation platform, which can improve the real-time and accuracy of the time-of-use electricity price in the charging operation platform.

[0047] In some embodiments, the implementation of "updating the time-of-use electricity price of the charging gun under the number of the charging station in the target message queue" in step S104 may include the following steps S111 to S114:

[0048] Step S111, obtaining the initial hash value of the time-sharing electricity price of each charging gun under the number of the charging station from the charging operation platform;

[0049] Here, the hash value is a data summary, which is usually used to quickly verify the integrity of the data. The initial hash value can represent the status of the time-of-use electricity price currently stored on the charging operation platform for each charging gun.

[0050] In some implementations, if there are 5 charging guns under the charging station number, then the initial hash value of the time-of-use electricity price of the 5 charging guns under the charging station number is obtained from the charging operation platform to provide a basis for whether to update the time-of-use electricity price later.

[0051] Step S112: when the initial hash values ​​of the charging guns are not equal, obtaining the time-of-use electricity prices of the charging guns from the operator;

[0052] In some embodiments, since the operator has the latest time-of-use electricity price, the initial hash values ​​of the five charging guns are compared to determine whether it is necessary to obtain the time-of-use electricity prices of the five charging guns from the operator. If the initial hash values ​​of the five charging guns are all equal, that is, the time-of-use electricity prices of the charging guns have not changed, there is no need to obtain the time-of-use electricity prices of the five charging guns from the operator. If two or more of the initial hash values ​​of the five charging guns are not equal, that is, the time-of-use electricity prices of the charging guns have changed, there is a problem of inconsistent time-of-use electricity prices, and the time-of-use electricity prices of the five charging guns need to be obtained from the operator.

[0053] Step S113, determining the target hash value of the time-sharing electricity price of each charging gun;

[0054] In some implementations, after obtaining the time-of-use electricity prices of the five charging guns from the operator, the target hash values ​​of the time-of-use electricity prices of the five charging guns are calculated respectively.

[0055] Step S114, when the target hash value is not equal to the initial hash value, in the target message queue, the time-of-use electricity price corresponding to the initial hash value is updated using the time-of-use electricity price corresponding to the target hash value.

[0056] In some embodiments, the target hash value of each charging gun is compared with the initial hash value to determine whether to perform the time-sharing electricity price update operation. If the target hash value is not equal to the initial hash value, it means that the time-sharing electricity price of the charging gun has indeed changed. In the target message queue, the time-sharing electricity price corresponding to the target hash value is used to update the time-sharing electricity price corresponding to the initial hash value.

[0057] In the embodiment of the present application, by comparing the initial hash value and the target hash value, it is possible to accurately determine whether the time-of-use electricity price of the charging gun has changed without checking the time-of-use electricity price one by one, thereby improving the efficiency of updating the time-of-use electricity price.

[0058] In some embodiments, the implementation of step S112 "obtaining the time-of-use electricity price of each charging gun from the operator when the initial hash values ​​of each charging gun are not equal" may include the following steps S121 to S123:

[0059] Step S121, for each charging gun under the same charging station number, the numbers of the charging guns corresponding to the same initial hash values ​​are divided into a group;

[0060] In some implementations, all charging guns under the same charging station number are grouped. The basis for grouping is whether the initial hash values ​​of these charging guns are equal. If the initial hash values ​​of two or more charging guns are equal, they will be divided into the same group, which means that the current time-of-use electricity prices of these charging guns are the same.

[0061] Step S122, using the number of the first charging gun in each group as a query parameter, sequentially sending a query request for the time-of-use electricity price of the first charging gun to the operator; the query request is used to obtain the time-of-use electricity price of the first charging gun;

[0062] In some embodiments, for each group of charging guns, a representative is selected as a query parameter. Here, the number of the first charging gun in each group is used as a query parameter to send query requests to the operator in sequence. Each query request contains the number of a charging gun (i.e., the number of the first charging gun in each group) for requesting the time-of-use electricity price of the charging gun.

[0063] It should be noted that the query parameter can be selected arbitrarily, because the time-of-use electricity price of the charging guns in the same group is the same, so the time-of-use electricity price obtained by using any charging gun in the same group as the query parameter can represent the time-of-use electricity price of the entire group.

[0064] Step S123, receiving in sequence the time-of-use electricity price of the first charging gun in each group sent by the operator.

[0065] In some embodiments, the time-of-use electricity price of the first charging gun in each group returned by the operator is received in sequence. Since the time-of-use electricity prices of charging guns in the same group are the same, the returned electricity price data are also applicable to other charging guns in the group.

[0066] In the embodiment of the present application, by dividing the charging guns with the same initial hash value into a group and sending query requests to the operator in groups, the number of queries sent to the operator can be significantly reduced. This is because the time-sharing electricity prices of the charging guns in the same group are the same, so only the electricity price of one charging gun needs to be queried to represent the electricity price status of the entire group.

[0067] In some embodiments, the implementation of "updating the time-sharing electricity price corresponding to the initial hash value in the target message queue using the time-sharing electricity price corresponding to the target hash value" in step S114 may include the following steps S131 to S133:

[0068] Step S131: for each group of charging guns under the same charging station number, compare the target hash value of the time-sharing electricity price of the first charging gun with the initial hash values ​​of the time-sharing electricity prices of other charging guns except the first charging gun;

[0069] In some embodiments, for each group of charging guns under the same charging station number, the first charging gun is selected as a representative, and the target hash value of the time-of-use electricity price of the first charging gun is compared with the initial hash values ​​of the time-of-use electricity prices of other charging guns in the same group.

[0070] Step S132, determining the charging guns whose initial hash values ​​of the time-sharing electricity prices of the other charging guns are not equal to the target hash value as candidate charging guns;

[0071] In some embodiments, during the comparison process, if it is found that the initial hash value of the time-of-use electricity price of a charging gun is not equal to the target hash value of the first charging gun, then this charging gun is determined as a candidate charging gun, which means that the time-of-use electricity price of this charging gun needs to be updated.

[0072] Step S133: In the target message queue, the time-of-use electricity price of the candidate charging gun is updated using the time-of-use electricity price corresponding to the target hash value.

[0073] In some implementations, in the target message queue, the time-of-use electricity price corresponding to the target hash value of the first charging gun is used to update the time-of-use electricity price of the candidate charging gun.

[0074] In an embodiment of the present application, by comparing the target hash value of the time-of-use electricity price of the first charging gun with the initial hash values ​​of the time-of-use electricity prices of other charging guns in the same group, it is possible to accurately identify which charging guns' time-of-use electricity prices need to be updated, thereby improving the accuracy and efficiency of the update process.

[0075] In some embodiments, after "updating the time-of-use electricity price of the candidate charging gun using the time-of-use electricity price corresponding to the target hash value" in step S133, the update of the time-of-use electricity price may also include the following steps S141 to S144:

[0076] Step S141, for each group of charging guns under the same charging station number, using the target hash value to update the initial hash value of the time-sharing electricity price of the candidate charging gun;

[0077] In some implementations, for each group of charging guns under the same charging station number, the time-of-use electricity price corresponding to the target hash value of each group of charging guns is used to update the time-of-use electricity price of the group of candidate charging guns.

[0078] Step S142, converting the format of the time-of-use electricity price corresponding to the target hash value to obtain a converted hash value;

[0079] In some implementations, the time-of-use electricity price corresponding to the target hash value is converted into a format that may match the format requirements of the charging operation platform. After the format conversion, a new hash value is obtained.

[0080] Step S143, storing the converted hash value in the charging operation platform;

[0081] In some implementations, the converted hash value is stored in the charging operation platform for subsequent use or query.

[0082] Step S144: storing the number of the charging station corresponding to the target hash value into the distributed cache to complete the update of the time-of-use electricity price of the charging gun under the number of the charging station.

[0083] In some embodiments, storing the number of the charging station corresponding to the target hash value in the distributed cache means that the update of the time-of-use electricity prices of all charging guns under the number of the charging station has been completed, and the updated status of the time-of-use electricity prices can be quickly accessed by other system components or services in the distributed cache.

[0084] In the embodiment of the present application, on the one hand, by using the target hash value to update the initial hash value of the time-sharing electricity price of the candidate charging gun, it can ensure that the time-sharing electricity price of each charging gun is consistent with the latest time-sharing electricity price; on the other hand, storing the number of the charging station corresponding to the target hash value in the distributed cache can significantly improve the subsequent update status of the time-sharing electricity price of the charging gun under the charging station number.

[0085] In some embodiments, the type includes a first type and a second type, and the implementation of step S101 "determining the type of the update request in response to the update request of the time-of-use electricity price of the charging gun in the charging station" may include the following steps S151 to S152:

[0086] Step S151, in response to a request for updating the time-of-use electricity price of a charging gun in a charging station, determining the type of the update request triggered by the user's target operation as the first type;

[0087] Here, the first type of request may be triggered by a target operation of the user.

[0088] In some embodiments, a request for updating the time-of-use electricity price of a charging gun initiated by a user by clicking on the management interface of the charging station is classified as type 1. The first type of request may be based on specific needs of the user, such as adjusting the charging plan to enjoy a more favorable time-of-use electricity price.

[0089] Step S152: determining the type of the update request sent by the charging operation platform to the operator at the first preset time as the second type.

[0090] Here, the second type of request is different from the first type of request, and the second type of request may be automatically triggered by the charging operation platform. The first preset time may be a suitable time set in advance, for example, 8:00, 9:00, 10:00, etc. every night.

[0091] In some implementations, the update request sent by the charging operation platform to the operator at 8:00 p.m. every day is classified as the second type.

[0092] In an embodiment of the present application, by dividing update requests into a first type (triggered by user target operations) and a second type (automatically triggered by a charging operation platform), different processing strategies can be adopted for different types of requests to improve the efficiency of subsequent time-of-use electricity price updates.

[0093] In some embodiments, the target message queue includes a first message queue and a second message queue, and the implementation of step S102 "adding the number of the charging station to the target message queue of the operator to which the charging station belongs based on the type of the update request" may include the following steps S161 to S163:

[0094] Step S161, determining the operator to which the charging station in the update request belongs as the target operator;

[0095] In some embodiments, when a time-of-use electricity price update request for a charging station is received, the operator to which the charging station belongs is determined. Since the number of each charging station may be associated with the operator to which it belongs, the operator to which the charging station belongs can be determined by the number of the charging station in the update request.

[0096] Step S162: when the type of the update request is the first type, adding the number of the charging station to the first message queue of the target operator;

[0097] In some implementations, since the target message queue of the target operator includes a first message queue and a second message queue, the message queue of the target operator to which the number of the charging station is to be added is selected according to the type of the update request.

[0098] In some implementations, if the type of the update request is the first type (triggered by a user target operation), the number of the charging station is added to the first message queue of the target operator. The first message queue may be specifically used to process update requests initiated by users.

[0099] Step S163: when the type of the update request is the second type, adding the serial number of the charging station to the second message queue of the target operator.

[0100] In some embodiments, if the type of the update request is the second type (automatically triggered by the charging operation platform), the number of the charging station is added to the second message queue of the target operator. The second message queue may be specifically used to process automatically triggered update requests.

[0101] In an embodiment of the present application, by allocating different types of update requests to different message queues, the message queues can process these requests in parallel, avoiding mutual blocking of requests in a single queue, and being able to respond to the charging station's electricity price update needs more quickly.

[0102] In some embodiments, the update of the time-of-use electricity price may further include the following steps S171 to S174:

[0103] Step S171: for a first message queue and a second message queue of the same operator, if the priority of the first message queue is higher than that of the second message queue, the time-of-use electricity price of the charging gun under the number of the charging station in the first message queue is updated, and the number of the charging station is locked in the distributed cache;

[0104] Here, the priority of the first message queue is higher than that of the second message queue, which means that when both message queues have numbers of charging stations to be processed, the time-of-use electricity price of the charging gun under the number of the charging station in the first message queue will be updated first.

[0105] In some implementations, when the electricity price of a charging station number in the first message queue needs to be updated, the charging station number is locked in the distributed cache to prevent other concurrent operations from updating the time-sharing electricity price of the charging gun under the charging station number.

[0106] Step S172: after the time-of-use electricity price of the charging gun under the number of the charging station in the first message queue is updated, deleting the lock for the number of the charging station in the distributed cache;

[0107] In some implementations, after the time-sharing electricity price of the charging gun under the charging station number in the first message queue is updated, the lock for the charging station number in the distributed cache is immediately deleted to release resources for other operations.

[0108] Step S173, during the process of updating the time-of-use electricity price of the charging gun under the number of the charging station in the second message queue, determining whether there is a lock on the number of the charging station in the distributed cache;

[0109] In some implementations, when the number of a charging station in the second message queue needs to update the electricity price, it is checked whether there is a lock on the number of the charging station in the distributed cache.

[0110] Step S174: when there is a lock on the number of the charging station in the distributed cache, the time-of-use electricity price of the charging gun under the number of the charging station is updated after the lock on the number of the charging station is deleted.

[0111] In some embodiments, if there is a lock on the charging station number in the distributed cache (i.e., the update operation in the first message queue has not been completed), the time-of-use electricity price of the charging gun under the charging station number will be updated after the lock on the charging station number is deleted (i.e., the update operation in the first message queue is completed).

[0112] In an embodiment of the present application, on the one hand, by locking the charging station number in the distributed cache, it can be ensured that only one message queue operation can update the time-sharing electricity price of the same charging station at the same time, thereby avoiding the problem of inconsistent time-sharing electricity prices caused by concurrent updates; on the other hand, the time-sharing electricity price of the charging gun under the charging station number is updated in the first message queue first, and the lock is released immediately after the time-sharing electricity price is updated, so that the time-sharing electricity price of the charging gun under the charging station number is updated in the second message queue, which helps to improve the update efficiency of the time-sharing electricity price.

[0113] For new energy electric vehicles, charging and replenishing energy is the most basic daily need, especially when traveling. Charging and extending the battery life through charging piles at public charging stations is the most common means for new energy electric vehicles. A large number of public charging stations have been deployed across the country, which are operated by a number of large power and new energy companies, providing charging services to new energy electric vehicles and new energy vehicle companies through interconnection platforms. As for new energy vehicle companies, they usually integrate the public charging stations, charging piles, charging gun data of various operators and the electricity price data of charging guns in various time periods through interconnection, so that their electric vehicles can display the information of each charging station through the car company's own APP and complete charging.

[0114] At present, the way to obtain the charging station, charging pile, and charging gun data of each charging operator is to synchronize the data by calling the interface of each operator to obtain the charging station information in pages late at night every day. It takes about 1-2 hours to synchronize each operator. However, due to the large number of charging guns, and the fact that all operators currently have only a single interface for querying the time-sharing electricity price of charging guns, it is inevitable that the operator will call this interface in large quantities and frequently. In order to prevent the new energy vehicle companies from requesting data concurrently and causing their own systems to crash, each operator has limited the call to this interface. In this limited current environment, it is an urgent problem to regularly obtain the time-sharing electricity price of each charging gun at the charging station and timely update the electricity price information displayed on the charging station on the APP.

[0115] The present application provides a method for regularly updating the time-of-use electricity prices of public charging stations in a current-limited environment. By utilizing software technologies such as distributed caching and message queues, it is intended to obtain a large amount of time-of-use electricity price data of charging guns in a current-limited environment, and update it to the charging operation platform in a timely manner, so as to ensure that the time-of-use electricity prices of various charging stations viewed by users on the APP are basically accurate.

[0116] In the embodiment of the present application, two different cold and hot isolated message queues are established for each operator, and all charging station IDs for which time-of-use electricity prices need to be obtained are received through a unified message queue (for example, RocketMQ), and by judging this request (two requests: obtaining the time-of-use electricity prices of all charging guns under each charging station at regular intervals every night (cold data), and users viewing the details of the charging station through the APP / scanning the QR code on the charging gun to trigger the acquisition of the time-of-use electricity prices of the charging gun (i.e. hot data)), the request data (i.e. the number (Identity, ID) of the above-mentioned charging station) is placed in different message queues. Through the characteristics of distributed locks (for example, ZooKeeper locks), it is ensured that each message queue has one and only one software system device to obtain data one by one for processing, avoiding multi-node concurrency, and giving priority to hot data through the characteristics of Redis distributed locks. When processing the data of a certain charging station, first determine whether the charging station ID exists in the distributed cache Redis. If it exists, it means that the time-of-use electricity prices of all charging guns under the charging station have been updated within 12 hours, and this update will be abandoned. Get all charging gun IDs and time-of-use electricity price hash values ​​under the charging station ID. For charging gun IDs with the same hash value, assume that their time-of-use electricity prices are the same. Select only one to call the operator's interface to obtain the time-of-use electricity price, which can greatly reduce the number of requests. Calculate the HASH value of the time-of-use electricity price obtained by requesting the operator's interface. If it is consistent with the original HASH value, no processing is required. Otherwise, update the time-of-use electricity price and the new HASH value.

[0117] The embodiment of the present application provides a method for regularly updating the time-of-use electricity price of a public charging station in a current-limiting environment, such as Figure 2 As shown, the method for updating the time-of-use electricity price of a public charging station includes the following steps S201 to step 204, wherein:

[0118] Step S201, scanning the code / querying the details of the charging station triggers a request to update the time-of-use electricity price;

[0119] Step S202, the charging operation platform regularly triggers a request to update the time-of-use electricity price;

[0120] Step S203, putting the number of the charging station in the update request into the unified message queue;

[0121] Step S204, according to the type of update request, the number of the charging station is placed in the message queue of the corresponding operator (for example, the first message queue of operator A, the second message queue of operator A, ..., the first message queue of operator X, the second message queue of operator X, etc.).

[0122] In the embodiment of the present application, every morning and night, the charging operation platform will regularly obtain the data of charging stations, piles, and guns from each operator, and update them to the charging operation platform. Each operator takes about 1-2 hours. After the synchronization of the station, pile, and gun data is completed, the charging operation platform will query the charging station ID of all normal charging stations of this operator, and push the charging station ID, operator ID, and cold data identifier to the unified message queue of the message queue. In addition, when the user views the details of the charging station and scans the QR code of the charging gun, it will also trigger a request for asynchronous update of the time-sharing electricity price of the charging station, and push the charging station ID, operator ID, and hot data identifier to the unified message queue of the message queue. The charging operation platform monitors the message queue requesting to update the time-sharing electricity price of the charging station, and through the obtained operator ID, it determines to push the charging station ID data into the corresponding operator message queue channel. And each operator has two message queue channels, cold and hot, respectively. Through the cold and hot data identifiers, it is determined which message queue channel of which operator to push data to, and the data processing between each operator does not affect each other. Through the characteristics of ZooKeeper lock, each message queue has only one thread for consumption processing, avoiding the current limiting of a large number of concurrent requests to the operator system. The processing of each message queue is roughly the same, except that the address of calling the operator interface is different. Before hot data is processed, it will be locked through the Redis distributed lock. Before cold data is processed, it will first check whether there is a lock to give priority to hot data.

[0123] The embodiment of the present application provides a method for updating the time-of-use electricity price of a charging gun by using a message queue, such as Figure 3 As shown, the method for updating the time-of-use electricity price of the charging gun by using the message queue includes the following steps S301 to S312, wherein:

[0124] Step S301, consuming a message from a message queue;

[0125] Here, the message queue consuming a message may refer to updating the time-of-use electricity price of the charging gun under the number of the charging station in the message queue.

[0126] Step S302: Prioritize updating the time-of-use electricity price (i.e., the above-mentioned hot data) of the charging gun under the charging station ID in the first message queue of each operator through Redis lock control;

[0127] Here, if the current charging station ID is for hot data processing, a lock is set to Redis. If the current charging station ID is for cold data processing, check whether the lock exists. If it exists, it means that hot data is being processed and it is necessary to wait 60 seconds before processing cold data to reduce the number of simultaneous requests to the same operator. After the hot data is processed, the lock is deleted from Redis so that the cold data can continue to be processed.

[0128] Step S303, determining whether the charging station ID exists in the Redis cache;

[0129] Here, if yes, that is, the charging station ID exists in the Redis cache, the process goes to step S304; if no, that is, the charging station ID does not exist in the Redis cache, the process goes to step S305.

[0130] Step S304: the time-of-use electricity price of the charging gun under the charging station ID has been updated within 12 hours, and the next message is consumed;

[0131] Step S305, query the initial HASH value of the time-sharing electricity price of all charging guns under the charging station ID from the charging operation platform;

[0132] Step S306, grouping the time-of-use electricity prices with the same HASH value into one group;

[0133] Step S307, using the first charging gun ID of each group as a request parameter, requesting the operator system to query the time-of-use electricity price interface, and obtaining a new time-of-use electricity price;

[0134] Step S308, respectively calculating the target HASH value of the new time-of-use electricity price in each group;

[0135] Step S309, comparing the target HASH value and the initial HASH value in each group in turn to see if they are the same;

[0136] Here, if they are the same, no processing is performed; if they are not the same, go to step S310.

[0137] Step S310, using the time-of-use electricity price corresponding to the target HASH value in each group to update the time-of-use electricity price of the charging gun in the corresponding group;

[0138] Step S311, converting and processing the time-of-use electricity price corresponding to each group of target HASH values ​​and saving it to the charging operation platform;

[0139] Step S312, save the charging station ID as a key in the Redis cache, and set the expiration time to 12 hours.

[0140] Here, the charging station ID is saved as the Key in the Redis cache, and the expiration time is set to 12 hours, indicating that the time-of-use electricity price of the charging gun under the charging station number has been updated and no further processing is required within 12 hours, and then step S304 is entered.

[0141] In the embodiment of the present application, by performing HASH calculation on the time-sharing electricity price of the charging guns at the same station, the same HASH value is considered to be the same time-sharing electricity price, which greatly reduces the number of repeated data requests from the guns with the same electricity price, and solves the problem of arbitrarily updating all guns at the charging station to the same time-sharing electricity price. By putting the charging station IDs in different requests into different message queues, data requests from different operators do not interfere with each other, and through distributed locks and other technical means, hot data priority requests are realized and the request frequency is controlled to avoid current limiting;

[0142] Based on the foregoing embodiments, an embodiment of the present application provides a time-of-use electricity price updating device, which includes the modules included, the units included in the modules, and the sub-units included in the units, which can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0143] The embodiment of the present application provides a device for updating a time-of-use electricity price, such as Figure 4 As shown, the time-of-use electricity price updating device 400 includes: a first determination module 410, a joining module 420, a second determination module 430 and a first updating module 440, wherein:

[0144] A first determination module 410 is used to determine the type of the update request in response to the update request of the time-of-use electricity price of the charging gun in the charging station; the update request includes the serial number of the charging station;

[0145] A adding module 420, configured to add the serial number of the charging station to a target message queue of the operator to which the charging station belongs based on the type of the update request;

[0146] A second determination module 430 is used to determine whether the number of the charging station is stored in the distributed cache during the process of updating the time-sharing electricity price of the charging gun under the number of the charging station in the target message queue;

[0147] The first update module 440 is used to update the time-of-use electricity price of the charging gun under the number of the charging station in the target message queue when the number of the charging station is not stored in the distributed cache, and store the updated time-of-use electricity price in the charging operation platform.

[0148] In some embodiments, the first update module 440 includes: a first acquisition unit, used to obtain the initial hash value of the time-sharing electricity price of each charging gun under the number of the charging station from the charging operation platform; a second acquisition unit, used to obtain the time-sharing electricity price of each charging gun from the operator when the initial hash values ​​of the charging guns are not equal; a determination unit, used to determine the target hash value of the time-sharing electricity price of each charging gun; an update unit, used to update the time-sharing electricity price corresponding to the initial hash value in the target message queue using the time-sharing electricity price corresponding to the target hash value when the target hash value is not equal to the initial hash value.

[0149] In some embodiments, the second acquisition unit includes: a division subunit, used to divide the numbers of the charging guns corresponding to the same initial hash value into a group for each charging gun under the same charging station number; a sending subunit, used to use the number of the first charging gun in each group as a query parameter, and send query requests for the time-of-use electricity price of the first charging gun to the operator in sequence; the query request is used to obtain the time-of-use electricity price of the first charging gun; a receiving subunit, used to receive the time-of-use electricity price of the first charging gun in each group sent by the operator in sequence.

[0150] In some embodiments, the update unit includes: a comparison subunit, used to compare the target hash value of the time-sharing electricity price of the first charging gun with the initial hash value of the time-sharing electricity price of other charging guns except the first charging gun for each group of charging guns under the same charging station number; a determination subunit, used to determine the charging guns whose initial hash values ​​of the time-sharing electricity prices of the other charging guns are not equal to the target hash value as candidate charging guns; an update subunit, used to update the time-sharing electricity price of the candidate charging gun in the target message queue using the time-sharing electricity price corresponding to the target hash value.

[0151] In some embodiments, the time-of-use electricity price updating device 400 also includes: a second update module, used to update the initial hash value of the time-of-use electricity price of the candidate charging gun for each group of charging guns under the same charging station number using the target hash value; a conversion module, used to convert the format of the time-of-use electricity price corresponding to the target hash value, and obtain the corresponding converted hash value; a first storage module, used to store the converted hash value to the charging operation platform; a second storage module, used to store the charging station number corresponding to the target hash value to the distributed cache, so as to complete the update of the time-of-use electricity price of the charging gun under the charging station number.

[0152] In some embodiments, the type includes a first type and a second type, and the first determination module includes: a first determination unit, used to respond to an update request for the time-of-use electricity price of the charging gun in the charging station, and determine the type of the update request triggered by the user's target operation as the first type; a second determination unit, used to determine the type of the update request sent by the charging operation platform to the operator at a first preset time as the second type.

[0153] In some embodiments, the target message queue includes a first message queue and a second message queue, and the joining module 420 includes: a third determination unit, used to determine the operator to which the charging station in the update request belongs as the target operator; a first joining unit, used to add the number of the charging station to the first message queue of the target operator when the type of the update request is the first type; and a second joining unit, used to add the number of the charging station to the second message queue of the target operator when the type of the update request is the second type.

[0154] In some embodiments, the time-of-use electricity price updating device 400 also includes: a third update module, which is used to update the time-of-use electricity price of the charging gun under the number of the charging station in the first message queue for the first message queue and the second message queue of the same operator, and lock the number of the charging station in the distributed cache when the priority of the first message queue is higher than that of the second message queue; a deletion module, which is used to delete the lock of the number of the charging station in the distributed cache after the time-of-use electricity price of the charging gun under the number of the charging station in the first message queue is updated; a third determination module, which is used to determine whether there is a lock on the number of the charging station in the distributed cache during the process of updating the time-of-use electricity price of the charging gun under the number of the charging station in the second message queue; a fourth update module, which is used to update the time-of-use electricity price of the charging gun under the number of the charging station in the distributed cache after the lock on the number of the charging station is deleted when there is a lock on the number of the charging station in the distributed cache.

[0155] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided in the embodiment of the present application can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0156] It should be noted that in the embodiment of the present application, if the above-mentioned method for updating the time-of-use electricity price is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The software product is stored in a storage medium, including a number of instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.

[0157] An embodiment of the present application also provides an electronic device, including a memory and a processor of a server or a memory and a processor of a user terminal, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0158] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0159] An embodiment of the present application also provides a computer program, including a computer-readable code. When the computer-readable code runs in a server or a user terminal, a processor in the server or the user terminal executes some or all of the steps for implementing the above method.

[0160] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0161] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0162] It should be noted that an embodiment of the present application provides an electronic device, such as Figure 5 As shown, the hardware entity of the electronic device 500 includes: a processor 501, a communication interface 502 and a memory 503, wherein: the processor 501 generally controls the overall operation of the electronic device 500. The communication interface 502 enables the electronic device to communicate with other terminals or servers through a network. The memory 503 is configured to store instructions and applications executable by the processor 501, and can also cache data to be processed or processed by the processor 501 and each module in the electronic device 500 (for example, image data, audio data, voice communication data and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission can be carried out between the processor 501, the communication interface 502 and the memory 503 through the bus 504.

[0163] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.

[0164] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0165] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0166] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0167] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0168] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0169] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0170] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A method for updating time-of-use electricity prices, characterized in that: The method comprises: In response to a request for updating a time-of-use electricity price of a charging gun in a charging station, determining a type of the update request; the update request includes a serial number of the charging station; Based on the type of the update request, adding the serial number of the charging station to a target message queue of the operator to which the charging station belongs; In the process of updating the time-of-use electricity price of the charging gun under the number of the charging station in the target message queue, determining whether the number of the charging station is stored in the distributed cache; When the number of the charging station is not stored in the distributed cache, the time-of-use electricity price of the charging gun under the number of the charging station is updated in the target message queue, and the updated time-of-use electricity price is stored in the charging operation platform.

2. The method according to claim 1, characterized in that The updating of the time-of-use electricity price of the charging gun under the number of the charging station in the target message queue includes: Obtaining an initial hash value of the time-of-use electricity price of each charging gun under the number of the charging station from the charging operation platform; When the initial hash values ​​of the charging guns are not equal, obtaining the time-of-use electricity prices of the charging guns from the operator; Determine a target hash value of a time-of-use electricity price for each charging gun; In the case that the target hash value is not equal to the initial hash value, in the target message queue, the time-of-use electricity price corresponding to the initial hash value is updated using the time-of-use electricity price corresponding to the target hash value.

3. The method according to claim 2, characterized in that When the initial hash values ​​of the charging guns are not equal, obtaining the time-of-use electricity prices of the charging guns from the operator includes: For each charging gun under the same charging station number, the numbers of the charging guns corresponding to the same initial hash values ​​are divided into a group; Using the number of the first charging gun in each group as a query parameter, sequentially sending a query request for the time-of-use electricity price of the first charging gun to the operator; the query request is used to obtain the time-of-use electricity price of the first charging gun; The time-of-use electricity price of the first charging gun in each group sent by the operator is received in sequence.

4. The method according to claim 3, characterized in that In the target message queue, the time-of-use electricity price corresponding to the initial hash value is updated using the time-of-use electricity price corresponding to the target hash value, including: For each group of charging guns under the same charging station number, compare the target hash value of the time-sharing electricity price of the first charging gun with the initial hash values ​​of the time-sharing electricity prices of other charging guns except the first charging gun; Determine a charging gun whose initial hash value of the time-of-use electricity price of the other charging gun is not equal to the target hash value as a candidate charging gun; In the target message queue, the time-of-use electricity price of the candidate charging gun is updated using the time-of-use electricity price corresponding to the target hash value.

5. The method according to claim 4, characterized in that After the time-of-use electricity price of the candidate charging gun is updated using the time-of-use electricity price corresponding to the target hash value, the method further includes: For each group of charging guns under the same charging station number, the initial hash value of the time-of-use electricity price of the candidate charging gun is updated using the target hash value; Convert the time-of-use electricity price corresponding to the target hash value into a format to obtain a converted hash value; Storing the converted hash value in the charging operation platform; The number of the charging station corresponding to the target hash value is stored in the distributed cache to complete the update of the time-sharing electricity price of the charging gun under the number of the charging station.

6. The method according to claim 1, characterized in that The types include a first type and a second type, The step of responding to a request for updating a time-of-use electricity price of a charging gun in a charging station and determining a type of the update request includes: In response to a request for updating the time-of-use electricity price of a charging gun in the charging station, determining the type of the update request triggered by the user's target operation as the first type; The type of the update request sent by the charging operation platform to the operator at a first preset time is determined as the second type.

7. The method according to claim 6, characterized in that The target message queue includes a first message queue and a second message queue, The adding the serial number of the charging station to a target message queue of the operator to which the charging station belongs based on the type of the update request includes: Determine the operator to which the charging station in the update request belongs as the target operator; When the type of the update request is the first type, adding the number of the charging station to the first message queue of the target operator; When the type of the update request is the second type, the serial number of the charging station is added to the second message queue of the target operator.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: For the first message queue and the second message queue of the same operator, when the priority of the first message queue is higher than that of the second message queue, the time-of-use electricity price of the charging gun under the number of the charging station in the first message queue is updated, and the number of the charging station is locked in the distributed cache; After the time-of-use electricity price of the charging gun under the number of the charging station in the first message queue is updated, deleting the lock for the number of the charging station in the distributed cache; During the process of updating the time-of-use electricity price of the charging gun under the number of the charging station in the second message queue, determining whether there is a lock on the number of the charging station in the distributed cache; In the case where a lock exists for the number of the charging station in the distributed cache, the time-of-use electricity price of the charging gun under the number of the charging station is updated after the lock for the number of the charging station is deleted.

9. A device for updating time-of-use electricity prices, characterized in that: The device comprises: A first determination module, configured to determine the type of an update request for a time-of-use electricity price of a charging gun in a charging station in response to the update request; the update request includes a serial number of the charging station; A adding module, configured to add the serial number of the charging station to a target message queue of the operator to which the charging station belongs based on the type of the update request; A second determination module is used to determine whether the number of the charging station is stored in the distributed cache during the process of updating the time-sharing electricity price of the charging gun under the number of the charging station in the target message queue; The first update module is used to update the time-of-use electricity price of the charging gun under the number of the charging station in the target message queue when the number of the charging station is not stored in the distributed cache, and store the updated time-of-use electricity price in the charging operation platform.

10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps in the method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Charging method and device, equipment and storage medium

    CN121361369A