CN113703665A - Method and device for reducing loss of control terminal data after gateway breakdown and electronic equipment - Google Patents
Method and device for reducing loss of control terminal data after gateway breakdown and electronic equipment Download PDFInfo
- Publication number
- CN113703665A CN113703665A CN202110785559.XA CN202110785559A CN113703665A CN 113703665 A CN113703665 A CN 113703665A CN 202110785559 A CN202110785559 A CN 202110785559A CN 113703665 A CN113703665 A CN 113703665A
- Authority
- CN
- China
- Prior art keywords
- positioning data
- log file
- data
- writing
- database
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 230000015556 catabolic process Effects 0.000 title description 2
- 230000008676 import Effects 0.000 claims abstract description 6
- 238000004590 computer program Methods 0.000 claims description 5
- 238000004458 analytical method Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000012544 monitoring process Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000029305 taxis Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/219—Managing data history or versioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The application provides a method for reducing loss of control terminal positioning data after gateway collapse, which comprises the following steps: receiving terminal positioning data; writing the positioning data into a log file; reading and analyzing a log file; and writing the positioning data in the log file into a database in batches. And configuring a log component and forming a log file generation strategy. And converting the positioning data into warehousing format data. And generating the converted data in the warehousing format into a log file according to the log file generation strategy. And calling a batch import instruction of the database to write the positioning data in the log file into the database in batch. According to the method, the loss of the terminal positioning data after the gateway crashes can be reduced.
Description
Technical Field
The invention relates to the field of vehicle-mounted positioning terminal systems, in particular to a method and a device for reducing loss of control terminal data after a gateway is crashed and electronic equipment.
Background
With the popularization and application of the terminals, the data uploaded by the terminals are more and more, and the functions are more and more powerful, so that the requirement of users on the integrity of the data uploaded by the terminals is higher and higher. With the popularization and application of the terminals, the data uploaded by the terminals are more and more, and the functions are more and more powerful, so that the requirement of users on the integrity of the data uploaded by the terminals is higher and higher. The problems of power failure, system crash and the like of partial clients, database server files, software faults and the like can cause that data received by the positioning receiving program is not stored in the memory space of the positioning receiving program in time, partial terminal equipment is positioned and lost, and the client experience is poor.
The existing solution is to adopt kafka to decompose the process of reading data and writing data, but the tool can only be used in linux server environment, is not good for windows support, is not backward compatible with old servers and old versions of software, and has large upgrading cost.
Disclosure of Invention
The method for reducing the loss of the positioning data of the control terminal after the gateway crashes is provided, and the positioning data is stored on a disk in advance after the positioning data is received by separating the data reading and warehousing processes, so that the positioning data can not be lost in a large amount when a database server goes wrong.
According to an aspect of the present application, a method for controlling terminal location data to reduce loss after a gateway crashes is provided, including:
receiving terminal positioning data;
writing the positioning data into a log file;
reading and analyzing a log file;
and writing the positioning data in the log file into a database in batches.
According to some embodiments, the aforementioned method further comprises: and configuring a log component and forming a log file generation strategy.
According to some embodiments, the aforementioned method further comprises: and converting the positioning data into warehousing format data.
According to some embodiments, the aforementioned method further comprises: and generating the converted data in the warehousing format into a log file according to the log file generation strategy.
According to some embodiments, the aforementioned method further comprises: and calling a batch import instruction of the database to write the positioning data in the log file into the database in batch.
According to some embodiments, the aforementioned method further comprises: and clearing the file from the disk after the log file is successfully put in storage.
According to some embodiments, the aforementioned method further comprises: and if the batch writing of the positioning data into the database fails, the writing of the positioning data into the log file is still executed.
According to some embodiments, the aforementioned method further comprises: and after the positioning data batch writing database is recovered to be normal, continuously writing the positioning data in the log file into the database in batch.
According to another aspect of the present application, there is provided an apparatus for controlling a vehicle satellite positioning system video platform playing function, including:
the receiving module is used for receiving terminal positioning data;
the writing module is used for writing the positioning data into a log file;
the conversion module is used for converting the positioning data into the data in the warehousing format;
the analysis module is used for reading and analyzing the log file;
and the warehousing module is used for writing the positioning data in the log file into a database in batches.
According to another aspect of the present application, there is provided an electronic device including:
a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method of any of the above methods when executing the computer program.
According to the embodiment of the application, the data reading and warehousing processes are separated, the positioning data are stored on the disk in advance after the positioning data are received, and the influence of the loss of the positioning data when a database server goes wrong is reduced.
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 application.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without exceeding the protection scope of the present application.
Fig. 1 shows a schematic diagram of a vehicle-mounted terminal data transmission system according to an example embodiment of the present application.
Fig. 2 shows a schematic diagram of a control method according to an example embodiment of the present application.
Fig. 3 shows a flow chart of a control method according to an example embodiment of the present application.
Fig. 4 shows a block diagram of an apparatus for controlling terminal location data to reduce loss after a gateway crash according to an example embodiment of the present application.
FIG. 5 shows a block diagram of an electronic device 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 application. One skilled in the relevant art will recognize, however, that the subject matter of the present application 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 application.
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 present concepts. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It will be appreciated 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 application and are, therefore, not intended to limit the scope of the present application.
The invention relates to a vehicle-mounted positioning terminal system, which mainly comprises three parts: the vehicle-mounted (GPS/Beidou) monitoring terminal is also called a vehicle machine, (GPS/Beidou) terminal, (GPS/Beidou) monitoring terminal and is responsible for calculating positioning coordinates according to received GPS/Beidou satellite signals, and simultaneously sending positioning information, state information and sending and receiving control information through the communication network, the communication network is a carrier for realizing information exchange between the vehicle and the dispatching monitoring center, generally referred to as a GSM/GPRS/CDMA base station and the Internet, and the dispatching monitoring center is a communication core of the whole information system and is responsible for information exchange with the vehicle-mounted GPS monitoring terminal and classification, recording and forwarding of various contents and control information.
When the terminal positioning data receiving fault, such as program crash, is caused by server power failure, system crash or other software faults, the method can ensure that the terminal positioning data is not lost in a large quantity, and can be written into the database after the server is recovered.
The invention provides a method for separating data reading and writing in a positioning receiving program, and the positioning data in a file is quickly written into a database in batches by adopting batch import instructions in the database. And when the positioning receiving program receives the terminal positioning data, the positioning receiving program does not write the terminal positioning data into a database directly, but continuously writes the terminal positioning data into a certain log file in a local disk folder by using a log component logback in java, and the file name is generated according to a specified rule. And the database storage program is independent from the positioning receiving program and is independently made into a storage program, the program constantly scans a directory generated by the log file at regular time, reads the generated positioning file according to the file name and time sequence, analyzes the file content, and then uses the batch import instruction in the database to quickly write the positioning data in the file into the database in batches.
In the two-passenger and one-passenger monitoring industry, the monitoring time interval is required to be 30 seconds, the requirement on track integrity is high, and a monitor can check the current running track of a vehicle at regular time. The number of vehicles monitored on a server is many, up to 3 thousands, and at this concurrent pressure, the process according to the invention is completely more than sufficient. Although the number of vehicles is not more than that of two-passenger one-dangerous industries in the bus monitoring industry, the monitoring time interval is required to be 5 seconds or 10 seconds, and the processing data amount is 3 times to 6 times of that of the same two-passenger one-dangerous industry.
In the scheme of the invention, by separating the data reading and warehousing processes, the positioning data is pre-stored on the disk after the positioning is received, so that the influence on the receiving of the positioning data when the database server goes wrong is reduced, and a client only feels that the data is temporarily delayed on an interface but is not lost, because the data is already stored on the local disk and is only not warehoused in time. After the database server is recovered, the backlog file can be read from the disk and written into the database again instead of being lost as before. Meanwhile, if the server is powered off or crashed, the positioning data is directly stored in the log file, and the server can directly use the database storage program to store the data after being recovered.
Exemplary embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 shows a schematic diagram of a vehicle-mounted terminal data transmission system according to an example embodiment of the present application.
As shown in fig. 1, the in-vehicle terminal data transmission system includes an in-vehicle terminal apparatus 101, a network 102, a server 103, and a database server 104.
It should be understood that the number of terminals, server devices and networks in fig. 1 is merely illustrative. There may be any number of terminals, server devices and networks, as is practical.
The network 102 may be a medium that provides an internet communication link between the in-vehicle terminal apparatus 101 and the server 103, and may include various connection types such as a mobile communication link and the like.
The in-vehicle terminal apparatus 101 may be an electronic apparatus having a display screen, and includes one or more processors and storage devices, and may interact with the server 103 via the network 102 to receive or send a message or the like.
According to an example embodiment, in the present application, the vehicle-mounted terminal device 101 sends the positioning data to the server 103, and the server 103 receives the positioning data, processes the data, and stores the processed data in the database server 104.
Alternatively, the vehicle-mounted terminal device 101 may be applied to various commercial vehicles, such as passenger cars, freight cars, dangerous goods cars, buses, new energy cars, school buses, commercial concrete cars, muck cars, taxis, and the like.
Fig. 2 shows a schematic diagram of a control method according to an example embodiment of the present application.
At S201, terminal positioning data is received.
According to some embodiments, the positioning data server connected to the vehicle-mounted terminal is responsible for receiving real-time positioning of the vehicle-mounted terminal, including information such as position, speed, direction and the like reported by the vehicle-mounted terminal according to a set time interval, a specified time point or a distance interval.
In particular, according to some embodiments, the positioning data reported by the terminal is received at the positioning data server by a positioning data receiving program, i.e. a gateway program in general.
At S203, the positioning data is written into a log file.
And converting the positioning data into warehousing format data.
According to some embodiments, the positioning receiver converts the received original positioning data, which may be in binary format, into a warehousing format, which may be in text file format.
According to some embodiments, configuring a log component, such as a logback component, forms a log output policy that may include generating a file name, file format, generation period, deposit directory, and the like.
According to some embodiments, the converted data in the warehousing format is generated into a log file according to the log file generation policy.
According to a preset period, for example, every minute, a positioning warehousing log file is generated on a disk in a specified folder, and the file name is as follows: the gps.sql.20210123_0122 shows that the file contains positioning track data which is sent to the server within 1 st 22 min 00 s to 1 st 22 min 59 of 23 st 1 st 23 st 2021 year.
According to some embodiments, the positioning data receiving program calls a logback log component to continuously write the positioning data into the log file according to a policy configured by the logback.
At present, the mainstream log components of java mainly comprise logback and log4j, a springboot framework is defaulted to be logback, although log4j can be stronger, the logback is simpler to use, the basic functions of the log components are used, and the logback is completely satisfied. Optionally, the log4j log component may also be used to configure the logging policy.
At S205, the log file is read and parsed.
According to some embodiments, the database warehousing program on the server continuously scans the files in the directory where the files are located for a period of 4 to 6 seconds, for example 5 seconds, reads the log files from the morning to the evening according to the last modification time of the files in the folder, and parses the log files.
And S207, writing the positioning data in the log file into a database in batch.
According to some embodiments, the database warehousing program continuously scans files in a directory where the files are located, reads log files, analyzes the log files, and then calls a batch import instruction of the database to write the positioning data in the files into the database in batches, for example, two main streams of databases mysql and sqlserver, in which mysql a load data instruction can be used and sqlserver a bulk insert instruction can be used.
Alternatively, the database may be deployed to the cloud using a cloud database, and a database management system (DBMS) in the cloud environment may be accessed via a network to read and write the database.
According to some embodiments, information about travel data, location, etc. of the vehicle over a period of time, stored on the data center server, may be used for querying, as well as for track playback.
According to some embodiments, the positioning data may also be used in the following ways:
overspeed alarm: when the vehicle speed exceeds a preset speed limit value, overspeed alarm data can be actively reported;
and (4) area alarming: the dispatching monitoring center can set a certain area, and when the vehicle enters or leaves the area, the position information is reported and an alarm is given;
emergency alarm: when an emergency occurs, the emergency key is pressed for more than 3 seconds, and the dispatching monitoring center receives the alarm information;
and (3) call monitoring: when the emergency information is sent out, the system automatically starts a monitoring function;
calling service: through the dispatching monitoring center, after a caller makes a call, the GPS system can quickly lock the position of the taxi calling center, and empty taxis are searched within a certain radius of the caller to provide traffic service (suitable for taxis).
Fig. 3 shows a flow chart of a control method according to an example embodiment of the present application.
In S301 to S305, the steps are the same as those shown in fig. 2, and are not described again here.
In S307, the file is cleared from the disk after the log file is successfully put in storage, so as to avoid repeated putting in storage.
According to some embodiments, if the positioning reception fails, for example, the positioning reception program crashes, or the server fails, and then the positioning reception program is restarted, the terminal will make up the positioning data that is not sent to the server during the period. The terminal and the positioning receiving program establish TCP long connection, if the terminal can not access the port monitored by the positioning receiving program, the positioning data can be written into a local cache, and the cached data can be transmitted to the server again until the terminal is connected again.
According to some embodiments, if the warehousing fails, for example, the warehousing program crashes, the log file is continuously written, and after the warehousing program is restarted, the log file is sequentially written into the database.
It should be clearly understood that this application describes how to make and use particular examples, but the application is 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.
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 methods provided herein. The program of (a) 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 method according to exemplary embodiments of the present application, 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.
Through the description of the exemplary embodiments, those skilled in the art will readily appreciate that the method for controlling terminal location data to reduce loss after a gateway crash according to embodiments of the present application has at least one or more of the following advantages.
According to the embodiment, by separating the data reading and warehousing processes, the positioning data is stored on the disk in advance after the positioning is received, and the influence on the positioning data receiving when the database server has problems is reduced.
According to the embodiment, if the server is powered off or crashed, the positioning data is directly stored in the log file, so that the positioning data is not lost in a large amount, and the positioning data can be written into the database after the server is recovered.
Embodiments of apparatus of the present application are described below that may be used to perform embodiments of the methods of the present application. For details not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 4 shows a block diagram of a device for controlling terminal location data to reduce loss after a gateway crash, according to an example embodiment. The apparatus shown in fig. 4 can execute the aforementioned method for controlling terminal location data to reduce loss after gateway crash according to the embodiment of the present application.
As shown in fig. 4, the means for controlling the terminal to locate the data to reduce the loss after the gateway crashes may include: a receiving module 410, a writing module 420, a converting module 430, a parsing module 440, and a warehousing module 450.
Referring to fig. 4 and with reference to the previous description:
the receiving module is used for receiving terminal positioning data;
the writing module is used for writing the positioning data into a log file;
the conversion module is used for converting the positioning data into the data in the warehousing format;
the analysis module is used for reading and analyzing the log file;
and the warehousing module is used for writing the positioning data in the log file into a database in batches.
The device performs functions similar to those of the method provided above, and other functions can be referred to above, and will not be described again here.
FIG. 5 shows a block diagram of an electronic device according to an example embodiment.
An electronic device 200 according to this embodiment of the present application is described below with reference to fig. 5. The electronic device 200 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, 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 that can be executed by the processing unit 210 such that the processing unit 210 performs the methods according to various exemplary embodiments of the present application described herein. For example, the processing unit 210 may perform the methods as shown in fig. 2, 3.
The storage unit 220 may include readable media in the form of volatile storage 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.
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. The technical solution according to the embodiments of the present application 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 application.
The software 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.
A 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 of the present application 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).
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 embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can 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 can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present application.
Exemplary embodiments of the present application are specifically illustrated and described above. It is to be understood that the application is not limited to the details of construction, arrangement, or method of implementation described herein; on the contrary, the intention is to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims (10)
1. A method for controlling terminal positioning data to reduce loss after gateway crash is characterized by comprising the following steps:
receiving terminal positioning data;
writing the positioning data into a log file;
reading and analyzing a log file;
and writing the positioning data in the log file into a database in batches.
2. The method of claim 1, wherein writing the location data to a log file comprises:
and configuring a log component and forming a log file generation strategy.
3. The method of claim 2, wherein writing the positioning data to a log file further comprises:
and converting the positioning data into warehousing format data.
4. The method of claim 3, wherein writing the positioning data to a log file further comprises:
and generating the converted data in the warehousing format into a log file according to the log file generation strategy.
5. The method of claim 1, wherein writing the batch of location data in the log file to a database comprises:
and calling a batch import instruction of the database to write the positioning data in the log file into the database in batch.
6. The method of claim 1, further comprising:
and clearing the file from the disk after the log file is successfully put in storage.
7. The method of claim 1, further comprising:
and if the positioning data of the receiving terminal fails, after the positioning data of the receiving terminal is recovered to be normal, the positioning data transmitted by the receiving terminal is supplemented.
8. The method of claim 1, further comprising:
if the batch writing of the positioning data into the database fails, the positioning data is still written into a log file;
and after the positioning data batch writing database is recovered to be normal, continuously writing the positioning data in the log file into the database in batch.
9. An apparatus for controlling terminal location data to reduce loss after a gateway crash, comprising:
the receiving module is used for receiving terminal positioning data;
the writing module is used for writing the positioning data into a log file;
the conversion module is used for converting the positioning data into the data in the warehousing format;
the analysis module is used for reading and analyzing the log file;
and the warehousing module is used for writing the positioning data in the log file into a database in batches.
10. An electronic device, comprising:
memory, processor and computer program stored in the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-8 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110785559.XA CN113703665A (en) | 2021-07-12 | 2021-07-12 | Method and device for reducing loss of control terminal data after gateway breakdown and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110785559.XA CN113703665A (en) | 2021-07-12 | 2021-07-12 | Method and device for reducing loss of control terminal data after gateway breakdown and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113703665A true CN113703665A (en) | 2021-11-26 |
Family
ID=78648471
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110785559.XA Pending CN113703665A (en) | 2021-07-12 | 2021-07-12 | Method and device for reducing loss of control terminal data after gateway breakdown and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113703665A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114138809A (en) * | 2021-12-08 | 2022-03-04 | 纳里健康科技有限公司 | Database read-write separation method and platform |
CN116224400A (en) * | 2023-03-03 | 2023-06-06 | 博泰车联网(南京)有限公司 | Positioning analysis method, device, equipment and storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1932812A (en) * | 2005-09-16 | 2007-03-21 | 腾讯科技(深圳)有限公司 | Method and apparatus for holding journal |
CN103929466A (en) * | 2013-01-10 | 2014-07-16 | Lg电子株式会社 | Vehicle Terminal And Location-based Content Sharing System Having The Same |
CN104504779A (en) * | 2014-12-25 | 2015-04-08 | 深圳市华宝电子科技有限公司 | Travelling data recorder analysis method and device |
CN105701122A (en) * | 2014-11-28 | 2016-06-22 | 深圳市腾讯计算机系统有限公司 | Log collection method, apparatus and system |
CN108734433A (en) * | 2018-05-29 | 2018-11-02 | 广州亿程交通信息集团有限公司 | Car log data analysis system |
CN109542866A (en) * | 2018-11-20 | 2019-03-29 | 深圳市博实结科技有限公司 | Vehicle location monitor cloud framework, method, server and medium |
CN110851415A (en) * | 2019-11-13 | 2020-02-28 | 广州小鹏汽车科技有限公司 | Log data processing method and device of vehicle-mounted system |
CN111145382A (en) * | 2019-11-27 | 2020-05-12 | 苏州智加科技有限公司 | Log data processing method and device of automatic driving system |
CN111258974A (en) * | 2020-01-20 | 2020-06-09 | 吉利汽车研究院(宁波)有限公司 | Vehicle offline scene data processing method and system |
CN113051112A (en) * | 2021-03-16 | 2021-06-29 | 北京经纬恒润科技股份有限公司 | Method and system for acquiring ECU fault information |
-
2021
- 2021-07-12 CN CN202110785559.XA patent/CN113703665A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1932812A (en) * | 2005-09-16 | 2007-03-21 | 腾讯科技(深圳)有限公司 | Method and apparatus for holding journal |
CN103929466A (en) * | 2013-01-10 | 2014-07-16 | Lg电子株式会社 | Vehicle Terminal And Location-based Content Sharing System Having The Same |
CN105701122A (en) * | 2014-11-28 | 2016-06-22 | 深圳市腾讯计算机系统有限公司 | Log collection method, apparatus and system |
CN104504779A (en) * | 2014-12-25 | 2015-04-08 | 深圳市华宝电子科技有限公司 | Travelling data recorder analysis method and device |
CN108734433A (en) * | 2018-05-29 | 2018-11-02 | 广州亿程交通信息集团有限公司 | Car log data analysis system |
CN109542866A (en) * | 2018-11-20 | 2019-03-29 | 深圳市博实结科技有限公司 | Vehicle location monitor cloud framework, method, server and medium |
CN110851415A (en) * | 2019-11-13 | 2020-02-28 | 广州小鹏汽车科技有限公司 | Log data processing method and device of vehicle-mounted system |
CN111145382A (en) * | 2019-11-27 | 2020-05-12 | 苏州智加科技有限公司 | Log data processing method and device of automatic driving system |
CN111258974A (en) * | 2020-01-20 | 2020-06-09 | 吉利汽车研究院(宁波)有限公司 | Vehicle offline scene data processing method and system |
CN113051112A (en) * | 2021-03-16 | 2021-06-29 | 北京经纬恒润科技股份有限公司 | Method and system for acquiring ECU fault information |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114138809A (en) * | 2021-12-08 | 2022-03-04 | 纳里健康科技有限公司 | Database read-write separation method and platform |
CN116224400A (en) * | 2023-03-03 | 2023-06-06 | 博泰车联网(南京)有限公司 | Positioning analysis method, device, equipment and storage medium |
CN116224400B (en) * | 2023-03-03 | 2024-01-02 | 博泰车联网(南京)有限公司 | Positioning analysis method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113703665A (en) | Method and device for reducing loss of control terminal data after gateway breakdown and electronic equipment | |
EP3684033A1 (en) | Systems and methods for collecting, monitoring, and analyzing vehicle data from a plurality of vehicles using edge computing | |
CN109766217B (en) | Vehicle machine system fault repairing method and device | |
CN111667163A (en) | Fault monitoring method based on RPA technology, RPA robot and storage medium | |
CN114095299A (en) | Vehicle-mounted fault intelligent reminding system, method, equipment and storage medium | |
CN111930695B (en) | Method and device for storing running logs of microprocessor of vehicle-mounted terminal | |
CN112671839A (en) | Data processing method and device, cloud system and storage medium | |
CN111913938A (en) | Data migration method, system, device, electronic equipment and medium | |
CN113672416B (en) | Method and device for positioning cause of hard buffer leakage | |
CN114390112A (en) | Rail transit emergency disposal method and device, electronic equipment and storage medium | |
CN108876963A (en) | A kind of storage method, device, microprocessor and the storage medium of automobile log | |
CN114691633A (en) | Log management method, device and storage medium for rail transit signal system | |
CN112099824A (en) | Ground ATP system software upgrading method and device | |
CN111930813A (en) | PIS log equivalent operation diagram generation method with train as statistical unit | |
CN113687971B (en) | Method and device for generating memory map file | |
CN112887319B (en) | Network state monitoring method and device based on downlink traffic and electronic equipment | |
CN117896683B (en) | Vehicle-mounted eCall module software call control method and device | |
CN117827164A (en) | Software architecture method, equipment and medium of rail transit monitoring operation and maintenance system | |
CN115696267A (en) | Method for processing network exception by vehicle-mounted terminal, equipment and medium | |
CN116883112A (en) | Hotel-based check-in method, system, equipment and storage medium | |
CN112559653A (en) | Vehicle position distribution diagram generation method, device and system and computer equipment | |
CN115828199A (en) | Tag library data processing method and device | |
CN118394566A (en) | Method and device for recovering and extracting data of large vehicle running recorder based on GB19056-2021 national standard | |
CN115983235A (en) | Log analysis method and device for vehicle-mounted equipment, electronic equipment and storage medium | |
CN112615918A (en) | Network management system and information synchronization method thereof |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20211126 |