A customer appeal evolution path tracking and early warning method combined with a knowledge graph
By breaking down customer request texts into semantic fragments and combining them with blockchain notarization technology, the problems of coarse granularity in request text decomposition, storage bloat, and high transaction costs in existing technologies are solved. This enables efficient tracking and early warning of the evolution path of requests, reduces storage costs, and improves early warning efficiency.
Patent Information
- Application Number
- CN202611110501.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-11-20
AI Technical Summary
Existing technologies for analyzing customer demands suffer from problems such as coarse-grained breakdown of demand texts, bloated blockchain storage, high transaction costs, and a lack of joint modeling of temporal analysis and semantic content, making it impossible to achieve efficient evolution path tracking and early warning.
The customer's request text is split into semantic fragments and colored and encoded to generate a colored data stream carrying the parent request identifier and timestamp. This stream is then uploaded to the main blockchain to form an on-chain fingerprint. At the same time, the semantic fragment content and the corresponding colored encoding are stored on off-chain edge nodes. A time-series-semantic joint matrix is constructed based on the on-chain fingerprint, and an early warning is given by comparing the inertial vector pattern through edge computing nodes.
It enables detailed, segment-level tracking of the evolution path of demands, reduces storage and transaction costs, and achieves rapid backtracking and location through mapping relationships, thereby improving the accuracy and efficiency of early warning.
Smart Images

Figure CN123138239A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of data processing and blockchain application technology, and in particular to a method for tracking and early warning of the evolution path of customer demands by combining knowledge graphs. Background Technology
[0002] With the rapid development of internet and mobile communication technologies, the massive amounts of customer request texts received daily by enterprise customer service centers have become crucial data assets for understanding the evolving trends of user needs. To extract computable structured information from unstructured request texts, natural language processing (NLP) technology is widely used for tasks such as request classification, sentiment analysis, and topic modeling. In recent years, blockchain-based evidence storage mechanisms, due to their immutability and traceability, have been gradually introduced into customer service auditing and compliance fields to secure original request records. Meanwhile, time-series data analysis and evolution path tracing technologies have made significant progress in scenarios such as social network sentiment monitoring and software defect tracking. The core idea is to detect abnormal jumps in system states by constructing feature vectors over time.
[0003] However, existing technologies typically use these methods in a fragmented manner: natural language processing is limited to shallow feature extraction of text, blockchain is used only for passive evidence storage, and time series analysis is independent of semantic content, failing to form an end-to-end closed loop from appeal text to semantic encoding, from on-chain fingerprints to evolutionary matrices, and from inertial vectors to mutation warnings.
[0004] Existing customer complaint analysis methods suffer from the following common shortcomings. First, the granularity of complaint text breakdown is coarse. Most solutions model complaints using entire text segments or fixed-length windows, losing the causal and transitional logical relationships between atomic semantic units. Furthermore, the lack of explicit binding of parent complaint node identifiers makes it impossible to distinguish the contribution of different segments within the same complaint to the overall change during subsequent evolution path tracing. Second, the separation of complaint data storage and verification is incomplete. Full-text on-chain storage leads to blockchain storage bloat and high transaction costs, while on-chain hash values alone cannot support precise segment-level positioning. Off-chain storage often uses random primary keys, lacking a direct mapping to on-chain fingerprints. Backtracking requires additional maintenance of mapping tables, increasing query latency and the risk of data inconsistency. Third, joint modeling methods for temporal analysis and semantic content are lacking. Traditional methods either statistically analyze the changes in the number of complaints within each time slot (ignoring semantic content drift) or perform independent semantic clustering for each time slot (ignoring temporal continuity). These methods fail to construct a joint matrix that simultaneously encodes temporal distribution and semantic components, and further fail to define an inertial vector index that can quantify the degree of semantic composition change between adjacent time periods. Summary of the Invention
[0005] The purpose of this section is to outline some aspects of the embodiments of the present invention and to briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section, as well as in the specification abstract and the title of the invention, to avoid obscuring the purpose of this section, the specification abstract, and the title of the invention. Such simplifications or omissions shall not be used to limit the scope of the invention.
[0006] In view of the aforementioned existing problems, the present invention is proposed.
[0007] Therefore, the technical problem solved by this invention is: how to form an efficient evolutionary analysis technical solution that combines knowledge graph concepts and blockchain evidence storage technology.
[0008] To address the aforementioned technical problems, this invention provides the following technical solution: a method for tracking and warning the evolution path of customer requests using a knowledge graph, characterized by comprising: acquiring customer request text; splitting the request text into semantic fragments and color-coding each semantic fragment to generate a color-coded data stream carrying a parent request identifier and a timestamp; uploading the request atomic information in the color-coded data stream to the blockchain main chain to form an on-chain fingerprint, while storing the semantic fragment content and the corresponding color-coded information in off-chain edge nodes; constructing a temporal-semantic joint matrix based on the on-chain fingerprint, recording the occurrence status of each color-coded information in each time slot, and generating an inertia vector for the current path; having edge computing nodes compare the inertia vectors of adjacent time slots, outputting a warning signal when a non-overlapping mutation occurs in the vector pattern, and locating the mutated node based on the on-chain fingerprint.
[0009] As a preferred embodiment of the present invention, the step of splitting the appeal text into semantic segments includes: obtaining the original text of the customer appeal and obtaining the identifier of the parent appeal node to which the customer appeal belongs; if the current customer appeal is the root appeal, then a fixed root identifier is used; the original text is divided into multiple semantic segments according to punctuation marks and preset conjunctions, each segment representing an indivisible atomic appeal unit; and the current precise time of the system is read as the timestamp of this customer appeal.
[0010] As a preferred embodiment of the present invention, the step of coloring and encoding each semantic segment includes: assigning a sequence number to each semantic segment obtained from the segmentation according to its order in the original text, starting from 1; concatenating the parent appeal identifier, timestamp, sequence number, and text content of the semantic segment into a string, and performing a hash operation to obtain a unique coloring code for the semantic segment; combining all semantic segments and their corresponding coloring codes, along with the parent appeal identifier and timestamp, into a coloring data stream; the coloring data stream explicitly records the correspondence between the parent appeal identifier, timestamp, and each semantic segment and its coloring code.
[0011] As a preferred embodiment of the present invention, the formation of the on-chain fingerprint includes: extracting the parent appeal identifier and all semantic fragments and color codes from the colorized data stream; concatenating all the color codes under the parent appeal identifier into a long string according to the original order of the fragments, and performing a hash operation to generate the appeal atomic information of the parent appeal node; uploading the appeal atomic information as a record to the main chain of the blockchain; and returning a transaction hash value after the blockchain system completes the processing, using the hash value as the on-chain fingerprint of the parent appeal node.
[0012] As a preferred embodiment of the present invention, the storage in the off-chain edge node includes: sending each semantic segment, the corresponding color code, and the timestamp in the colorized data stream, together with the on-chain fingerprint, to a designated off-chain edge node for persistent storage; during storage, all semantic segments, color codes, and timestamps under the same parent claim identifier are stored together, using the parent claim identifier as the unit; and establishing an index table in the off-chain edge node with the on-chain fingerprint as the primary key.
[0013] As a preferred embodiment of the present invention, the construction of the temporal-semantic joint matrix includes: targeting the periodic... All on-chain fingerprints collected are retrieved one by one through the index table of off-chain edge nodes to find the timestamp and all colored codes corresponding to each on-chain fingerprint. The retrieved timestamps are divided into continuous time slots according to a pre-set time length, and each time slot corresponds to a row in the temporal-semantic joint matrix. A hash digest operation is performed on each colored code that actually appears, and the first few bytes of the hash value are taken as the digest value. The digest value is used as the column index of the temporal-semantic joint matrix. Each column uniquely corresponds to a colored code.
[0014] In a preferred embodiment of the present invention, generating the inertia vector of the current path includes: traversing each time slot, collecting all on-chain fingerprints whose timestamps fall within the time slot range, and collecting all the stained codes associated with the on-chain fingerprints to form the coding set of the time slot; for the row of the current time slot in the temporal-semantic joint matrix, if the stained code represented by a certain column appears in the coding set collected by the time slot, then the corresponding position is marked as 1, otherwise it is marked as 0; at the same time, establishing and saving the mapping relationship between each time slot and all the on-chain fingerprints contained therein; for two adjacent time slots, performing an XOR operation bit by bit on the corresponding row vectors to obtain a difference vector; counting the number of 1s in the difference vector as the inertia vector value of the next time slot; the first time slot has no predecessor, so no inertia vector is generated.
[0015] As a preferred embodiment of the present invention, the edge computing node establishes a historical pattern set upon startup. The historical pattern set is initially empty and is used to record the inertial vector values that have already appeared.
[0016] As a preferred embodiment of the present invention, the comparison of the inertial vectors of adjacent time slots includes: for the inertial vector value of the current time slot, denoted as the current value; for the inertial vector value of the previous time slot, denoted as the previous value, calculating the difference between the two; if the current is the first inertial vector, then skip the subsequent judgment; if the difference is greater than n times the previous value and the current value is not in the historical pattern set, then it is determined that the vector pattern of the current time slot has undergone a non-overlapping mutation; when a non-overlapping mutation is determined to occur, the edge computing node outputs a warning signal, including the identifier of the current time slot and the absolute value of the difference; according to the time slot where the mutation occurred, all on-chain fingerprints corresponding to the time slot are obtained from the mapping relationship; for each on-chain fingerprint, the corresponding semantic fragment and color coding are retrieved using the index table of the off-chain edge nodes, and the parent claim node where the mutation occurred is located.
[0017] This invention also provides the following technical solution: a customer demand evolution path tracking and early warning system combining knowledge graphs, characterized by comprising: a demand coloring module, which acquires customer demand text, splits the demand text into semantic fragments and color-codes each semantic fragment, generating a coloring data stream carrying a parent demand identifier and a timestamp; an on-chain evidence storage module, which uploads the demand atomic information in the coloring data stream to the blockchain main chain to form an on-chain fingerprint, and stores the semantic fragment content and the corresponding coloring code in off-chain edge nodes; a time-series matrix module, which constructs a time-series-semantic joint matrix based on the on-chain fingerprint, records the occurrence status of each coloring code in each time slot, and generates an inertia vector for the current path; and a mutation backtracking module, which compares the inertia vectors of adjacent time slots by edge computing nodes, outputs an early warning signal when a non-overlapping mutation occurs in the vector pattern, and backtracks to locate the mutation node based on the on-chain fingerprint.
[0018] The beneficial effects of this invention are as follows: By decomposing customer request text into atomic semantic fragments with color coding and combining them with parent request identifiers and high-precision timestamps, this invention achieves fragment-level fine-grained tracking of the request evolution path. Furthermore, by leveraging the collaborative architecture of storing request atomic information on the blockchain main chain and storing complete semantic data on edge nodes, it significantly reduces storage and transaction costs while ensuring data immutability. Moreover, through the mapping relationship between time slots and on-chain fingerprints and the primary key index of edge nodes, it achieves rapid backtracking and location from the mutation time point to the specific request node and semantic fragment, compressing the anomaly investigation time from hours to seconds. This provides a new solution for intelligent operation and maintenance of customer service that is highly accurate, low-latency, and traceable. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart illustrating a customer demand evolution path tracking and early warning method that combines knowledge graphs, as shown in this invention. Detailed Implementation
[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0021] Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort should fall within the scope of protection of this invention.
[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0023] According to an embodiment of the present invention, in combination Figure 1 The flowchart shown illustrates a method for tracking and early warning of customer demand evolution paths using knowledge graphs, including: S1: Obtain the customer's request text, split the request text into semantic fragments, and color-encode each semantic fragment to generate a colored data stream carrying the parent request identifier and timestamp.
[0024] It should be noted that in existing technologies, the segmentation of appeal text often relies on general word segmenters or sentence boundary detection tools, such as simple segmentation based on periods, question marks, and exclamation marks. However, such methods cannot handle complex semantic units introduced by conjunctions (such as "but" and "because"), and are prone to incorrectly segmenting a long sentence containing causal or adversative relationships into multiple incomplete segments, or incorrectly merging atomic appeals that should be independent. To solve the above problems, the present invention operates as follows: S1.1: Obtain the original text of the customer's request, and at the same time obtain the identifier of the parent request node to which the customer's request belongs.
[0025] In this embodiment of the invention, the system reads the original text of the customer's request from the client request or message middleware. The original text is stored in Unicode encoding (such as UTF-8) and leading and trailing whitespace characters are removed. At the same time, the system queries the current session's state cache to see if there is a current parent request node field, which is pre-written by the upstream processing flow (such as the customer service dialogue management module).
[0026] If the field exists and is not empty, the corresponding value will be used as the identifier of the parent request node; if it does not exist (i.e., the current request is the starting request of a new session), the system will determine that the request is a root request and automatically assign a preset fixed root identifier. This root identifier is unique throughout the entire system, and all root requests share the same fixed root identifier.
[0027] The system also needs to verify whether the format of the parent request identifier conforms to the predefined specification (such as UUID v4 format or custom namespace format). If it does not conform, the system will refuse to process the request and return an error code.
[0028] This invention matches the following segmentation rules according to priority: First, the highest priority is given to punctuation marks such as periods, exclamation marks, and question marks. When any of these punctuation marks is matched, the segment is cut off directly after that mark. The second priority is given to a pre-defined list of conjunctions, including "and," "but," "because," "moreover," "however," "due to," and "therefore." When a conjunction is encountered, the system cuts off before the conjunction and uses that conjunction as the starting point of the next segment. For example, for the text "User requests refund and complains about slow logistics," the segmentation result is two segments: "User requests refund" and "And complains about slow logistics."
[0029] To implement this logic, the system uses positive lookahead in regular expressions or writes a finite state automaton to traverse each character in the text. When a connector pattern match is successfully detected, the current cutting position is recorded, and the cutting point is set before the first character of the connector. After segmentation, whitespace characters at the beginning and end of each segment are removed, but punctuation marks and connectors are retained. Empty segments with a length of zero are automatically discarded. Each non-empty segment is finally marked as an atomic appeal unit and stored in an ordered list.
[0030] Optionally, check if the segment still contains connectors or punctuation marks that could lead to further splitting. If so, it indicates that the segmentation rules were not fully effective (e.g., due to incomplete regular expression coverage). In this case, trigger a second fine-tuning segmentation, recursively calling the same segmentation logic until each segment no longer contains the preset segmentation pattern. Simultaneously, record the original start and end offsets (character positions) of each segment for manual review in case of subsequent encoding conflicts. All segments are stored in their original order in a double-ended queue, with a Boolean flag initially set to true.
[0031] S1.2: Read the current precise system time, accurate to milliseconds or higher, and use it as the timestamp for this customer request. If multiple requests are processed consecutively within the same process, and the time difference between two calls is detected to be less than the minimum resolution of the system clock (e.g., 1 nanosecond), then an auto-incrementing sequence number is appended to the low-order bits of the timestamp to ensure that the timestamps of different requests on the same node are strictly incremented.
[0032] S1.3: For each semantic segment obtained from the segmentation, assign a sequence number according to its order in the original text, starting from 1. This sequence number is stored in memory as a 32-bit unsigned integer. Bind this sequence number to the corresponding semantic segment text to form a key-value pair (sequence number → segment). During the binding process, simultaneously calculate a lightweight checksum (such as CRC32) of the segment text and store it along with the sequence number in a temporary cache for subsequent order integrity checks.
[0033] Furthermore, after all segment numbers have been assigned, a sequence consistency verification is performed: checking whether the numbers are consecutive (i.e., no gaps from 1 to the end) and whether the original offsets of the segment text are strictly increasing. If a non-consecutive number is detected, it indicates that segments may have been lost during the segmentation process, triggering a rollback and re-execution of S1.1. If a decreasing offset is detected, it indicates that the segment order has been unexpectedly disrupted, and the segment list is reordered according to the original offsets, then the numbers are reassigned. After successful verification, each semantic segment and its number are encapsulated into an immutable data tuple, which is then passed to S1.4.
[0034] S1.4: Concatenate the parent appeal identifier (string), timestamp (64-bit integer converted to a fixed 18-bit decimal string, padded with leading zeros), sequence number (32-bit integer converted to a fixed 4-bit decimal string), and the semantic fragment (original Unicode string) in the following order to form the parent appeal identifier + separator + timestamp string + separator + sequence number string + separator + normalized fragment text.
[0035] After concatenation, the byte sequence is processed using the SHA-256 secure hash algorithm to obtain a 32-byte (256-bit) hash value. Optionally, to shorten the encoding length and facilitate storage, the first 16 bytes (128 bits) of the hash value can be used, or Base62 encoding can be applied. Specifically, the complete 32-byte hash value can be converted into a hexadecimal string (64 characters), or Base64 URL-safe encoding (approximately 44 characters) can be used. The final string is the colored encoding of this semantic fragment.
[0036] The mapping between the encoding and the original fragment text also needs to be cached in memory so that the calculation is not repeated in subsequent steps.
[0037] S1.5: Combine all semantic fragments and their corresponding coloring codes, along with the parent appeal identifier and timestamp, into a single coloring data stream.
[0038] In practice, an in-memory data structure object needs to be constructed. This object uses a platform-independent serialization format, such as using Protocol Buffers (protobuf) to define message types. This object contains three required fields: a string type storing the parent request identifier, and a uint64 type storing a high-precision timestamp and a repetition field. Each element is a nested message. Each nested message contains three sub-fields: a uint32 type storing the fragment sequence number, a string type storing the raw text of the semantic fragment, and a string type storing the corresponding coloring code. Other optional metadata fields can also be added at the top level.
[0039] After assembly, the protobuf serialization interface is called to convert the memory object into a binary byte stream. If readability is required, it can also be converted to JSON format (but binary format is more conducive to blockchain on-chain processing).
[0040] The serialized data stream is simultaneously copied to two output channels: the first channel transmits it to the blockchain (step S2), and the second channel transmits it to the off-chain edge node storage (step S3).
[0041] Before transmission, the SHA-256 hash value of the entire data stream needs to be calculated and appended to the end of the data stream for the receiver to verify its integrity.
[0042] It should be noted that the original values of the parent appeal identifier and timestamp are explicitly preserved in the colored data stream, so that no subsequent processing step needs to trace back to the source of the original appeal.
[0043] As can be seen, this invention, combined with secondary fine segmentation and offset verification, can accurately separate complex semantic units containing logical relationships such as cause and effect and transition, avoiding the erroneous merging or splitting of atomic claims caused by traditional sentence boundary detection.
[0044] S2: Upload the request atomic information in the colored data stream to the blockchain main chain to form an on-chain fingerprint, and at the same time store the semantic fragment content and the corresponding colored code in the off-chain edge node.
[0045] S2.1: Extract the parent appeal identifier and all semantic fragments and color codes from the color data stream. Then, in ascending order of sequence number, extract the color code string corresponding to each fragment and append it to a dynamic string buffer.
[0046] After each append operation, if there is another encoding following it, a predefined delimiter (such as | or the invisible character 0x1F) is inserted, resulting in the concatenated string.
[0047] Furthermore, the concatenated string is converted into a UTF-8 byte sequence, and a cryptographic hash function (such as SHA-256) is called to calculate the hash value.
[0048] To ensure compatibility with existing blockchain systems, the hash output can be represented as a hexadecimal string (64 characters) or a raw byte array. The calculated hash value is the atomic information of the parent request node's request.
[0049] The atomic information is temporarily stored in memory and associated with the current parent claim identifier. At the same time, a log record is generated, which includes the parent claim identifier, atomic information, the number of colored codes involved in the concatenation, and the prefix checksum of each code.
[0050] S2.2: Upload the request atomic information as a record to the main chain of the blockchain.
[0051] S2.3: After the blockchain system completes the processing, it returns a transaction hash value, which is used as the on-chain fingerprint of the parent request node.
[0052] S2.4: Assemble each semantic segment, corresponding color code, and timestamp in the colored data stream, along with the on-chain fingerprint, into an aggregate record. This record is serialized into JSON format and sent to a designated off-chain edge node for persistent storage.
[0054] Specifically, connections are established through the configured edge node service address (such as the IPFS API endpoint, the master node of a Redis cluster, or a MongoDB shard).
[0055] For IPFS, the serialized data blocks are added as files, and the returned Content Identifier (CID) is the on-chain fingerprint (it is necessary to ensure that the CID is consistent with the on-chain fingerprint or to establish a mapping; this invention requires edge nodes to support storage with arbitrary strings as keys, so it is more suitable to use a database that supports key-value storage).
[0056] Preferably, a distributed key-value storage engine (such as RocksDB cluster or TiKV) is used to directly perform the PUT operation: the key is a hexadecimal string of the on-chain fingerprint, and the value is a serialized data block.
[0057] The system requires edge nodes to support atomic writes, meaning that other read requests should not see any data until the write operation is complete.
[0058] After a successful write, the edge node returns a confirmation message.
[0059] If the write operation fails, the system will retry 3 times. After the failure, the storage task will be transferred to an asynchronous queue for processing by a background thread.
[0060] It should be noted that all fragments, codes, and timestamps under the same parent claim identifier must be stored in the same key-value record to avoid cross-record queries.
[0061] S2.5: Create an index table in the off-chain edge nodes using the on-chain fingerprint as the primary key. For example, create a column family in RocksDB or define a hash table in Redis. This index table uses the on-chain fingerprint (hexadecimal string) as the primary key, and the values are stored as the binary serialized form of the data records assembled in S2.4.
[0062] When an edge node writes a record, it automatically creates or updates the corresponding entry in the index table.
[0063] The index table also maintains a Bloom filter to quickly determine if an on-chain fingerprint exists, avoiding invalid disk reads.
[0064] It should be noted that this separate design of storing fingerprints on-chain and full text off-chain not only utilizes the tamper-proof and traceability features of blockchain to ensure the authenticity of the evolution path of the appeal, but also avoids the excessive storage costs and privacy risks caused by directly uploading a large amount of original text to the chain. At the same time, since the off-chain index directly uses the on-chain fingerprint as the key, and all fragments of the same parent appeal node are aggregated in a single record, subsequent steps can obtain the complete timestamp and encoding information in a single query, which significantly improves the efficiency of time series matrix construction.
[0065] S3: Construct a temporal-semantic joint matrix based on the on-chain fingerprint, record the occurrence status of each stained code in each time slot, and generate the inertia vector of the current path.
[0066] S3.1: Regarding the observation period (For example, going back 24 hours from the current system time, which can be set according to actual needs) All on-chain fingerprints collected are retrieved one by one through the index table of off-chain edge nodes to find the timestamp and all colored codes corresponding to each on-chain fingerprint.
[0067] S3.2: Divide the retrieved timestamps into consecutive time slots according to a pre-defined time length, with each time slot corresponding to a row in the time-semantic joint matrix.
[0068] First, a time slot length parameter is preset. For example, 3600 seconds (1 hour) or 86400 seconds (1 day). Based on the start time of the observation period T (denoted as...). ) and end time (denoted as ), calculate the number of time slots required to cover this period. :
[0069] The time slot is defined using a left-closed, right-open interval: the first... The range of each time slot is
[0070] in, From 0 to .
[0071] To align with natural time boundaries (such as the hour), you can choose to... Aligned to 00:00:00 of the current day, making the time slot boundaries consistent with the daily understanding of time.
[0072] Each time slot is assigned a slot number (starting from 0) and a readable label (e.g., 2026-01-10 14:00:00 ~ 15:00:00).
[0073] Furthermore, the number of rows in the temporal-semantic joint matrix is equal to the number of time slots. Establish a mapping from slot number to row index: row index = slot number. Simultaneously, maintain an array in memory. , length is The start and end times of each time slot are stored sequentially, which facilitates quick determination of the time slot to which a given timestamp belongs.
[0074] The specific judgment process includes: for timestamps ,calculate:
[0075] like exist Within the range, the timestamp belongs to the first... A time slot.
[0076] Furthermore, boundary cases also need to be handled, i.e., when When the interval is exactly equal to the end time of a certain time slot, since the interval is left-closed and right-open, it should be assigned to the next time slot (or the end boundary of the last time slot is...). ,at this time (Place it in the last slot).
[0077] S3.3: Perform a hash digest operation on each coloring code that actually appears, take the first few bytes of the hash value as the digest value, and use the digest value as the column index of the temporal-semantic joint matrix. Each column uniquely corresponds to a coloring code.
[0078] In this embodiment of the invention, firstly, all the color codes obtained in S3.1 are collected and deduplicated to obtain the results in the periodic... The set of colored codes that have actually appeared in the internal data. For each colored code c in the set, its string (original SHA-256 hexadecimal representation) is input again into a hash function (e.g., SHA-1 or BLAKE2s) to calculate a fixed-length hash value; further, the first k bytes (e.g., the first 4 bytes, i.e., 32 bits) of this hash value are extracted as a digest value. This digest value is converted into a 32-bit unsigned integer, which serves as the column index of the colored code c in the temporal-semantic joint matrix. The choice of k needs to balance two factors: the larger k is, the lower the collision probability, but the more columns in the matrix; the smaller k is, the higher the collision probability. In the embodiments of the present invention, the preferred scheme is k=4, at which point the collision probability is 10. 9 It is still acceptable for the number of codes on this scale.
[0079] This invention also establishes a bidirectional mapping table: the forward mapping stores the column index corresponding to each coloring code; the reverse mapping stores the original coloring code corresponding to each column index, which is used to trace back from the column position of the matrix to the specific semantic code.
[0080] Ideally, during the column index generation process, it is also necessary to detect collisions in real time, i.e., two different colored codes c1 and c2 calculate the same digest value (the same column index). When a collision occurs, a double hash or rehashing strategy is adopted: first, try to increase k by 1 (i.e., take the first k+1 bytes), recalculate the digest of all processed codes, until the collision disappears.
[0081] If increasing the number of bytes causes the column index range to exceed the preset maximum value (e.g., exceeding 2), 32 If the matrix index is not found to be a coloring code, a linked list method is used instead: a linked list is maintained at the matrix column index to store all the coloring codes mapped to that index. However, during matrix filling, if any of the codes appears in a time slot, the cell is marked as 1 (i.e., considered a synonym code). To maintain semantic distinguishability, the present invention prefers the former method of extending the number of bytes to ensure a one-to-one correspondence between the column index and the coloring code.
[0082] S3.4: Traverse each time slot, collect all on-chain fingerprints whose timestamps fall within the range of the time slot, and collect all the color codes associated with the on-chain fingerprints to form the code set of the time slot.
[0083] S3.5: For the row where the current time slot is located in the temporal-semantic joint matrix, if the color code represented by a certain column appears in the code set collected by the time slot, the corresponding position is marked as 1, otherwise it is marked as 0; at the same time, establish and save the mapping relationship between each time slot and all on-chain fingerprints contained therein.
[0084] In its implementation, this invention employs a sparse padding strategy based on set membership testing. First, a two-dimensional sparse matrix representation is initialized, for example, using a row-first compressed sparse row (CSR) format or a dictionary of dictionaries (DOD). For each time slot i, a deduplicated set of all colored codes within the slot is obtained. Then, for each colored code c in this set, the column index j is obtained through the forward mapping established in S3.3, and the value at position (i, j) in the matrix is set to 1. It is not necessary to traverse all columns. After padding, the matrix is stored in a sparse format, significantly saving memory, and the number of non-zero elements in each time slot (i.e., the number of different code types within that slot) is recorded.
[0085] After all fingerprints have been assigned, iterate through each time slot (i from 0 to ...). The deduplication set of all colored codes within each slot is transformed from a hash set into an ordered list (sorted lexicographically by encoded string or by column index) to facilitate quick determination of whether a column belongs to the set during subsequent matrix filling. Simultaneously, the size of the set of all on-chain fingerprints for each time slot and the size of the deduplication set of all colored codes within that slot are recorded. For time slots with no fingerprints (empty slots), the deduplication set of all colored codes is empty.
[0086] S3.6: For two adjacent time slots, perform a bitwise XOR operation on the corresponding row vectors to obtain the difference vector, count the number of 1s in the difference vector, and use it as the inertia vector value of the next time slot.
[0087] The first time slot has no predecessor, so it does not generate an inertial vector.
[0088] Specifically, in this embodiment of the invention, since the temporal-semantic joint matrix is stored in a sparse format, each row is actually a mapping (or set) from column index to value (1). For two adjacent time slots and Let row vectors be denoted as . and The corresponding encoding sets are respectively and The XOR operation of two row vectors corresponds to a symmetric difference set:
[0089] That is, the encoding that appears in one set but not in both sets at the same time.
[0090] The number of 1s in the difference vector is the size of the symmetric difference set.
[0091] Furthermore, the method for calculating this size is as follows: first calculate the size of the intersection of the two sets. Then the size of the symmetric difference set is .
[0092] Since the encoding set for each time slot has been stored, it can be retrieved directly. and The intersection size is calculated by traversing the smaller set and performing member tests in the other set, with a time complexity of O(n log n). .
[0093] Ideally, the calculated size of the symmetric difference set is denoted as... As the first Time slots ( The inertial vector value is ≥1).
[0094] The inertia vector value is a non-negative integer, representing the number of different codes whose semantic composition changes from the previous time slot to the current time slot. A larger value indicates a more drastic change.
[0095] Inertia vector value and time slot number Associative storage forms an inertial vector sequence. The first time slot ( =0) There is no predecessor, and no inertial vector is generated.
[0096] At the same time, each inertial vector value is written into a time series database.
[0097] As can be seen, this invention compresses the complex semantic evolution path into a one-dimensional non-negative integer sequence. Compared with traditional time series analysis based on bag-of-words or topic models, this invention does not require probabilistic inference or dimensionality reduction of semantics. It directly uses the set change of color coding to measure the degree of mutation of the appeal content, resulting in low computational complexity and strong interpretability. At the same time, the matrix adopts sparse storage and uses the symmetric difference formula to quickly calculate the inertia vector, which can process large-scale customer appeal streams in real time, laying an efficient computational foundation for subsequent online mutation detection.
[0098] S4: The edge computing node compares the inertial vectors of adjacent time slots, outputs a warning signal when a non-overlapping mutation occurs in the vector pattern, and locates the mutated node by backtracking based on the on-chain fingerprint.
[0099] S4.1: When an edge computing node starts up or resets, it creates a hash set in memory as a historical pattern set. This set is initially empty and is used to store the inertia vector values (integer values) that have appeared.
[0100] To prevent the set from growing indefinitely, a maximum capacity can be set for the historical pattern set (e.g., storing the most recent 1000 distinct values) or a variant of the Bloom filter with time decay can be used. However, this invention preferably retains all historical values because the inertial vector value range is typically finite (from 0 to the total number of color codes), preventing memory overflow. Simultaneously, a double-ended queue is maintained to record the K most recent inertial vector values and their corresponding time slot numbers for subsequent sliding window analysis (as an optional extension). Furthermore, the historical pattern set recorded in previous runs should be restored from persistent storage (if breakpoint resumption is supported) to avoid repeatedly alerting to previously seen patterns after a restart.
[0101] Furthermore, the generated inertial vector sequence is processed sequentially according to the time slot order. Let the current time slot number be... ( ≥1), the inertial vector value is Previous time slot The inertial vector value is The system calculates the difference. .
[0102] when If the value is less than the preset absolute lower threshold, the proportional condition cannot be used reasonably. In this case, the absolute lower threshold will be used for judgment. like If the value is less than the absolute lower limit threshold, it is considered to meet the change condition; otherwise, it is not considered to meet the change condition.
[0103] In particular, when and If the value is less than the absolute lower limit threshold, it is not considered a mutation candidate; if the current value is the first inertial vector (i.e. If ), then it does not exist. Skip all judgments and only... Add it to the historical pattern set and record the difference corresponding to each inertia vector.
[0104] It should be noted that all calculations are performed using 64-bit integers to prevent overflow.
[0105] S4.2: If the difference is greater than n times the previous value and the current value is not in the historical pattern set, then the vector pattern of the current time slot is determined to have undergone a non-overlapping mutation; when a non-overlapping mutation is determined to have occurred, the edge computing node outputs a warning signal, including the identifier of the current time slot and the absolute value of the difference.
[0106] Specifically, for each non-first inertial vector ( ≥2) Perform the following joint decision: First, calculate the difference. and check Whether it is valid, among which The preset coefficient (preferred in the embodiments of the present invention) =2 indicates that the change exceeds 200% of the previous value.
[0107] To account for cases where the previous value is very small, an absolute lower threshold is set (e.g., 5): If... If the value is less than the absolute lower limit threshold, then the multiple condition is replaced with... Greater than the absolute lower limit threshold (i.e., an absolute change exceeding the absolute lower limit threshold is considered significant).
[0108] Secondly, system check Does it exist in the set of historical patterns? Only if the above change conditions are met and If it exists, determine the current time slot. A non-overlapping abrupt change occurred. That is, the current inertia vector value has undergone a drastic jump compared to the previous value, and this new value has never appeared before, indicating that the semantic evolution path of the claim has entered a completely new mode region. If It already exists in the historical pattern set, and even if the changes are drastic, it will not trigger an alert because the pattern has already been identified by the system (e.g., periodic fluctuations).
[0109] Furthermore, when a non-overlapping mutation is detected, the edge computing node constructs an early warning message. This message contains at least the following fields: time slot sequence number or the start and end time string of the time slot, in ISO 8601 format, and the absolute value of the difference. Current inertia vector value Previous value ), the system time when the warning was generated.
[0110] Warning signals can be output to multiple channels, such as writing to local log files, pushing to message queues (such as Kafka), sending to the operation and maintenance monitoring system by calling the Webhook interface, or notifying the administrator via email / SMS.
[0111] After output, Add the alert to the historical pattern set (it should be added regardless of whether an alert is triggered, as the value is now historical). Simultaneously, the system records detailed information about this alert to persistent storage for subsequent auditing and analysis.
[0112] S4.3: When determining the time slot After a non-overlapping mutation occurs, immediately query the on-chain fingerprint list corresponding to the time slot from the persistent mapping relationship.
[0113] The mapping relationship uses the time slot number (or start and end time string) as the primary key and is stored in a separate key-value store or relation table. It returns a string array containing the on-chain fingerprints of all claiming nodes within the time slot.
[0114] If the number of fingerprints in a given time slot is large (e.g., more than 1000), the fingerprint list can be sampled or filtered based on the direction of mutation (new coding type): by comparing the coding set of the current time slot with that of the previous time slot, only those fingerprints containing new coding (appearing in...) can be retained. But not in (The fingerprints in the middle) can be used to narrow down the scope of the backtracking.
[0115] For each on-chain fingerprint (or a filtered subset) obtained, the query interface of the edge node index table is called to retrieve the corresponding storage record using the on-chain fingerprint as the key.
[0116] Extract the text content of the parent appeal identifier and all semantic fragments from the record.
[0117] Optionally, to aid analysis, the degree of difference between each claim node and the historical baseline can be calculated: for example, how many types of color codes (i.e., mutation codes) appear for the first time in the current time slot are included in the node. These mutated nodes are then sorted from highest to lowest degree of difference to form a retrospective report.
[0118] Each node entry in the report includes the parent claim identifier, on-chain fingerprint, original timestamp of the claim, a list of mutation coloring codes, and its corresponding semantic fragment text. This backtracking report can be output as supplementary data for early warning signals or stored in a dedicated backtracking results database. Operations personnel can use this report to directly locate the specific customer claim that triggered the mutation and its key semantic fragments.
[0119] It should be noted that, in this embodiment of the invention, the edge computing node maintains a set of historical patterns. By comparing the difference in inertia vectors between adjacent time slots and jointly determining with the historical patterns, an alert is triggered only when the change exceeds a multiple of the previous value and the current inertia vector value has never appeared before. This effectively filters periodic fluctuations and common fluctuation patterns, achieving accurate identification of non-overlapping mutations. Once an alert is triggered, the pre-established mapping relationship between time slots and on-chain fingerprints is used to quickly locate all relevant on-chain fingerprints within that time slot. The specific semantic fragment text and color coding are traced back through off-chain indexes. It can even be filtered and sorted by mutation coding, enabling operations and maintenance personnel to directly locate the specific customer request that caused the mutation and its key semantic fragments, avoiding blindly searching through massive logs and significantly improving the efficiency of problem tracing.
[0120] This invention also includes a customer demand evolution path tracking and early warning system that combines knowledge graphs, comprising: The request coloring module obtains the customer's request text, splits the request text into semantic fragments, and colors and encodes each semantic fragment to generate a colored data stream carrying the parent request identifier and timestamp. The on-chain evidence storage module uploads the atomic information of the claim in the colored data stream to the blockchain main chain to form an on-chain fingerprint, while storing the semantic fragment content and the corresponding colored code in the off-chain edge node. The temporal matrix module constructs a temporal-semantic joint matrix based on the on-chain fingerprint, records the occurrence status of each stained code in each time slot, and generates the inertia vector of the current path; The mutation backtracking module compares the inertial vectors of adjacent time slots using edge computing nodes. When a non-overlapping mutation occurs in the vector pattern, it outputs a warning signal and locates the mutated node based on the on-chain fingerprint.
[0121] The system also includes one or more processors and memory.
[0122] The memory is used to store operable instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, including the flow of a customer demand evolution path tracking and early warning method incorporating knowledge graphs as described in the foregoing embodiments, particularly... Figure 1 The flowchart of the method is shown.
[0123] Other aspects disclosed in the embodiments of the present invention also propose a computer-readable medium for storing software including instructions executable by one or more computers, which, upon execution, cause the one or more computers to perform operations including the flow of a customer demand evolution path tracking and early warning method incorporating knowledge graphs as described in the foregoing embodiments, particularly... Figure 1The flowchart of the method is shown.
[0124] It should be recognized that embodiments of the present invention may be implemented or carried out by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable storage medium.
[0125] The method can be implemented using standard programming techniques, including a non-transitory computer-readable storage medium configured with a computer program in the computer program, wherein the storage medium is configured such that the computer operates in a specific and predefined manner.
[0126] Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system; however, if required, the program can be implemented in assembly or machine language.
[0127] In any case, the language can be either compiled or interpreted.
[0128] Furthermore, for this purpose, the program can run on programmed application-specific integrated circuits.
[0129] The processes described herein (or variations and / or combinations thereof) can be executed under the control of one or more computer systems configured with executable instructions, and can be implemented by hardware or a combination thereof as code (e.g., executable instructions, one or more computer programs, or one or more applications) that commonly executes on one or more processors. The computer program includes a plurality of instructions executable by one or more processors.
[0130] Furthermore, the method can be implemented in any suitable computing platform, including but not limited to personal computers, minicomputers, mainframes, workstations, networked or distributed computing environments, standalone or integrated computer platforms, or in communication with charged particle tools or other imaging devices.
[0131] Various aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether portable or integrated into a computing platform, such as a hard disk, optical read and / or write storage medium, RAM, ROM, etc., such that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the processes described herein.
[0132] Furthermore, machine-readable code, or parts thereof, can be transmitted via wired or wireless networks.
[0133] When such media includes instructions or programs that combine with a microprocessor or other data processor to implement the steps described above, the invention described herein includes these and other different types of non-transitory computer-readable storage media.
[0134] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for tracking and early warning of customer demand evolution paths using knowledge graphs, characterized in that: include: Obtain the customer's request text, break the request text into semantic fragments, and color-encode each semantic fragment to generate a colored data stream carrying the parent request identifier and timestamp; The request atomic information in the colored data stream is uploaded to the blockchain main chain to form an on-chain fingerprint, while the semantic fragment content and the corresponding colored code are stored in the off-chain edge node. Based on the on-chain fingerprint, a temporal-semantic joint matrix is constructed to record the occurrence status of each stained code in each time slot and generate the inertia vector of the current path. The edge computing nodes compare the inertial vectors of adjacent time slots, and when a non-overlapping mutation occurs in the vector pattern, an early warning signal is output, and the mutated node is located by backtracking based on the on-chain fingerprint.
2. The customer demand evolution path tracking and early warning method combining knowledge graph as described in claim 1, characterized in that: The process of splitting the appeal text into semantic fragments includes: Obtain the original text of the customer's request, and at the same time obtain the identifier of the parent request node to which the customer's request belongs; If the current customer request is the root request, a fixed root identifier is used; the original text is divided into multiple semantic segments based on punctuation marks and preset conjunctions, and each segment represents an indivisible atomic request unit. Read the system's current precise time and use it as the timestamp for this customer request.
3. The customer demand evolution path tracking and early warning method combining knowledge graphs as described in claim 2, characterized in that: The step of coloring and encoding each semantic segment includes: Each semantic segment obtained from the segmentation is assigned a number according to its order in the original text, starting from 1; The parent appeal identifier, timestamp, sequence number, and text content of the semantic fragment are concatenated into a string and hashed to obtain a unique coloring code for the semantic fragment. All semantic fragments and their corresponding color codes, along with the parent appeal identifier and timestamp, are combined into a single colored data stream. The colorized data stream explicitly records the parent appeal identifier, timestamp, and the correspondence between each semantic segment and the colorization code.
4. The customer demand evolution path tracking and early warning method combining knowledge graphs as described in claim 3, characterized in that: The formation of the on-chain fingerprint includes: Extract the parent claim identifier, along with all semantic fragments and color codes, from the colored data stream; All the colored codes under the parent appeal identifier are concatenated into a long string according to the original order of the fragments, and a hash operation is performed to generate the appeal atomic information of the parent appeal node; The request's atomic information will be uploaded as a record to the main blockchain chain; After the blockchain system completes the processing, it returns a transaction hash value, which is used as the on-chain fingerprint of the parent request node.
5. The customer demand evolution path tracking and early warning method combining knowledge graphs as described in claim 4, characterized in that: The storage in the off-chain edge nodes includes: Each semantic segment in the colored data stream, its corresponding colored code, and timestamp, along with the on-chain fingerprint, are sent to a designated off-chain edge node for persistent storage. During storage, all semantic fragments, color codes, and timestamps under the same parent claim identifier are stored together, using the parent claim identifier as the unit. Create an index table in the off-chain edge nodes with the on-chain fingerprint as the primary key.
6. The customer demand evolution path tracking and early warning method combining knowledge graph as described in claim 5, characterized in that: The construction of the temporal-semantic joint matrix includes: For the cycle All on-chain fingerprints collected internally are retrieved one by one through the index table of off-chain edge nodes to find the timestamp and all color codes corresponding to each on-chain fingerprint; The retrieved timestamps are divided into consecutive time slots according to a pre-defined time length, and each time slot corresponds to a row in the time-semantic joint matrix. Perform a hash digest operation on each of the color codes that appear; The first few bytes of the hash value obtained by row hash digest operation are used as the digest value, and the digest value is used as the column index of the temporal-semantic joint matrix; Each column uniquely corresponds to a coloring code.
7. The customer demand evolution path tracking and early warning method combining knowledge graphs as described in claim 6, characterized in that: The inertia vector for generating the current path includes: Traverse each time slot, collect all on-chain fingerprints whose timestamps fall within the range of the time slot, and collect all the color codes associated with the on-chain fingerprints to form the code set of the time slot; For the row where the current time slot is located in the temporal-semantic joint matrix, if the coloring code represented by a certain column appears in the code set collected by the time slot, the corresponding position is marked as 1, otherwise it is marked as 0; at the same time, the mapping relationship between each time slot and all on-chain fingerprints contained therein is established and saved. For two adjacent time slots, perform a bitwise XOR operation on the corresponding row vectors to obtain the difference vector; The number of 1s in the statistical difference vector is used as the inertia vector value for the next time slot; The first time slot has no predecessor, so it does not generate an inertial vector.
8. The customer demand evolution path tracking and early warning method combining knowledge graph as described in claim 7, characterized in that: When an edge computing node starts up, it establishes a historical pattern set, which is initially empty and is used to record the inertial vector values that have appeared.
9. The customer demand evolution path tracking and early warning method combining knowledge graph as described in claim 8, characterized in that: The inertial vectors of the compared adjacent time slots include: The inertia vector value of the current time slot is denoted as the current value; the inertia vector value of the previous time slot is denoted as the previous value, and the difference between the two is calculated. If the current one is the first inertial vector, then skip the subsequent decisions; If the difference is greater than n times the previous value and the current value is not in the historical pattern set, then it is determined that the vector pattern of the current time slot has undergone a non-overlapping mutation. When a non-overlapping mutation is detected, the edge computing node outputs a warning signal; The warning signal includes the identifier of the current time slot and the absolute value of the difference; Based on the time slot of the mutation, obtain all on-chain fingerprints corresponding to the time slot from the mapping relationship; For each on-chain fingerprint, the corresponding semantic fragment and color code are retrieved using the index table of off-chain edge nodes, and the parent request node that has mutated is located.
10. A customer demand evolution path tracking and early warning system combining knowledge graphs, based on the customer demand evolution path tracking and early warning method combining knowledge graphs as described in any one of claims 1 to 9, characterized in that: Also includes: The request coloring module obtains the customer's request text, splits the request text into semantic fragments, and colors and encodes each semantic fragment to generate a colored data stream carrying the parent request identifier and timestamp. The on-chain evidence storage module uploads the atomic information of the claim in the colored data stream to the blockchain main chain to form an on-chain fingerprint, while storing the semantic fragment content and the corresponding colored code in the off-chain edge node. The temporal matrix module constructs a temporal-semantic joint matrix based on the on-chain fingerprint, records the occurrence status of each stained code in each time slot, and generates the inertia vector of the current path; The mutation backtracking module compares the inertial vectors of adjacent time slots using edge computing nodes. When a non-overlapping mutation occurs in the vector pattern, it outputs a warning signal and locates the mutated node based on the on-chain fingerprint.
