Message retrieval methods, devices, electronic equipment and storage media
By introducing index files into Hadoop, the target signaling message can be quickly located based on its timestamp and data identifier, solving the problem of low efficiency in signaling message storage and retrieval, and improving the user experience.
Patent Information
- Application Number
- CN202210347747.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-04-01
AI Technical Summary
In existing technologies, Hadoop is inefficient in storing and retrieving signaling messages, resulting in a poor user experience, especially when dealing with large amounts of data, as it consumes excessive CPU and memory.
An index file is introduced. By using the timestamp and data identifier of the external data representation data, the target index file and the message file to be retrieved are determined, and the signaling message is quickly located using the index information.
It improves the efficiency of signaling message retrieval, reduces data space usage, and enhances the user experience.
Smart Images

Figure CN114722004B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communication network technology, and in particular to a message retrieval method, apparatus, electronic device and storage medium. Background Technology
[0002] With the continuous development of communication technology, staff often need to perform business analysis work using a large number of signaling messages generated between network elements. Therefore, Hadoop, a distributed file system used to store large amounts of signaling messages, plays an important role in this process.
[0003] In existing solutions, when conducting business analysis, customers first need to query relevant signaling message data using Hadoop, and then retrieve the corresponding signaling messages based on this data. However, Hadoop not only consumes a large amount of CPU and memory when storing signaling messages, but also affects the retrieval of signaling messages as the data space usage increases. This results in low efficiency in both storing and retrieving signaling messages, severely impacting the user experience. Summary of the Invention
[0004] This invention provides a message retrieval method, apparatus, electronic device, and storage medium. By introducing an index file, it not only solves the problem of large data space occupation caused by the large amount of signaling message data, but also improves the retrieval efficiency of signaling messages and the user experience.
[0005] In a first aspect, embodiments of the present invention provide a message retrieval method, the method comprising:
[0006] Based on the detected triggering operation, determine the target external data representation data;
[0007] When a message retrieval instruction is received, the target index file and the target message file to be retrieved are determined based on the timestamp corresponding to the target external data representation data.
[0008] Based on the data identifier corresponding to the target external data representation data, target index information is determined from the target index file, and at least one target signaling message is determined from the target message file to be retrieved based on the target index information.
[0009] Secondly, embodiments of the present invention also provide a message retrieval device, the device comprising:
[0010] The target external data representation determination module is used to determine the target external data representation data based on the detected triggering operation.
[0011] The target index file determination module is used to determine the target index file and the target message file to be retrieved based on the timestamp corresponding to the target external data representation data when a message retrieval instruction is received.
[0012] The target signaling message determination module is used to determine target index information from the target index file based on the data identifier corresponding to the target external data representation data, and to determine at least one target signaling message from the target message file to be retrieved based on the target index information.
[0013] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0014] one or more processors;
[0015] Storage device for storing one or more programs.
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the message retrieval method as described in any of the embodiments of the present invention.
[0017] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the message retrieval method as described in any of the embodiments of the present invention.
[0018] The technical solution of this invention determines the target external data representation data, i.e., the XDR data to be analyzed, based on the detected trigger operation. When a message retrieval instruction is received, the target index file and the target message file to be retrieved are determined based on the timestamp corresponding to the target external data representation data. Furthermore, the target index information is determined from the target index file based on the data identifier corresponding to the target external data representation data, and at least one target signaling message is determined from the target message file to be retrieved based on the target index information. In the process of storing and retrieving signaling messages, by introducing an index file, not only is the problem of large data space occupation caused by the large amount of signaling message data solved, but it is also conducive to quickly locating the content of the signaling message, improving the retrieval efficiency of signaling messages and the user experience. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of exemplary embodiments of the present invention, the accompanying drawings used in describing the embodiments are briefly introduced below. Obviously, the accompanying drawings described are only a portion of the drawings of the embodiments to be described in this invention, and not all of the drawings. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort.
[0020] Figure 1 This is a flowchart illustrating a message retrieval method provided in Embodiment 1 of the present invention;
[0021] Figure 2 This is a schematic diagram of the signaling message storage principle provided in Embodiment 2 of the present invention;
[0022] Figure 3 This is a schematic diagram of the signaling message retrieval principle provided in Embodiment 2 of the present invention;
[0023] Figure 4 This is a structural block diagram of a message retrieval device provided in Embodiment 3 of the present invention;
[0024] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation
[0025] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0026] Example 1
[0027] Figure 1 This is a flowchart illustrating a message retrieval method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where a large number of signaling messages are stored and retrieved. The method can be executed by a message retrieval device, which can be implemented in the form of software and / or hardware. The hardware can be an electronic device, such as a mobile terminal, a PC, or a server.
[0028] like Figure 1 As shown, the method specifically includes the following steps:
[0029] S110. Based on the detected trigger operation, determine the target external data representation data.
[0030] In this embodiment, the system can detect user-triggered operations and determine whether a signaling message retrieval operation needs to be performed. For example, a signaling message retrieval control is pre-developed within the system. When the system detects that a user clicks on this control, the subsequent signaling message retrieval operation can be performed according to the scheme of this embodiment.
[0031] In this embodiment, signaling data packets generated by each network element device are first acquired according to a preset time interval. Then, a message file to be retrieved corresponding to each time period and at least one external data representation method are generated based on the signaling data packets. The signaling data packets contain a large number of signaling messages, which can be request and response messages associated with one or more sessions. For example, when the preset time interval is five seconds, the system needs to use the signaling acquisition module to acquire signaling data packets between network elements devices every five seconds in a splitting or mirroring manner. Of course, in practical applications, the system can also acquire signaling messages generated between network elements devices in real time; this will not be elaborated further in this embodiment.
[0032] Furthermore, the system can use the acquired signaling data packets as a data foundation to generate a message file to be retrieved and external data representation data. The message file to be retrieved is a file containing the specific content of request and response messages. The external data representation data is XDR (X Data Recording) data. Specifically, XDR evolved from Call Data Recording (CDR). It can be understood that CDR is a record of key network information during a call in traditional communication networks. Correspondingly, XDR, as an extension of the CDR concept, broadly refers to the record of key information about data traffic in mobile networks and bearer networks, i.e., traffic logs. When using user sessions as a unit, one session can form one XDR record. Furthermore, because the field format and number of fields in XDR documents are relatively uniform, the system can store the generated XDR documents in Hadoop to support various upper-layer applications. Specifically, when generating the aforementioned message files to be retrieved and external data representation data, signaling data packets can be parsed, and message files to be retrieved corresponding to each time period can be generated based on the parsed signaling messages; according to the session identifier carried by each signaling message, signaling messages belonging to the same session can be associated separately; target fields can be extracted from each signaling message, and multiple target fields can be integrated according to the association relationship between each signaling message to obtain at least one external data representation data.
[0033] For example, the system can pre-allocate a certain amount of storage space (e.g., 200MB) in the operating system's memory using the signaling message storage module, and then manage file handles according to a certain time granularity (e.g., 5 minutes). Based on this, after acquiring signaling data packets, the system can use the message decoding module to decode the signaling messages, determine each request message and response message, and then store these signaling messages in the storage space corresponding to the file handles within the aforementioned time period. Simultaneously, the system can use the message association module to associate request messages and response messages belonging to the same session, and extract the target fields from each associated message into the XDR document. For example, the determined device IP address, port number, serial number, and user location information can be extracted into the XDR document. Further, after assigning a unique identifier (XDR ID) to the XDR document, it can be sent to the document storage module for storage. It should be noted that the timestamp in the XDR document is obtained from the signaling message associated with generating the XDR document. It is also understood that the corresponding message file to be retrieved also carries the XDR ID and timestamp, which will not be described in detail in this embodiment.
[0034] In this embodiment, after generating the message file to be retrieved and at least one XDR data, the system also needs to establish a corresponding index file based on the timestamp and data length corresponding to the target external data representation data, and establish a message file corresponding to the index file based on at least one signaling message. When a message retrieval instruction is received, the system determines the target index file based on the retrieval time corresponding to the message retrieval instruction, and then retrieves at least one target signaling message from the corresponding message file based on the index information in the target index file. The index information includes the timestamp, data identifier, signaling data length, and the offset of the starting storage position of the signaling data within the corresponding storage space. This can be understood as follows: after storing the signaling message in the storage space corresponding to the file handle, the system can also confirm and record its data packet length and the offset of the starting storage position within that storage space. Furthermore, by combining the XDR ID and the timestamp, the index file can be generated. During the generation of the index file, the index file storage module can also first allocate a certain size of memory space (e.g., 200M) and write the aforementioned attribute information into that space. When the memory is full, the content is then written into the index file. This process can also be understood as constructing corresponding index information based on the timestamp and data length of at least one external data representation. It should be noted that when generating the index file, the system can also sort the index information according to the timestamp; and generate index files corresponding to each time period based on the sorted index information. The advantage of this approach is that in subsequent message retrieval processes, the index content in the index file can be quickly located using a fast search method.
[0035] In this embodiment, after the XDR document, the message file to be retrieved, and the index file are stored in the manner described above, when a specific signaling message is retrieved according to user needs, the system can determine the retrieval time information or retrieval identification information based on the detected trigger operation; and determine the target external data representation data from the data storage module based on the retrieval time information or retrieval identification information. For example, the system can determine the target XDR document to be analyzed in the XDR document database based on the retrieval time information input by the user through a web application, and then perform subsequent message retrieval operations based on the XDR ID and timestamp carried by the data.
[0036] S120. When a message retrieval instruction is received, the target index file and the target message file to be retrieved are determined based on the timestamp corresponding to the target external data representation data.
[0037] In this embodiment, when a message retrieval instruction is received, the system can determine the XDR ID and timestamp carried by the target XDR data. At the same time, it determines the target time period based on the timestamp corresponding to the target external data representation data. It then determines the target index file corresponding to the target time period from the storage space and the target message file to be retrieved corresponding to the target time period from the internal memory.
[0038] For example, once the timestamp carried by the target XDR data is determined, the time period it represents can be determined based on the timestamp. Further, the target index file is determined based on the retrieval time corresponding to the retrieval command, and then the message file corresponding to the index file is determined. It can be understood that once the above two types of files corresponding to the XDR document are determined, the subsequent message retrieval operation is also a drill-down analysis operation targeting the XDR document. Those skilled in the art should understand that this operation is an analysis operation in a data warehouse, that is, based on a specific XDR document, descending along a specific attribute dimension to obtain more detailed data. In this embodiment, through drill-down analysis of the target XDR document, the corresponding signaling messages can be displayed to staff in a visual form, thereby facilitating staff to solve specific problems or optimize the network based on the parsed signaling messages.
[0039] S130. Based on the data identifier corresponding to the target external data representation data, determine the target index information from the target index file, and determine at least one target signaling message from the target message file to be retrieved based on the target index information.
[0040] In this embodiment, after determining the target message file to be retrieved and the target index file based on the timestamp carried by the target XDR document, the target index file can be traversed according to the XDR ID of the target XDR document. Optionally, the target signaling data length and the target starting storage location offset are determined based on the target index information; based on the target signaling data length and the target starting storage location offset, the signaling data position is determined from the target message file to be retrieved, and the data at the signaling data position is decoded to obtain at least one target signaling message.
[0041] Specifically, after the web application sends a message retrieval request to the message retrieval module, the module determines the target index file based on the timestamp carried by the target XDR document. After loading this file into memory, the module can determine the corresponding data packet length and starting storage location offset within the index content based on the XDR ID of the target XDR document. Simultaneously, the target message file to be retrieved is loaded into memory, and the target signaling message can be located based on the determined data packet length and starting storage location offset. Finally, the message interpretation module can convert the signaling message content into a readable format and send it to the corresponding web client for user viewing.
[0042] The technical solution of this embodiment determines the target external data representation data, i.e., the XDR data to be analyzed, based on the detected trigger operation. When a message retrieval instruction is received, the target index file and the target message file to be retrieved are determined based on the timestamp corresponding to the target external data representation data. Furthermore, the target index information is determined from the target index file based on the data identifier corresponding to the target external data representation data, and at least one target signaling message is determined from the target message file to be retrieved based on the target index information. In the process of storing and retrieving signaling messages, by introducing an index file, not only is the problem of large data space occupation caused by the large amount of signaling message data solved, but it is also conducive to quickly locating the content of the signaling message, improving the retrieval efficiency of signaling messages and the user experience.
[0043] Example 2
[0044] As an optional embodiment of the above embodiments, Figure 2 This is a schematic diagram of the signaling message storage principle provided in Embodiment 2 of the present invention. Figure 3 This is a schematic diagram illustrating the signaling message retrieval principle provided in Embodiment 2 of the present invention. To clearly illustrate the technical solution of this embodiment, an example can be given of a scenario involving the storage and retrieval of a large number of signaling messages. However, this is not limited to the above scenario and can be applied to various scenarios requiring the retrieval of signaling messages generated between network elements.
[0045] See Figure 2 The signaling message storage process involves the system's data acquisition module, message decoding module, message association module, document storage module, database, signaling message output module, signaling message storage module, and index file storage module. The following section describes the signaling message storage process in conjunction with these modules.
[0046] See also Figure 2 The data acquisition module can collect signaling data packets generated between network elements via optical splitting or mirroring. The message decoding module decodes the collected signaling messages to obtain key fields. Furthermore, the message association module can associate request and response messages belonging to the same session based on the signaling identifiers within the signaling messages. It extracts key fields from the request and response messages into an XDR document, assigns a unique identifier (XDR ID) to this XDR document, and sends the XDR document to the document storage module. The request and response messages, tagged with the XDR ID, are then sent to the signaling message output module. To ensure consistency in the storage lifecycle of message files and index files, the signaling message output module is responsible for the unified management of signaling message storage and index file storage. To improve storage speed, the signaling message storage module first requests a certain amount of storage space, and then manages file handles according to a certain time granularity. After receiving a signaling message with an XDR ID and a timestamp from the message association module, the message storage module first locates the file handle of the time granularity based on the message's timestamp, stores the message in the storage space corresponding to the file handle, records the message and data packet length and the starting position offset of the storage space, and then sends the message's XDR ID, timestamp, data packet length, and position offset to the index file storage module.
[0047] See also Figure 2 Once the index file storage module receives the above information, it can store it in the corresponding index file. To improve storage speed, the index file storage module can also first allocate a certain amount of memory space, write the content to be stored into that memory, and then write the memory content to the index file when the memory is full. To improve retrieval speed, in practical applications, the index content can be sorted by message timestamps and saved before the index file is closed, so that the content of the index file can be quickly located using a fast search method when searching the index file content.
[0048] See Figure 3 The signaling message retrieval process involves the system's database, message interpretation module, and message retrieval module. The following section will combine these components... Figure 3 The above process will be explained in detail.
[0049] See also Figure 3 When a user retrieves the required XDR document from the database using the web application based on query criteria, the system can perform drill-down analysis on the XDR document for which signaling messages need to be retrieved. Specifically, after the web application sends a signaling retrieval request to the message retrieval module, the module can locate the corresponding index file based on the timestamp carried in the request. After loading the index file into memory, a fast lookup method is used to retrieve the data packet length and position offset of the corresponding XDR ID. Simultaneously, the message retrieval module can load the message file into memory, and further, based on the position offset and data packet length, retrieve at least one target signaling message. Finally, the message interpretation module can convert the message content into a readable format and send it to the corresponding web application for user viewing.
[0050] The beneficial effects of the above technical solution are as follows: In the process of storing and retrieving signaling messages, by introducing index files, not only is the problem of large data space occupation caused by the large amount of signaling message data solved, but it is also conducive to quickly locating the content of signaling messages, improving the retrieval efficiency of signaling messages and the user experience.
[0051] Example 3
[0052] Figure 4 This is a structural block diagram of a message retrieval device provided in Embodiment 3 of the present invention. It can execute the message retrieval method provided in any embodiment of the present invention, and possesses the corresponding functional modules and beneficial effects of the method. For example... Figure 4 As shown, the device specifically includes: a target external data representation method data determination module 210, a target index file determination module 220, and a target signaling message determination module 230.
[0053] The target external data representation data determination module 210 is used to determine the target external data representation data based on the detected trigger operation.
[0054] The target index file determination module 220 is used to determine the target index file and the target message file to be retrieved based on the timestamp corresponding to the target external data representation data when a message retrieval instruction is received.
[0055] The target signaling message determination module 230 is used to determine target index information from the target index file based on the data identifier corresponding to the target external data representation data, and to determine at least one target signaling message from the target message file to be retrieved based on the target index information.
[0056] Based on the above technical solutions, the message retrieval device also includes a signaling data packet acquisition module and an index file generation module.
[0057] The signaling data packet acquisition module is used to acquire signaling data packets generated by each network element device according to a preset time interval, and generate a message file to be retrieved corresponding to each time period, as well as at least one external data representation data, based on the signaling data packets.
[0058] The index file generation module is used to, upon receiving a message storage instruction, establish a corresponding index file based on the timestamp and data length of the target external data representation data, and establish a message file corresponding to the index file based on at least one signaling message. Upon receiving a message retrieval instruction, the module determines the target index file based on the retrieval time corresponding to the message retrieval instruction, and retrieves the at least one target signaling message from the corresponding message file based on the index information in the target index file. The index information includes a timestamp, data identifier, signaling data length, and the offset of the starting storage location of the signaling data within the corresponding storage space.
[0059] Based on the above technical solutions, the signaling data packet acquisition module includes a message file generation unit to be retrieved, a signaling message association unit, and an external data representation data generation unit.
[0060] The message file generation unit is used to parse the signaling data packets and generate a message file to be retrieved corresponding to each time period based on the parsed signaling messages, wherein the signaling messages include request messages and response messages.
[0061] The signaling message association unit is used to associate signaling messages belonging to the same session according to the session identifier carried by each signaling message.
[0062] An external data representation data generation unit is used to extract target fields from each signaling message and integrate multiple target fields according to the correlation between each signaling message to obtain at least one external data representation data.
[0063] Based on the above technical solutions, the index file generation module includes an index information construction unit and an index file generation unit.
[0064] The index information construction unit is used to construct corresponding index information based on the timestamp and data length corresponding to the at least one external data representation data, and to sort each index information according to the timestamp.
[0065] The index file generation unit is used to generate index files corresponding to each time period based on the sorted index information.
[0066] Based on the above technical solutions, the target external data representation method data determination module 210 includes a trigger operation detection unit and a target external data representation method data determination unit.
[0067] The trigger operation detection unit is used to determine retrieval time information or retrieval identification information based on the detected trigger operation.
[0068] The target external data representation data determination unit is used to determine the target external data representation data from the data storage module based on the retrieval time information or the retrieval identification information.
[0069] Based on the above technical solutions, the target index file determination module 220 includes a target time period determination unit and a target index file determination unit.
[0070] The target time period determination unit is used to determine the target time period based on the timestamp corresponding to the target external data representation data.
[0071] The target index file determination unit is used to determine the target index file corresponding to the target time period from the storage space, and to determine the target message file to be retrieved corresponding to the target time period from the internal memory.
[0072] Based on the above technical solutions, the target signaling message determination module 230 includes an attribute information determination unit and a target signaling message determination unit.
[0073] The attribute information determination unit is used to determine the target signaling data length and the target starting storage location offset based on the target index information.
[0074] The target signaling message determination unit is used to determine the signaling data position from the target message file to be retrieved based on the target signaling data length and the target starting storage position offset, and to decode the data at the signaling data position to obtain the at least one target signaling message.
[0075] The technical solution provided in this embodiment determines the target external data representation data, i.e., the XDR data to be analyzed, based on the detected trigger operation. When a message retrieval instruction is received, the target index file and the target message file to be retrieved are determined based on the timestamp corresponding to the target external data representation data. Furthermore, the target index information is determined from the target index file based on the data identifier corresponding to the target external data representation data, and at least one target signaling message is determined from the target message file to be retrieved based on the target index information. In the process of storing and retrieving signaling messages, by introducing an index file, not only is the problem of large data space occupation caused by the large amount of signaling message data solved, but it is also conducive to quickly locating the content of the signaling message, improving the retrieval efficiency of signaling messages and the user experience.
[0076] The message retrieval device provided in the embodiments of the present invention can execute the message retrieval method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0077] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of the present invention.
[0078] Example 4
[0079] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 5 A block diagram is shown of an exemplary electronic device 30 suitable for implementing embodiments of the present invention. Figure 5 The electronic device 30 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0080] like Figure 5 As shown, the electronic device 30 is presented in the form of a general-purpose computing device. The components of the electronic device 30 may include, but are not limited to: one or more processors or processing units 301, system memory 302, and bus 303 connecting different system components (including system memory 302 and processing unit 301).
[0081] Bus 303 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0082] Electronic device 30 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 30, including volatile and non-volatile media, removable and non-removable media.
[0083] System memory 302 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 304 and / or cache memory 305. Electronic device 30 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 306 may be used to read and write non-removable, non-volatile magnetic media (… Figure 5 Not shown; usually referred to as a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 303 via one or more data media interfaces. Memory 302 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0084] A program / utility 308 having a set (at least one) of program modules 307 may be stored, for example, in memory 302. Such program modules 307 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 307 typically perform the functions and / or methods described in the embodiments of the present invention.
[0085] Electronic device 30 can also communicate with one or more external devices 309 (e.g., keyboard, pointing device, display 310, etc.), and with one or more devices that enable a user to interact with the electronic device 30, and / or with any device that enables the electronic device 30 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 311. Furthermore, electronic device 30 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 312. As shown, network adapter 312 communicates with other modules of electronic device 30 via bus 303. It should be understood that, although... Figure 5 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 30, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0086] The processing unit 301 executes various functional applications and data processing by running programs stored in the system memory 302, such as implementing the message retrieval method provided in the embodiments of the present invention.
[0087] Example 5
[0088] Embodiment 5 of the present invention also provides a storage medium containing computer-executable instructions, which are used to perform a message retrieval method when executed by a computer processor.
[0089] The method includes:
[0090] Based on the detected triggering operation, determine the target external data representation data;
[0091] When a message retrieval instruction is received, the target index file and the target message file to be retrieved are determined based on the timestamp corresponding to the target external data representation data.
[0092] Based on the data identifier corresponding to the target external data representation data, target index information is determined from the target index file, and at least one target signaling message is determined from the target message file to be retrieved based on the target index information.
[0093] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0094] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable project code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device.
[0095] The project code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0096] Computer project code for performing the operations of embodiments of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The project code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0097] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A message retrieval method, characterized in that, include: Based on the detected triggering operation, target external data representation data is determined, wherein the target external data representation data is a record of key information of data traffic in the network; When a message retrieval instruction is received, the target index file and the target message file to be retrieved are determined based on the timestamp corresponding to the target external data representation data. Based on the data identifier corresponding to the target external data representation data, target index information is determined from the target index file, and at least one target signaling message is determined from the target message file to be retrieved based on the target index information; The signaling data packets generated by each network element device are obtained according to a preset time interval, and a message file to be retrieved corresponding to each time period and at least one external data representation data are generated based on the signaling data packets. When a message storage instruction is received, an index file is created based on the timestamp and data length corresponding to the target external data representation data, and a message file corresponding to the index file is created based on at least one signaling message. When a message retrieval instruction is received, the target index file is determined based on the retrieval time corresponding to the message retrieval instruction, and the at least one target signaling message is retrieved from the corresponding message file based on the index information in the target index file. The index information includes a timestamp, a data identifier, a signaling data length, and the offset of the starting storage location of the signaling data within the corresponding storage space.
2. The method according to claim 1, characterized in that, The process of generating a message file to be retrieved corresponding to each time period based on the signaling data packet, and at least one external data representation data, includes: The signaling data packets are parsed, and a message file to be retrieved corresponding to each time period is generated based on the parsed signaling messages. The signaling messages include request messages and response messages. Based on the session identifier carried by each signaling message, signaling messages belonging to the same session are associated separately; The target fields are extracted from each signaling message, and multiple target fields are integrated according to the correlation between each signaling message to obtain the at least one external data representation data.
3. The method according to claim 1, characterized in that, The step of establishing a corresponding index file based on the timestamp and data length corresponding to the target external data representation data includes: Based on the timestamp and data length corresponding to the at least one external data representation data, construct corresponding index information and sort each index information according to the timestamp; Based on the sorted index information, an index file corresponding to each time period is generated.
4. The method according to claim 1, characterized in that, The step of determining the target external data representation data based on the detected triggering operation includes: Determine the retrieval time information or retrieval identification information based on the detected triggering operation; Based on the retrieval time information or the retrieval identifier information, the target external data representation data is determined from the data storage module.
5. The method according to claim 1, characterized in that, The step of determining the target index file and the target message file to be retrieved based on the timestamp corresponding to the target external data representation data includes: The target time period is determined based on the timestamp corresponding to the target external data representation data. The target index file corresponding to the target time period is determined from the storage space, and the target message file to be retrieved corresponding to the target time period is determined from the internal memory.
6. The method according to claim 3, characterized in that, The step of determining at least one target signaling message from the target message file to be retrieved based on the target index information includes: The target signaling data length and the target starting storage location offset are determined based on the target index information. Based on the target signaling data length and the target starting storage location offset, the signaling data location is determined from the target message file to be retrieved, and the data at the signaling data location is decoded to obtain the at least one target signaling message.
7. A message retrieval device, characterized in that, include: The target external data representation data determination module is used to determine the target external data representation data based on the detected triggering operation, wherein the target external data representation data is a record of key information of data traffic in the network; The target index file determination module is used to determine the target index file and the target message file to be retrieved based on the timestamp corresponding to the target external data representation data when a message retrieval instruction is received. The target signaling message determination module is used to determine target index information from the target index file based on the data identifier corresponding to the target external data representation data, and to determine at least one target signaling message from the target message file to be retrieved based on the target index information; The signaling data packet acquisition module is used to acquire signaling data packets generated by each network element device according to a preset time interval, and generate a message file to be retrieved corresponding to each time period, as well as at least one external data representation data based on the signaling data packets; The index file generation module is used to, upon receiving a message storage instruction, establish a corresponding index file based on the timestamp and data length of the target external data representation data, and establish a message file corresponding to the index file based on at least one signaling message. Upon receiving a message retrieval instruction, the module determines the target index file based on the retrieval time corresponding to the message retrieval instruction, and retrieves the at least one target signaling message from the corresponding message file based on the index information in the target index file. The index information includes a timestamp, data identifier, signaling data length, and the offset of the starting storage location of the signaling data within the corresponding storage space.
8. An electronic device, characterized in that, The electronic device includes: one or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the message retrieval method as described in any one of claims 1-6.
9. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the message retrieval method as described in any one of claims 1-6.
Citation Information
Patent Citations
File content retrieval method and system
CN108460075A