CN114064722A - Intelligent customer service flow processing method and device, electronic equipment and storage medium - Google Patents
Intelligent customer service flow processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114064722A CN114064722A CN202111348436.6A CN202111348436A CN114064722A CN 114064722 A CN114064722 A CN 114064722A CN 202111348436 A CN202111348436 A CN 202111348436A CN 114064722 A CN114064722 A CN 114064722A
- Authority
- CN
- China
- Prior art keywords
- hash key
- flow
- target
- attribute value
- traffic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000005111 flow chemistry technique Methods 0.000 title claims abstract description 27
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012795 verification Methods 0.000 claims description 2
- GOLXNESZZPUPJE-UHFFFAOYSA-N spiromesifen Chemical compound CC1=CC(C)=CC(C)=C1C(C(O1)=O)=C(OC(=O)CC(C)(C)C)C11CCCC1 GOLXNESZZPUPJE-UHFFFAOYSA-N 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 8
- 230000004044 response Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 5
- 230000001360 synchronised effect Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 3
- 238000010009 beating Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present disclosure provides an intelligent customer service flow processing method, an intelligent customer service flow processing device, an electronic device and a storage medium, wherein the method comprises: the method comprises the steps of obtaining an access identifier and a service type to be executed from an access request, inquiring a corresponding first hash key in a cache according to the access identifier and the service type, updating an attribute value corresponding to the first hash key according to the flow to be deducted of the access request under the condition that the first hash key is inquired, and synchronizing the updated attribute value to a database for storage.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to an intelligent customer service flow processing method and apparatus, an electronic device, and a storage medium.
Background
On-line customer service robots are becoming an important means for merchants to reduce operation cost and improve consultation conversion. The consultation/short message flow commodity is a core commodity of the online customer service robot, and the flow deduction is a core element of the whole online robot response system commercialization. Whether the flow deduction is accurate or not is a key index for measuring whether the commercialization of the robot response system is reliable or not.
Disclosure of Invention
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, the intelligent customer service flow processing method, the intelligent customer service flow processing device, the electronic equipment and the storage medium are provided, and accuracy of flow deduction is improved.
An embodiment of a first aspect of the present disclosure provides an intelligent customer service flow processing method, including the following steps:
obtaining an access identifier and a service type to be executed from the access request;
inquiring a corresponding first hash key in a cache according to the access identifier and the service type;
under the condition that the first hash key is inquired, updating the attribute value corresponding to the first hash key according to the flow to be deducted of the access request;
and synchronizing the updated attribute values to the database for storage.
An embodiment of a second aspect of the present disclosure provides an intelligent customer service flow processing apparatus, including:
the acquisition module is used for acquiring the access identifier and the type of the service to be executed from the access request;
the query module is used for querying a corresponding first hash key in the cache according to the access identifier and the service type;
the updating module is used for updating the attribute value corresponding to the first hash key according to the flow to be deducted of the access request under the condition that the first hash key is inquired;
and the storage module is used for synchronizing the updated attribute values to the database for storage.
An embodiment of a third aspect of the present disclosure provides an electronic device, including:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
A fourth aspect of the present disclosure is directed to a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of the first aspect.
A fifth aspect of the present disclosure provides a computer program product, which includes a computer program that, when executed by a processor, implements the method of the first aspect.
The method, the device, the electronic device and the storage medium for processing the intelligent customer service flow acquire an access identifier and a service type to be executed from an access request, query a corresponding first hash key in a cache according to the access identifier and the service type, update an attribute value corresponding to the first hash key according to a flow to be deducted of the access request under the condition that the first hash key is queried, and synchronize the updated attribute value to a database for storage.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of an intelligent customer service flow processing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another intelligent customer service flow processing method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a hash key and corresponding fields and attribute values provided in an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an ordered concentrated flow deduction record provided by an embodiment of the present disclosure;
fig. 5 is a schematic flow chart of another method for processing intelligent customer service flow according to the embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an intelligent customer service flow processing apparatus according to an embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device provided by an embodiment of the disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and intended to be illustrative of the present disclosure, and should not be construed as limiting the present disclosure.
An intelligent customer service flow processing method, an intelligent customer service flow processing device, an electronic device and a storage medium according to the embodiments of the present disclosure are described below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of an intelligent customer service flow processing method according to an embodiment of the present disclosure.
As shown in fig. 1, the method comprises the steps of:
The execution main body of the intelligent customer service flow processing method of the embodiment of the disclosure is an intelligent customer service flow processing device, the intelligent customer service flow processing device is arranged in any electronic equipment, and the electronic equipment can be a flow server.
The access request may be an access request obtained in response to a user operation. The access request may be one or more. The embodiment of the disclosure can be applied to a scene of a single access request and is also suitable for a scene of a plurality of access requests with high concurrent flow.
In the embodiment of the present disclosure, an access identifier is obtained from an access request, where the access identifier may be an identifier of an application installed in an electronic device and used for responding to the access request, where the application is, for example, an online answering robot. The service types to be executed are different in different service scenarios, for example, in an e-commerce response scenario, the service types are pure machine response, clattering-dong beating, short message beating, and the like.
And step 102, inquiring a corresponding first hash key in a cache according to the access identifier and the service type.
The cache is an open-source Key Value cache, such as a Redis cache.
In the embodiment of the disclosure, in response to a traffic packet purchased by a user and an open response service, a hash key is generated in advance according to each access identifier and service type, that is, a key value of the hash key includes the access identifier and the service type. For the convenience of distinguishing, the access identifier is called as a first hash key, and all valid traffic packets corresponding to the corresponding access identifier are mapped to a plurality of fields and a plurality of attribute values corresponding to the first hash key and stored in a cache, so that initialization of all traffic packets is completed.
The attribute value corresponding to the first hash key contains the residual traffic in the traffic packet, and the corresponding field contains the traffic type, the traffic identifier and the traffic expiration time.
And 103, under the condition that the first hash key is inquired, updating the attribute value corresponding to the first hash key according to the flow to be deducted of the access request.
Therefore, in the embodiment of the present disclosure, after receiving the access request, according to the access identifier and the service type obtained from the access request, a first hash key corresponding to the access identifier and the service type is queried in the cache, and if the first hash key exists, a value about the remaining traffic in the attribute value corresponding to the first hash key is updated according to the traffic to be deducted carried in the access request.
And step 104, synchronizing the updated attribute values to a database for storage.
Furthermore, the attribute values updated in the cache are synchronously stored in the database, so that the data in the database is updated.
In the method for processing the intelligent customer service flow, the access identifier and the service type to be executed are obtained from the access request, the corresponding first hash key is inquired in the cache according to the access identifier and the service type, under the condition that the first hash key is inquired, the attribute value corresponding to the first hash key is updated according to the flow to be deducted of the access request, and the updated attribute value is synchronized to the database for storage. Meanwhile, the balance of all the flow packets is mapped into the attribute value corresponding to the hash key and stored in the cache, and the balance in all the flow packets can be seen when the flow is deducted, so that the problems that when a plurality of flow packets exist and the flow is deducted, the flow packets are required to be reloaded into the cache after the deduction of the current flow packet is finished when the flow is deducted, the flow deduction is unsuccessful and the flow is deducted less are solved, and the accuracy of the flow deduction is improved.
Based on the foregoing embodiments, this embodiment provides another intelligent customer service flow processing method, and fig. 2 is a schematic flow chart of the another intelligent customer service flow processing method provided in the embodiment of the present disclosure, as shown in fig. 2, the method includes the following steps
In the embodiment of the application, the access identifier has a corresponding relationship with the customer service robot, that is, the customer service robot which the access request needs to access can be determined according to the access identifier.
And 203, under the condition that the first hash key is inquired, updating the attribute value corresponding to the first hash key according to the flow to be deducted of the access request.
The explanation in steps 101 to 103 is also applicable to step 201 and step 203 in this embodiment, and is not described again in this embodiment.
In the embodiment of the present disclosure, each traffic packet has corresponding traffic expiration time, that is, the traffic expiration times corresponding to different traffic packets are different, and in order to improve accuracy of traffic deduction, as an implementation manner, when a first hash key is queried, a field and an attribute value corresponding to the first hash key are obtained, the traffic expiration time indicated by the corresponding field of the first hash key is checked, and when the check is passed, the attribute value corresponding to the first hash key is updated according to the traffic to be deducted corresponding to the access request. Whether the flow indicated by the field corresponding to the first hash key is in the valid period or not, namely whether the flow is valid or not is confirmed by checking the flow expiration time indicated by the field corresponding to the first hash key, so that the accuracy of flow deduction is improved.
And 204, under the condition that the first hash key is not inquired, reading the rights table in the database to obtain the traffic rights record in the rights table.
In the embodiment of the present disclosure, when the first hash key is not queried in the cache, that is, the traffic packet corresponding to the customer service robot corresponding to the access identifier stored in the database is not mapped into the cache by initialization, an initialization operation needs to be triggered to generate the hash key corresponding to the access identifier and the service type, and a second hash key is generated for convenience of distinguishing.
After the user purchases the traffic packet, a traffic interest record containing the customer service robot identifier, the traffic expiration time, the service type, the remaining traffic in the traffic packet and the traffic identifier is generated in the interest table in the database according to the purchased traffic packet. Therefore, under the condition that the first hash key is not inquired, a second hash key is newly built in the cache according to the access identifier and the type of the service to be executed, and the flow right record corresponding to the customer service robot is read from the right table in the database.
And step 205, establishing a second hash key in the cache according to the access identifier and the type of the service to be executed.
And the key value of the second hash key is the access identifier and the service type.
Wherein, the traffic interest record records the information of each traffic packet. And inquiring the flow packet information corresponding to the access identifier and the service type in the flow right record according to the access identifier and the service type.
In this embodiment of the present disclosure, the number of the traffic packet information corresponding to the access identifier and the service type may be multiple, so that a field corresponding to the second hash key is generated according to the multiple traffic packets, and a plurality of attribute values corresponding to the second hash key are generated according to the remaining traffic in the multiple traffic packet information.
Fig. 3 is a schematic diagram of hash keys, corresponding fields, and attribute values provided in an embodiment of the present disclosure, as shown in fig. 3, where key values of a second hash key are an access identifier bot-id and a service type traffic-type, where the service types are, for example, pure answering, clattering pat, short message pat, and the like in an e-commerce scene, which is not listed here. A FIELD FIELD corresponding to a second hash key generated according to the traffic packet information contains a traffic type, for example, intra-package traffic or extra-package traffic, end-time is traffic expiration time, and traffic-id is traffic identifier; the attribute VALUE corresponding to the second hash key is VALUE: the remaining flow rate.
Fig. 3 shows that, when the traffic packets corresponding to the access identifier and the service type are two, that is, the traffic packet 1 and the traffic packet 2, two fields and two attribute values, that is, the field 1 and the attribute value 1, and the field 2 and the attribute value 2, which correspond to the second hash key, are provided, where the contents of the field 1 and the attribute value 1 mapped by the traffic packet 1 and the contents of the field 2 and the attribute value 2 mapped by the traffic packet 2 may be the same or different.
It should be noted that the number of the traffic packets corresponding to the access identifier and the service type may be one or more, and is not limited in this embodiment. And the plurality of flow packets are mapped into the fields and the attribute values corresponding to the corresponding hash keys through hash operation, so that all the flow packets corresponding to the access identification and the service type are mapped into the corresponding fields and the attribute values in the hash keys and stored in the cache, the efficiency of flow deduction in the cache is improved in the subsequent flow deduction scene corresponding to a plurality of access requests with high concurrent flows, meanwhile, the problem of flow deduction failure caused by flow reduction due to flow reduction failure when other flow packets are obtained from the database after the flow deduction of the current flow packets is finished in the case of the plurality of flow packets can be avoided, and the accuracy of the flow deduction is improved.
And step 208, updating the attribute value corresponding to the second hash key according to the flow to be deducted.
In the embodiment of the disclosure, when a plurality of fields and attribute values corresponding to the second hash key are provided, a field list corresponding to the second hash key is obtained, each field includes expiration time of traffic in a corresponding traffic packet, the field indicating that the traffic has expired by the expiration time of the traffic is regarded as an invalid field, and if there are fields whose remaining traffic has not expired, the remaining traffic in the attribute value corresponding to the unexpired field is subtracted, so as to update the attribute value corresponding to the second hash key, avoid subtracting the expired traffic, and improve accuracy of traffic subtraction.
The method for updating the attribute value corresponding to the first hash key is also applicable to the method for updating the attribute value corresponding to the second hash key according to the flow to be deducted, and the principle is the same, and is not repeated in this embodiment.
In the embodiment of the disclosure, if the corresponding attribute value is not updated successfully, it indicates that there is no remaining traffic to be deducted, and the access request is intercepted to prohibit access to the customer service robot corresponding to the identifier.
And step 211, storing the corresponding flow deduction record in the cached ordered set according to the access identifier and the service type.
In the embodiment of the present disclosure, if the corresponding attribute value is successfully updated, it indicates that there is remaining traffic for deduction, and the corresponding traffic deduction record is stored in the ordered set of the cache according to the access identifier and the service type. The flow deduction records stored in the ordered set are stored according to the generation time sequence of the flow deduction records, so that the most recently generated flow deduction records, for example, the flow deduction records generated in the last 10 minutes, can be determined according to the flow deduction records stored in the ordered set.
As an implementation manner, the ordered set may be an active set based on a ZSET structure, where the traffic deduction records stored in the ordered set are stored in a cache in a hash value manner, where the key is a service type of the robot, the value is a deduction time of the attribute value, and the deduction time and the access identifier of the attribute value.
As shown in fig. 4, fig. 4 is a schematic diagram of an ordered centralized traffic deduction record provided by the embodiment of the present disclosure, where a key is a service type, for example, a short message snapshot, and a deduction time value is an attribute value, that is, 202006180100, 202006180110, and a combination of the deduction time and an access identifier of a customer service robot, that is, 202006180100-74, 202006180100-80, and the like, where 74 and 80 are access identifiers of different customer service robots.
In the embodiment of the present disclosure, after the attribute value is updated, a hash key corresponding to the updated attribute value is obtained, a corresponding traffic packet is queried in the database according to an identifier of the traffic packet in a field corresponding to the hash key, and a remaining traffic of the traffic packet in the database is updated according to the updated attribute value.
In the method for processing the intelligent customer service flow according to the embodiment of the disclosure, when the first hash key is not queried, an initialization operation is performed on the flow packets in the database, that is, all flow packet information corresponding to the access identifier and the service type is queried from the database, a field and an attribute value corresponding to the second hash key are generated based on each flow packet information, and then according to the flow to be deducted, the attribute value of the second hash key is updated when the flow is determined to be unexpired, so that all the flow packets corresponding to the access identifier and the service type are mapped to the field and the attribute value of the second hash key corresponding to the access identifier and the service type and are stored in the cache, and the efficiency of flow deduction in the cache and the accuracy of flow deduction are improved. And after the flow deduction is successful, storing each flow deduction record in the cached ordered set so as to count the flow deduction records.
In the foregoing embodiment, after the attribute value corresponding to the first hash key or the attribute value corresponding to the second hash key is updated, the updated attribute value is synchronized to the database for storage, and in order to avoid that the frequently updated attribute value is synchronized to the database and the performance of the database is affected, based on the foregoing embodiment, another intelligent customer service traffic processing method is provided in the embodiment of the present disclosure. Fig. 5 is a schematic flow chart of another flow processing method provided in the embodiment of the present disclosure, and as shown in fig. 5, steps 104 and 212 include the following steps:
The set time period may be set according to a requirement, for example, 10 minutes, 5 minutes, and the like, and is not limited in this embodiment.
For example, the set time length is 10 minutes, and in the flow deduction records stored after each update of the attribute values stored in the ordered set is successful, the target flow deduction record stored in the last 10 minutes is queried.
As shown in fig. 4, any line in the ordered set of service types and attribute values stored in the cache is a traffic deduction record, and the service type is a pure machine response service, for example, a target traffic deduction record is: pure machine answer, 202006180100, 202006180100-74, thus, read out the visit label as 74 from the goal flowrate deduct record, the goal business type is pure machine answer.
According to the combination of the determined target access identifier and the target service type, the corresponding target hash key can be searched in the cache, and further, according to the attribute value corresponding to the target hash key, the updated attribute value of the target hash key can be determined.
And step 504, synchronizing the updated attribute value of the target hash key to a database for storage.
Therefore, the updated attribute value of the target hash key can be synchronized to the database for storage, as an implementation manner, the identifier of the traffic packet is read from the field corresponding to the target hash key, the corresponding target traffic packet is inquired in the database according to the identifier of the traffic packet read from the field corresponding to the target hash key, and the residual traffic of the target traffic packet in the database is updated according to the updated attribute value of the target hash key. The updating is regularly carried out according to the set time, the flow is prevented from being deducted every time, the attribute values are synchronously stored in the database after being updated, and the database is prevented from being frequently read, so that the overall performance is improved.
Further, as an implementation manner, when the remaining traffic in the cache is zero, the field corresponding to the target hash key is deleted, so that the identifier of the traffic packet corresponding to the target hash key is deleted, the field corresponding to the hash key is prevented from being queried again, that is, the corresponding attribute value is not updated again, and the accuracy of traffic deduction is improved.
In the intelligent customer service flow processing method of the embodiment of the disclosure, the attribute value is periodically updated through the set flow deduction record stored in the ordered set, so as to avoid frequent operation on the database and improve the performance of the database.
In order to implement the above embodiment, the present disclosure further provides an intelligent customer service flow processing apparatus.
Fig. 6 is a schematic structural diagram of an intelligent customer service flow processing device according to an embodiment of the present disclosure.
As shown in fig. 6, the apparatus includes:
an obtaining module 61, configured to obtain the access identifier and the type of service to be executed from the access request.
And the query module 62 is configured to query the cache for the corresponding first hash key according to the access identifier and the service type.
And an updating module 63, configured to update the attribute value corresponding to the first hash key according to the flow to be deducted of the access request when the first hash key is queried.
And a storage module 64, configured to synchronize the updated attribute values to the database for storage.
Further, in an implementation manner of the embodiment of the present disclosure, the apparatus further includes:
a new creation module, configured to read a rights and interests table in the database to obtain a traffic rights and interests record in the rights and interests table when the first hash key is not queried; and establishing a second hash key in the cache according to the access identifier and the service type.
The query module 62 is further configured to query the traffic packet information corresponding to the access identifier and the service type in the traffic right record.
And the generating module is used for generating a field corresponding to the second hash key according to the flow expiration time, the identification of the flow packet and the flow type in the flow packet information, and generating an attribute value corresponding to the second hash key according to the residual flow in the flow packet information.
And the updating module 63 is configured to update the attribute value corresponding to the second hash key according to the flow to be deducted.
In an implementation manner of the embodiment of the present disclosure, the updating module 63 is further configured to:
under the condition that the first hash key is inquired, acquiring a field and an attribute value corresponding to the first hash key; checking the flow expiration time indicated by the corresponding field of the first hash key; and under the condition that the verification is passed, updating the attribute value corresponding to the first hash key according to the flow to be deducted of the access request.
In an implementation manner of the embodiment of the present disclosure, the apparatus further includes:
the processing module is used for storing a corresponding flow deduction record in the cached ordered set according to the access identifier and the service type under the condition of successful updating; in the event of an update failure, the access request is intercepted.
In one implementation manner of the embodiment of the present disclosure, the storage module 64 includes:
and the query unit is used for querying the target flow deduction record stored in the set time recently in the ordered set under the condition that the timer reaches the set time.
And the reading unit is used for reading the target access identifier from the attribute value of the target traffic deduction record and reading the target service type from the attribute key of the target traffic deduction record.
And the determining unit is used for determining the updated attribute value of the target hash key according to the target hash key corresponding to the combination of the target access identifier and the target service type.
And the synchronization unit is used for synchronizing the updated attribute value of the target hash key to a database for storage.
In an implementation manner of the embodiment of the present disclosure, the synchronization unit is further configured to:
reading the identification of the flow packet from the field corresponding to the target hash key; inquiring a corresponding target traffic packet in the database according to the identifier of the traffic packet read from the field corresponding to the target hash key; and updating the residual flow of the target flow packet in the database according to the updated attribute value of the target hash key.
In an implementation manner of the embodiment of the present disclosure, the synchronization unit is further configured to:
and deleting the field corresponding to the target hash key under the condition that the residual flow is zero.
It should be noted that the foregoing explanation of the method embodiment is also applicable to the apparatus of this embodiment, and is not repeated herein.
In the traffic processing device of the embodiment of the disclosure, an access identifier and a service type to be executed are obtained from an access request, a corresponding first hash key is queried in a cache according to the access identifier and the service type, and under the condition that the first hash key is queried, an attribute value corresponding to the first hash key is updated according to a flow to be deducted of the access request, and the updated attribute value is synchronized to a database for storage.
In order to implement the above embodiments, the present disclosure also provides an electronic device, including:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the foregoing method embodiments.
In order to implement the above embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of the foregoing method embodiments.
In order to implement the above embodiments, the present disclosure also proposes a computer program product comprising a computer program which, when executed by a processor, implements the method of the aforementioned method embodiments.
Fig. 7 is a block diagram of an electronic device provided by an embodiment of the disclosure. The electronic device comprises a processor 701 and a memory 702 for storing instructions executable by the processor 701. Wherein, the processor 701 is configured to execute the instructions to implement the intelligent customer service flow processing method in the embodiments of fig. 1 to 5 of the present disclosure. In practical applications, the electronic device may further comprise a network interface 703, an I/O controller 704, a mass storage device 705, and a bus 706 for connecting them.
In an exemplary embodiment, there is also provided a storage medium comprising instructions, for example, a memory 702 comprising instructions, which are executable by a processor 701 of an electronic device to implement the intelligent customer service flow handling method in the embodiments of fig. 1-5 of the present disclosure. Alternatively, the storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean 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 present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer 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. Moreover, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and the scope of the preferred embodiments of the present disclosure includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are well known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
Persons of ordinary skill in the art will appreciate that all or part of the steps carried in the method for implementing the above embodiments may be implemented by hardware associated with instructions of a program, which may be stored in a computer-readable storage medium, and the program, when executed, may include one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present disclosure.
Claims (13)
1. An intelligent customer service flow processing method is characterized by comprising the following steps:
obtaining an access identifier and a service type to be executed from the access request;
inquiring a corresponding first hash key in a cache according to the access identifier and the service type;
under the condition that the first hash key is inquired, updating the attribute value corresponding to the first hash key according to the flow to be deducted of the access request;
and synchronizing the updated attribute values to the database for storage.
2. The method according to claim 1, wherein after querying the corresponding first hash key in the cache according to the access identifier and the service type, the method further comprises:
under the condition that the first hash key is not inquired, reading a rights table in the database to obtain a flow rights record in the rights table;
according to the access identifier and the service type, a second hash key is newly built in the cache;
inquiring the access identifier and the traffic packet information corresponding to the service type in the traffic interest record;
generating a field corresponding to the second hash key according to the flow expiration time, the identification of the flow packet and the flow type in the flow packet information, and generating an attribute value corresponding to the second hash key according to the residual flow in the flow packet information;
and updating the attribute value corresponding to the second hash key according to the flow to be deducted.
3. The method according to claim 2, wherein, in a case that the first hash key is queried, updating the attribute value corresponding to the first hash key according to the traffic to be deducted of the access request includes:
under the condition that the first hash key is inquired, acquiring a field and an attribute value corresponding to the first hash key;
checking the flow expiration time indicated by the corresponding field of the first hash key;
and under the condition that the verification is passed, updating the attribute value corresponding to the first hash key according to the flow to be deducted of the access request.
4. The method according to any one of claims 1 to 3, wherein the access identifier has a corresponding relationship with a customer service robot, and the method further comprises, after updating the attribute value corresponding to the first hash key according to the volume to be deducted of the access request when the first hash key is queried, the steps of:
under the condition of successful updating, storing corresponding flow deduction records in the cached ordered set according to the access identifier and the service type;
and intercepting the access request to forbid accessing the customer service robot corresponding to the access identifier under the condition of failure in updating.
5. The method of claim 4, wherein synchronizing the updated attribute values to the database comprises:
under the condition that a timer reaches a set time length, inquiring a target flow deduction record stored in the set time length recently in the ordered set;
reading a target access identifier from the attribute value of the target traffic deduction record, and reading a target service type from an attribute key of the target traffic deduction record;
determining an updated attribute value of the target hash key according to the target hash key corresponding to the combination of the target access identifier and the target service type;
and synchronizing the updated attribute value of the target hash key to a database for storage.
6. The method of claim 5, wherein synchronizing the updated property value of the target hash key to a database comprises:
reading the identification of the flow packet from the field corresponding to the target hash key;
inquiring a corresponding target traffic packet in the database according to the identifier of the traffic packet read from the field corresponding to the target hash key;
and updating the residual flow of the target flow packet in the database according to the updated attribute value of the target hash key.
7. The method according to claim 6, further comprising, after updating the remaining traffic of the target traffic packet in the database according to the updated attribute value of the target hash key:
and deleting the field corresponding to the target hash key under the condition that the residual flow is zero.
8. A flow processing apparatus, comprising:
the acquisition module is used for acquiring the access identifier and the type of the service to be executed from the access request;
the query module is used for querying a corresponding first hash key in the cache according to the access identifier and the service type;
the updating module is used for updating the attribute value corresponding to the first hash key according to the flow to be deducted of the access request under the condition that the first hash key is inquired;
and the storage module is used for synchronizing the updated attribute values to the database for storage.
9. The apparatus of claim 8, further comprising:
a new creation module, configured to read a rights and interests table in the database to obtain a traffic rights and interests record in the rights and interests table when the first hash key is not queried; according to the access identifier and the service type, a second hash key is newly built in the cache;
the query module is further configured to query the access identifier and traffic packet information corresponding to the service type in the traffic right record;
a generating module, configured to generate a field corresponding to the second hash key according to the flow expiration time, the identifier of the flow packet, and the flow type in the flow packet information, and generate an attribute value corresponding to the second hash key according to the remaining flow in the flow packet information;
and the updating module is used for updating the attribute value corresponding to the second hash key according to the flow to be deducted.
10. The apparatus according to any one of claims 8-9, further comprising:
the processing module is used for storing a corresponding flow deduction record in the cached ordered set according to the access identifier and the service type under the condition of successful updating; in the event of an update failure, the access request is intercepted.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
13. A computer program product comprising a computer program, characterized in that the computer program realizes the method of any of claims 1-7 when executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111348436.6A CN114064722A (en) | 2021-11-15 | 2021-11-15 | Intelligent customer service flow processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111348436.6A CN114064722A (en) | 2021-11-15 | 2021-11-15 | Intelligent customer service flow processing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114064722A true CN114064722A (en) | 2022-02-18 |
Family
ID=80272143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111348436.6A Pending CN114064722A (en) | 2021-11-15 | 2021-11-15 | Intelligent customer service flow processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114064722A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117459634A (en) * | 2023-11-22 | 2024-01-26 | 深圳市众智达信息科技有限公司 | Method, system and medium for improving cross-data center blacklist interface access performance |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106934025A (en) * | 2017-03-13 | 2017-07-07 | 广州爱九游信息技术有限公司 | A kind of account data management method, device and server |
CN108133399A (en) * | 2016-11-30 | 2018-06-08 | 北京京东尚科信息技术有限公司 | The second of high concurrent fast-response kills the method, apparatus and system that inventory precisely reduces |
CN109150764A (en) * | 2017-06-16 | 2019-01-04 | 中兴通讯股份有限公司 | Flow managing method, device, equipment and storage medium |
CN111104235A (en) * | 2019-12-06 | 2020-05-05 | 江苏苏宁物流有限公司 | Queue-based asynchronous processing method and device for service requests |
CN112995052A (en) * | 2021-04-25 | 2021-06-18 | 北京世纪好未来教育科技有限公司 | Flow control method and related device |
CN113242303A (en) * | 2021-05-12 | 2021-08-10 | 北京京东拓先科技有限公司 | Session processing method, device, electronic equipment, system and storage medium |
-
2021
- 2021-11-15 CN CN202111348436.6A patent/CN114064722A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108133399A (en) * | 2016-11-30 | 2018-06-08 | 北京京东尚科信息技术有限公司 | The second of high concurrent fast-response kills the method, apparatus and system that inventory precisely reduces |
CN106934025A (en) * | 2017-03-13 | 2017-07-07 | 广州爱九游信息技术有限公司 | A kind of account data management method, device and server |
CN109150764A (en) * | 2017-06-16 | 2019-01-04 | 中兴通讯股份有限公司 | Flow managing method, device, equipment and storage medium |
CN111104235A (en) * | 2019-12-06 | 2020-05-05 | 江苏苏宁物流有限公司 | Queue-based asynchronous processing method and device for service requests |
CN112995052A (en) * | 2021-04-25 | 2021-06-18 | 北京世纪好未来教育科技有限公司 | Flow control method and related device |
CN113242303A (en) * | 2021-05-12 | 2021-08-10 | 北京京东拓先科技有限公司 | Session processing method, device, electronic equipment, system and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117459634A (en) * | 2023-11-22 | 2024-01-26 | 深圳市众智达信息科技有限公司 | Method, system and medium for improving cross-data center blacklist interface access performance |
CN117459634B (en) * | 2023-11-22 | 2024-06-11 | 深圳市众智达信息科技有限公司 | Method, system and medium for improving cross-data center blacklist interface access performance |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111314238B (en) | Token management method and device, storage medium and electronic device | |
CN108647357B (en) | Data query method and device | |
CN111475105B (en) | Monitoring data storage method, monitoring data storage device, monitoring data server and storage medium | |
US20190229931A1 (en) | Distributed telephone number ledger and register | |
CN111709817B (en) | Order data processing method and device, computer readable medium and electronic equipment | |
CN112631633B (en) | Function module upgrading method and device based on double-core intelligent ammeter | |
CN112148794B (en) | Version management method, device and storage medium of intelligent contract | |
CN109446208A (en) | A kind of date storage method, computer readable storage medium and server | |
WO2019047540A1 (en) | Transaction data processing method and apparatus, storage medium, and computer device | |
CN109377120A (en) | Inventory management method, device and electronic device based on cloud service | |
CN111475519A (en) | Data caching method and device | |
CN112613288B (en) | Method, device, computer equipment and storage medium for generating bill | |
CN114064722A (en) | Intelligent customer service flow processing method and device, electronic equipment and storage medium | |
CN108959548A (en) | The processing method and processing device of service request | |
CN112860679A (en) | Equipment information management method and device, electronic equipment and storage medium | |
CN109191217B (en) | Method and device for predicting video advertisement putting times | |
JP2018005774A (en) | Vehicle information update device, vehicle information update method, and program | |
CN113626436B (en) | A data processing method and device | |
CN110866036B (en) | Data processing method, system, device, terminal and readable storage medium | |
CN111581238B (en) | Information query method and device, electronic equipment and computer readable storage medium | |
CN110674079B (en) | Log file recording method and device | |
CN110209666B (en) | data storage method and terminal equipment | |
CN110363515B (en) | Rights and interests card account information inquiry method, system, server and readable storage medium | |
EP4022470A1 (en) | Method, apparatus, and computer readable medium for generating an audit trail of an electronic data record | |
CN110674156A (en) | Multi-machine room data synchronization method, computing equipment and computer storage medium |
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 |