CN111046010A - Log storage method, device, system, electronic equipment and computer readable medium - Google Patents

Log storage method, device, system, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN111046010A
CN111046010A CN201911107564.4A CN201911107564A CN111046010A CN 111046010 A CN111046010 A CN 111046010A CN 201911107564 A CN201911107564 A CN 201911107564A CN 111046010 A CN111046010 A CN 111046010A
Authority
CN
China
Prior art keywords
service
log
storage
service request
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911107564.4A
Other languages
Chinese (zh)
Inventor
孟淑玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201911107564.4A priority Critical patent/CN111046010A/en
Publication of CN111046010A publication Critical patent/CN111046010A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices

Abstract

The disclosure relates to a log storage method, apparatus, system, electronic device and computer readable medium. The method comprises the following steps: receiving a service request, wherein the service request comprises a user identifier and a service identifier; determining a service storage grade according to the user identifier and the service identifier; processing the service request to generate a service log; and sending the service log to a main log memory and/or a backup log memory for storage according to the service storage grade corresponding to the service request. The log storage method, device, system, electronic equipment and computer readable medium can guarantee the integrity of key service log information, reduce the pressure of mass log storage on the storage space of a log analysis server, and improve the security of log storage.

Description

Log storage method, device, system, electronic equipment and computer readable medium
Technical Field
The present disclosure relates to the field of computer information processing, and in particular, to a method, an apparatus, a system, an electronic device, and a computer-readable medium for storing a log.
Background
The data service system comprises a plurality of servers, and the completion of each service needs to be completed by the cooperation of the plurality of servers. As shown in fig. 1, each service processing server generates a log file in the execution process of a certain service flow, so that a large amount of service logs are generated in the environment of large service volume. In the process of storing the log file, a cyclic coverage mode can be adopted, namely when the storage space of the log file is full, the new log file covers the original old log file. However, if a large amount of logs are generated in a period of time, the logs recorded recently are cyclically covered, which is not beneficial to comprehensively acquiring log information and is also not beneficial to fault location. In addition, if the log server fails, the log information is lost, and the failure location is not facilitated.
The prior art includes two schemes:
in the first scheme, in the log file storage process, a cyclic coverage mode can be adopted, that is, when the storage space of the log file is full, the new log file covers the original old log file.
In the second scheme, during the storage process of the log files, a classified storage and cyclic coverage mode can be adopted, that is, when the storage space of each type of log file is full, the new log file of the type covers the original old log file.
In a mass service log system, a large amount of log information may be generated in a short time, thereby causing cyclic coverage of log files. Although the second scheme can alleviate the problem caused by the limited storage space in the first scheme to a certain extent, the second scheme still may cause the loss of important log information, which is not beneficial to fault location.
Therefore, a new log storage method, apparatus, system, electronic device, and computer readable medium are needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present disclosure provides a log storage method, device, system, electronic device and computer readable medium, which can ensure integrity of key service log information, reduce pressure on a storage space of a log analysis server caused by mass log storage, and improve security of log storage.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, a log storage method is provided, which includes: receiving a service request, wherein the service request comprises a user identifier and a service identifier; determining a service storage grade according to the user identifier and the service identifier; processing the service request to generate a service log; and sending the service log to a main log memory and/or a backup log memory for storage according to the service storage grade corresponding to the service request.
In an exemplary embodiment of the present disclosure, storing the service log according to the service storage class corresponding to the service request includes: compressing the service log to generate a compressed log; and sending the compressed log to a main log storage and/or a backup log storage at regular time for storage.
In an exemplary embodiment of the present disclosure, further comprising: acquiring the service type of the service log; and the main log storage and/or the backup log storage stores the service log in a storage area corresponding to the service type.
In an exemplary embodiment of the present disclosure, storing the service log according to the service storage class corresponding to the service request includes: acquiring the service type of the service log; and storing the service log in a storage area corresponding to the service type locally.
In an exemplary embodiment of the present disclosure, further comprising: and when the storage area for storing the service log is full, performing covering storage according to the service priority of the service request and/or the service log generation time.
In an exemplary embodiment of the present disclosure, further comprising: and regularly acquiring the user identification, the service identification and the relation data between the service storage grades by a management server.
According to an aspect of the present disclosure, a log storage device is provided, the device including: a receiving module, configured to receive a service request, where the service request includes a user identifier and a service identifier; the grade module is used for determining a service storage grade according to the user identifier and the service identifier; the processing module is used for processing the service request and generating a service log; and the storage module is used for sending the service log to a main log storage and/or a backup log storage for storage according to the service storage grade corresponding to the service request.
According to an aspect of the present disclosure, there is provided a log storage system, including: the service processing server is used for receiving a service request, wherein the service request comprises a user identifier and a service identifier; determining a service storage grade according to the user identifier and the service identifier; processing the service request to generate a service log; the storage server is used for storing the service log according to the service storage grade corresponding to the service request; wherein the storage server comprises a primary log storage and a backup log storage.
According to an aspect of the present disclosure, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the disclosure, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, carries out the method as above.
According to the log storage method, the log storage device, the log storage system, the electronic equipment and the computer readable medium, determining a service storage grade according to the user identifier and the service identifier; the service log is stored and processed according to the service storage grade corresponding to the service request, so that the integrity of key service log information can be ensured, the pressure of mass log storage on the storage space of a log analysis server is reduced, and the log storage safety is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
FIG. 1 is a schematic block diagram of a prior art journal storage system.
FIG. 2 is a system schematic block diagram illustrating a log storage system in accordance with an exemplary embodiment.
FIG. 3 is a flow chart illustrating a method of log storage according to an exemplary embodiment.
FIG. 4 is a flow chart illustrating a method of log storage according to another exemplary embodiment.
FIG. 5 is a flow chart illustrating a method of log storage according to another exemplary embodiment.
FIG. 6 is a block diagram illustrating a log storage device according to an example embodiment.
FIG. 7 is a block diagram illustrating a log storage system in accordance with another exemplary embodiment.
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 9 is a schematic diagram illustrating a computer-readable storage medium according to an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
FIG. 2 is a system schematic block diagram illustrating a log storage system in accordance with an exemplary embodiment.
As shown in fig. 2, the system architecture 200 may include a client device 201, a request distribution server 202, business processing servers 203, 204, 205, 206, 207, a management server 208, a main log storage 209, a backup log storage 210, a log analysis server 211, and a network 212. A medium through which network 212 provides a communication link between client device 201 and request distribution server 202; the network 212 also serves as a medium for providing communication links between the request distribution server 202 and the service processing servers 203, 204, 205, 206, 207; network 212 is also used to provide a medium for communication links between management server 208, primary log storage 209, backup log storage 210, and log analysis server 211. Network 212 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the client device 201 to interact with the request distribution server 202 over the network 212 to receive or send service requests and the like. The service request may be various types of service requests, such as data type service, video type service, picture type service, and the like.
Various messaging client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the client device 201. The client device 201 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablets, laptop portable computers, desktop computers, and the like.
The request distribution server 202 distributes the service request of the user to one of the service processing servers 203, 204, 205, 206, 207 for processing, and generates a service request processing result and a service log.
Based on the data provided by the management server 208 and the log analysis server 211, the service log is stored in one of the main log memory 209, the backup log storage 210, or the service processing servers 203, 204, 205, 206, 207.
In an embodiment, for example, the storing the service log according to the service storage class corresponding to the service request may specifically include:
the main log memory 209 and/or the backup log storage 210 store and process the service log in real time;
the main log memory 209 and/or the backup log storage 210 perform timed storage processing on the service logs; and
one of the service processing servers 203, 204, 205, 206, 207 performs local storage processing on the service log.
In one embodiment, one service may also need to be completed cooperatively by three service processing servers. Specifically, for example, after receiving the service request message, the service processing server 203 processes the service in the service processing server 203, and after the processing is completed, forwards the service processing result to the service processing server 204, and generates a service log corresponding to the processing procedure in the service processing server 203;
the service processing server 204 receives and processes the service request forwarded by the service processing server 203, and after the processing is completed, returns a service response message to the service processing server 203, and sends the service processing result to the service processing server 205, and a corresponding service log is stored in the service processing server 204;
the service processing server 205 further processes the service, and after the processing is completed, the service processing server 205 returns a service end message to the service processing server 203, and generates a corresponding service log in the service processing server 205.
The above-described service processing and service log generation process is only an example, and the present invention can be applied to other data service systems in addition thereto. Based on the business system, since the business processing process of the plurality of business processing servers is similar to the log generation and storage process,
in one embodiment, the management server 208 can be used as a time server to perform time synchronization, and the business processing servers 203, 204, 205, 206, 207, the main log storage 209, the backup log storage 210, and the log analysis server 211 perform time synchronization with the management server 208 to ensure that the time of all servers in the system is consistent.
In one embodiment, the management server 208 configures a service priority list, a log storage area list, and a log storage level list. And determining the priority of the service according to the user level and the service level in the service priority list. The log storage area list corresponds different service types to different log storage areas one by one, and the proportion of each log storage area to the total storage space of the log storage server is set. The log storage grade list can be divided into three grades of real-time storage, timing compression storage and local storage according to the service priority.
In one embodiment, the management server 208 sends configuration information to the business processing servers 203, 204, 205, 206, 207, the primary log storage 209, the backup log storage 210, and the log analysis server 211 to configure the business processing servers 203, 204, 205, 206, 207, the primary log storage 209, the backup log storage 210, and the log analysis server 211. The configuration information may include a service priority list, a log storage area list, and a log storage rank list.
In one embodiment, the management server 208 may update the configuration information periodically or aperiodically and send the updated configuration information to the business process servers 203, 204, 205, 206, 207, the primary log storage 209, and the backup log storage 210. The configuration information may include a service priority list, a log storage area list, and a log storage rank list.
According to the log storage system disclosed by the invention, a service storage grade is determined according to the user identifier and the service identifier; the service log is stored and processed according to the service storage grade corresponding to the service request, so that the integrity of key service log information can be ensured, the pressure of mass log storage on the storage space of a log analysis server is reduced, and the log storage safety is improved.
FIG. 3 is a flow chart illustrating a method of log storage according to an exemplary embodiment. The log storage method 30 at least includes steps S302 to S308.
As shown in fig. 3, in S302, a service request is received, where the service request includes a user identifier and a service identifier. The client may, for example, submit a service request to the data service system, the service request including a user identification (user ID), a service type, and a service identification (service ID).
In S304, a service storage level is determined according to the user identifier and the service identifier.
In one embodiment, determining a service storage class according to the user identifier and the service identifier comprises: determining service priority according to the user identifier and the service identifier; and determining the service storage level according to the service priority. And processing the service request in a service processing server in the data service system, determining the user grade according to the user ID in the service request, and determining the service grade according to the service ID. And the service processing server determines the priority of the service according to the determined user grade, the service grade and the service priority list.
In S306, the service request is processed to generate a service log.
In S308, the service log is sent to the main log memory and/or the backup log memory for storage according to the service storage level corresponding to the service request. The service storage grade can comprise real-time storage, timing storage and local storage; the storing and processing the service log according to the service storage grade corresponding to the service request comprises the following steps: storing and processing the service log in real time; storing the service log at regular time; and carrying out local storage processing on the service log.
And the service processing server determines the storage grade of the service according to the determined priority of the service and the log storage grade list, wherein the storage grade comprises three grades of real-time storage, timing compression storage and local storage. The service processing server generates a service log, specifically, the main service process, the access information, according to the key fields: fields such as user ID, service type, service ID, sending message (including source and destination information), receiving message (including source and destination information), time, processing result and the like are stored in a database table. And the service processing server processes the service log according to the storage grade of the service log.
In one embodiment, when the storage area for storing the service log is full, the service log is stored in a covering manner according to the service priority of the service request and/or the service log generation time. And the service processing server determines a corresponding storage area according to the service type of the service log and stores the service log. When the corresponding storage area is full, the coverage is carried out according to the service priority and the generation time of the service log, namely, the newly received service log can only cover the service log with the priority lower than or equal to the priority of the service log and the generation time earlier than the generation time of the service log.
According to the log storage method disclosed by the invention, the priority of the service is determined, and different log storage strategies are executed according to different priorities so as to realize distributed storage and reduce the storage pressure of the service log storage server. The method specifically comprises the following steps: and determining the priority of the service according to the user grade and the service grade, and dividing the service log storage grade into three grades of real-time storage, timing compression storage and local storage according to the priority of the service. And executing different log coverage strategies aiming at different types and different priorities so as to ensure the integrity of the log information of the service with the same high priority. The method specifically comprises the following steps: that is, the newly received traffic log or the compressed traffic log can only cover the traffic log or the compressed traffic log having a priority lower than or equal to its priority and having a generation time earlier than its generation time.
According to the log storage method disclosed by the invention, the service type is determined to divide the storage space, and the management of the service log storage space can be refined.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
FIG. 4 is a flow chart illustrating a method of log storage according to another exemplary embodiment. The log storing method 40 shown in fig. 4 is a detailed description of "storing the service log according to the service storage level corresponding to the service request" in S308 in the flow shown in fig. 3.
As shown in fig. 4, in S402, the service request is processed to generate a service log.
In S404, a service storage class of the service request is determined.
In S406, the service log is stored in real time. The traffic log may be sent to a primary log storage and/or a backup log storage for storage, for example.
In S408, the service log is subjected to a timed storage process. For example, the service log is compressed to generate a compressed log; and sending the compressed log to a main log storage and/or a backup log storage at regular time for storage. A compressed log may also be generated, for example, from a service log and a service type, a service ID, and a priority of the service corresponding to the service.
In S410, the service log is locally stored. The service type of the service log can be obtained for example; and storing the service log in a storage area corresponding to the service type locally.
The main log storage server and the backup log storage server determine corresponding storage areas according to the service types of the received service logs or the compressed service logs, and store the service logs or the compressed service logs. When the corresponding storage area is full, the coverage is carried out according to the service priority and the generation time of the service log, namely, the newly received service log or the compressed service log can only cover the service log or the compressed service log which has the priority lower than or the same as the priority of the service log and the generation time of which is earlier than the generation time of the service log.
According to the log storage method disclosed by the invention, the integrity of the key service log information can be ensured; the distributed storage of the service logs is realized, and the storage pressure of the service storage server is reduced; and the safety of log storage is improved by adopting a main log server and standby log server mode.
FIG. 5 is a flow chart illustrating a method of log storage according to another exemplary embodiment. The log storage method 50 shown in fig. 5 is a specific step of "obtaining the relationship data between the user identifier, the service identifier and the service storage level by the management server at regular time".
As shown in fig. 5, in S502, time synchronization is performed. The management server is used as a time server to carry out time synchronization, and each service processing server, the main log storage server, the backup log storage server and the log analysis server carry out time synchronization with the management server so as to ensure that the time of all servers in the system is consistent.
In S504, the user identifier, the relationship data between the service identifier and the service storage level are configured, which may specifically include a service priority list, a log storage area list, and a log storage level list.
The management server configures a service priority list, a log storage area list and a log storage grade list. The service priority list determines the priority of the service according to the user level and the service level, and is shown in table 1. The log storage area list corresponds different service types to different log storage areas one by one, and sets the proportion of each log storage area to the total storage space of the log storage server, and the log storage area list is shown in table 2. The log storage grade list is divided into three grades of real-time storage, timing compression storage and local storage according to the priority of the service, and the log storage grade list is shown in table 3.
Table 1 service priority list
Figure BDA0002271774820000101
Figure BDA0002271774820000111
Table 2 log storage area list
Type of service Storage area Storage space ratio
1 Storage area 1 30%
2 Storage area 2 20%
3 Storage area 3 20%
4 Storage area 4 10%
5 Storage area 5 10%
6 Storage area 6 10%
TABLE 3 Log storage rank List
Priority of service Log storage level
1 Real-time storage
2 Real-time storage
3 Timed compressed storage
4 Timed compressed storage
5 Local storage
6 Local storage
In S506, the configuration information is transmitted. The management server sends configuration information to each service processing server, the main log storage server and the backup log storage server, and configures each service processing server, the first log storage server, the second log storage server and the log analysis server. The configuration information includes a service priority list, a log storage area list and a log storage rank list.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
FIG. 6 is a block diagram illustrating a log storage device according to an example embodiment. The log storage device 60 includes: a receiving module 602, a ranking module 604, a processing module 606, and a storage module 608.
The receiving module 602 is configured to receive a service request, where the service request includes a user identifier and a service identifier; the client may, for example, submit a service request to the data service system, the service request including a user identification (user ID), a service type, and a service identification (service ID).
The level module 604 is configured to determine a service storage level according to the user identifier and the service identifier; the method comprises the following steps: determining service priority according to the user identifier and the service identifier; and determining the service storage level according to the service priority.
The processing module 606 is configured to process the service request and generate a service log; and
the storage module 608 is configured to store the service log according to the service storage class corresponding to the service request. The service request may be processed, for example, according to the service priority to generate the service log. The service storage grade comprises real-time storage, timing storage and local storage; the storing and processing the service log according to the service storage grade corresponding to the service request comprises the following steps: storing and processing the service log in real time; storing the service log at regular time; and carrying out local storage processing on the service log.
According to the log storage device disclosed by the invention, the priority of the service is determined, and different log storage strategies are executed according to different priorities so as to realize distributed storage and reduce the storage pressure of the service log storage server. The method specifically comprises the following steps: and determining the priority of the service according to the user grade and the service grade, and dividing the service log storage grade into three grades of real-time storage, timing compression storage and local storage according to the priority of the service. And executing different log coverage strategies aiming at different types and different priorities so as to ensure the integrity of the log information of the service with the same high priority. The method specifically comprises the following steps: that is, the newly received traffic log or the compressed traffic log can only cover the traffic log or the compressed traffic log having a priority lower than or equal to its priority and having a generation time earlier than its generation time.
FIG. 7 is a block diagram illustrating a log storage system in accordance with another exemplary embodiment. The journal storage system 70 includes at least: a business processing server 702 and a storage server 704.
The service processing server 702 is configured to receive a service request, where the service request includes a user identifier and a service identifier; determining a service storage grade according to the user identifier and the service identifier; processing the service request to generate a service log; and
the storage server 704 is configured to store the service log according to the service storage class corresponding to the service request; the storage server 704 includes a main log storage 7042 and a backup log storage 7044.
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 200 according to this embodiment of the present disclosure is described below with reference to fig. 8. The electronic device 200 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, the electronic device 200 is embodied in the form of a general purpose computing device. The components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one memory unit 220, a bus 230 connecting different system components (including the memory unit 220 and the processing unit 210), a display unit 240, and the like.
Wherein the storage unit stores program code executable by the processing unit 210 to cause the processing unit 210 to perform the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 210 may perform the steps as shown in fig. 3, 4, 5.
The memory unit 220 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)2201 and/or a cache memory unit 2202, and may further include a read only memory unit (ROM) 2203.
The storage unit 220 may also include a program/utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 230 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 200, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 200 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 250. Also, the electronic device 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiments of the present disclosure.
Fig. 9 schematically illustrates a computer-readable storage medium in an exemplary embodiment of the disclosure.
Referring to fig. 9, a program product 400 for implementing the above method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: receiving a service request, wherein the service request comprises a user identifier and a service identifier; determining a service storage grade according to the user identifier and the service identifier; processing the service request to generate a service log; and storing the service log according to the service storage grade corresponding to the service request.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A method for storing logs, comprising:
receiving a service request, wherein the service request comprises a user identifier and a service identifier;
determining a service storage grade according to the user identifier and the service identifier;
processing the service request to generate a service log; and
and sending the service log to a main log memory and/or a backup log memory for storage according to the service storage grade corresponding to the service request.
2. The method of claim 1, wherein storing the service log according to the service storage class corresponding to the service request comprises:
compressing the service log to generate a compressed log;
and sending the compressed log to a main log storage and/or a backup log storage at regular time for storage.
3. The method of claim 2, further comprising:
acquiring the service type of the service log; and
and the main log storage and/or the backup log storage stores the service logs in a storage area corresponding to the service type.
4. The method of claim 1, wherein storing the service log according to the service storage class corresponding to the service request comprises:
acquiring the service type of the service log; and
and storing the service log in a storage area corresponding to the service type locally.
5. The method of claim 3 or 4, further comprising:
and when the storage area for storing the service log is full, performing covering storage according to the service priority of the service request and/or the service log generation time.
6. The method of claim 1, further comprising:
and regularly acquiring the user identification, the service identification and the relation data between the service storage grades by a management server.
7. A journal storage device, comprising:
a receiving module, configured to receive a service request, where the service request includes a user identifier and a service identifier;
the grade module is used for determining a service storage grade according to the user identifier and the service identifier;
the processing module is used for processing the service request and generating a service log; and
and the storage module is used for sending the service log to a main log storage and/or a backup log storage for storage according to the service storage grade corresponding to the service request.
8. A journal storage system, comprising:
the service processing server is used for receiving a service request, wherein the service request comprises a user identifier and a service identifier; determining a service storage grade according to the user identifier and the service identifier; processing the service request to generate a service log; and
the storage server is used for storing the service log according to the service storage grade corresponding to the service request; wherein the storage server comprises a primary log storage and a backup log storage.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201911107564.4A 2019-11-13 2019-11-13 Log storage method, device, system, electronic equipment and computer readable medium Pending CN111046010A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911107564.4A CN111046010A (en) 2019-11-13 2019-11-13 Log storage method, device, system, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911107564.4A CN111046010A (en) 2019-11-13 2019-11-13 Log storage method, device, system, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN111046010A true CN111046010A (en) 2020-04-21

Family

ID=70232438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911107564.4A Pending CN111046010A (en) 2019-11-13 2019-11-13 Log storage method, device, system, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN111046010A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786828A (en) * 2020-06-29 2020-10-16 百度在线网络技术(北京)有限公司 Log processing method executed in network device and network device
CN112256658A (en) * 2020-10-16 2021-01-22 海尔优家智能科技(北京)有限公司 Log record shunting method and device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942210A (en) * 2013-01-21 2014-07-23 中国移动通信集团上海有限公司 Processing method, device and system of mass log information
CN106250406A (en) * 2016-07-21 2016-12-21 柳州龙辉科技有限公司 A kind of log processing method
CN109800223A (en) * 2018-12-12 2019-05-24 平安科技(深圳)有限公司 Log processing method, device, electronic equipment and storage medium
CN109977089A (en) * 2019-03-13 2019-07-05 深圳壹账通智能科技有限公司 Blog management method, device, computer equipment and computer readable storage medium
CN110263004A (en) * 2019-05-08 2019-09-20 北京字节跳动网络技术有限公司 Log recording method, device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942210A (en) * 2013-01-21 2014-07-23 中国移动通信集团上海有限公司 Processing method, device and system of mass log information
CN106250406A (en) * 2016-07-21 2016-12-21 柳州龙辉科技有限公司 A kind of log processing method
CN109800223A (en) * 2018-12-12 2019-05-24 平安科技(深圳)有限公司 Log processing method, device, electronic equipment and storage medium
CN109977089A (en) * 2019-03-13 2019-07-05 深圳壹账通智能科技有限公司 Blog management method, device, computer equipment and computer readable storage medium
CN110263004A (en) * 2019-05-08 2019-09-20 北京字节跳动网络技术有限公司 Log recording method, device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786828A (en) * 2020-06-29 2020-10-16 百度在线网络技术(北京)有限公司 Log processing method executed in network device and network device
CN112256658A (en) * 2020-10-16 2021-01-22 海尔优家智能科技(北京)有限公司 Log record shunting method and device, storage medium and electronic device
CN112256658B (en) * 2020-10-16 2023-08-18 海尔优家智能科技(北京)有限公司 Log record distribution method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN111190689B (en) Digital twin system simulation method and device
JP2021103506A (en) Method and device for generating information
CN111338834B (en) Data storage method and device
CN110795649A (en) Target page display method, device and system and electronic equipment
CN111046010A (en) Log storage method, device, system, electronic equipment and computer readable medium
CN111680799A (en) Method and apparatus for processing model parameters
CN111010453B (en) Service request processing method, system, electronic device and computer readable medium
CN113282589A (en) Data acquisition method and device
CN112347383A (en) Sharing link generation method and device and electronic equipment
CN107679096B (en) Method and device for sharing indexes among data marts
JP2024509629A (en) Quantum car type component basic database creation method, device, electronic equipment, and storage medium
CN114238585A (en) Query method and device based on 5G message, computer equipment and storage medium
CN113918525A (en) Data exchange scheduling method, system, electronic device, medium, and program product
CN113722007A (en) Configuration method, device and system of VPN branch equipment
CN113378346A (en) Method and device for model simulation
CN111984616A (en) Method, device and system for updating shared file
CN112288396A (en) Multi-system user attribute information management method and device and electronic equipment
CN112559001A (en) Method and device for updating application
CN109587224B (en) Data processing method and device, electronic equipment and computer readable medium
CN110262756B (en) Method and device for caching data
CN111866767A (en) Message processing method and device, electronic equipment and readable medium
US11675683B2 (en) Method, electronic device, and computer program product for monitoring storage system
CN112950310A (en) Order identification generation method and device and electronic equipment
CN110019352B (en) Method and apparatus for storing data
CN114116776A (en) Data processing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination