CN115190149B - Data acquisition method and system for railway investigation - Google Patents

Data acquisition method and system for railway investigation Download PDF

Info

Publication number
CN115190149B
CN115190149B CN202210802323.7A CN202210802323A CN115190149B CN 115190149 B CN115190149 B CN 115190149B CN 202210802323 A CN202210802323 A CN 202210802323A CN 115190149 B CN115190149 B CN 115190149B
Authority
CN
China
Prior art keywords
mobile terminal
acquisition processing
railway
processing unit
investigation
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.)
Active
Application number
CN202210802323.7A
Other languages
Chinese (zh)
Other versions
CN115190149A (en
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.)
China Railway Fifth Survey and Design Institute Group Co Ltd
Original Assignee
China Railway Fifth Survey and Design Institute 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 China Railway Fifth Survey and Design Institute Group Co Ltd filed Critical China Railway Fifth Survey and Design Institute Group Co Ltd
Priority to CN202210802323.7A priority Critical patent/CN115190149B/en
Publication of CN115190149A publication Critical patent/CN115190149A/en
Application granted granted Critical
Publication of CN115190149B publication Critical patent/CN115190149B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The present disclosure relates to a data acquisition method and system for railway investigation, wherein the system comprises: a Web server and a plurality of mobile terminals; the mobile terminal is used for collecting railway investigation data; the Web server is used for creating a socket communicated between the parent and child processes; after a communication mechanism is established, responding to a request which is sent by a receiving mobile terminal and carries terminal identification information, generating a socket handle of communication when the terminal identification information meets a preset matching condition, and starting a channel process based on the socket handle; when the railway investigation data sent by the mobile terminal is monitored, the railway investigation data sent by the mobile terminal is processed based on the subprocess corresponding to the mobile terminal, and a railway investigation result matched with the appointed template is generated. According to the technical scheme of the disclosure, a connection scheme of digital operation flow and field work flow of field collection to field investigation design is provided.

Description

Data acquisition method and system for railway investigation
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to a data acquisition method and system for railway investigation.
Background
The investigation of the railway pipeline refers to the field investigation of communication, power lines, broadcast television and other power facilities and oil, gas, tap water and other pipeline facilities in railway construction, the potential influence on the operation of other industries in the implementation of railway engineering construction is ascertained, and the investigation of the railway pipeline is a key step of the relocation work in the railway construction and the premise of making a reasonable relocation scheme.
In the construction of railway communication engineering projects, the smoothness of the progress of the investigation and the comprehensiveness of the investigation influence the effect and quality of project construction, and the efficiency and the reconnaissance rate of the investigation also have important influence on the construction cost of the communication projects, so that the investigation has remarkable significance for the promotion and design of the whole project. In the communication project, the investigation work not only requires investigation personnel to complete quickly and well, but also requires manpower expenditure to be saved and project cost to be reduced while grasping quality and speed.
At present, the field investigation adopts a traditional manual recording mode, and how to save labor expenses and improve the efficiency of investigation work is a problem to be solved urgently.
Disclosure of Invention
In order to solve the technical problems, the present disclosure provides a data acquisition method and system for railway investigation.
In a first aspect, embodiments of the present disclosure provide a data acquisition method for railway investigation, comprising:
creating a socket for communication between parent-child processes to realize C/S communication between the Web server and a plurality of mobile terminals;
after a communication mechanism is established, responding to a request which is sent by a receiving mobile terminal and carries terminal identification information, generating a socket handle of communication when the terminal identification information meets a preset matching condition, and starting a channel process based on the socket handle;
monitoring a specified interface, when railway investigation data sent by the mobile terminal is monitored, processing the railway investigation data sent by the mobile terminal based on a subprocess corresponding to the mobile terminal, generating a railway investigation result matched with a specified template, and sending the railway investigation result to the mobile terminal.
Optionally, the Web server further includes a plurality of acquisition processing units, where the acquisition processing units include an acquisition processing module, a shared memory, and a system monitoring module, each of the mobile terminals corresponds to four acquisition processing units, one acquisition processing unit is in a master control state, and three acquisition processing units are in a standby state, and the method further includes: the method comprises the steps that a first acquisition processing unit in a main control state is adopted to communicate with a first mobile terminal, and the first mobile terminal also corresponds to a second acquisition processing unit in a standby state; when the first mobile terminal is detected to be in a network-free state, switching the first acquisition processing unit in a main control state to a second acquisition processing unit in a standby state, adopting the second acquisition processing unit in the standby state to perform data caching, and continuously monitoring the network state of the first mobile terminal; when the first mobile terminal is monitored to be in a network state, the second acquisition processing unit in a standby state is switched to the first acquisition processing unit in a main control state, and the first acquisition processing unit in the main control state is adopted to communicate with the first mobile terminal based on the cached data.
Optionally, the method further comprises: storing all processes in the Web service based on the array; when a new sub-process is created, the number of processes in the array is obtained, when the number of processes in the array is detected to be smaller than the maximum number, a position is allocated to the new sub-process in a process pool, and when the number of processes in the array is detected to be equal to the maximum number, error reporting prompt information is generated.
Optionally, the maximum number is 1024.
Optionally, the storing all processes in the Web service based on the array includes: calling a socketpair to create a domain socket pair and setting the domain socket pair into an asynchronous mode; and informing the position of the new sub-process in the process pool of the existing sub-process through the domain nested word.
Optionally, the monitoring the railway survey data sent by the mobile terminal includes: receiving the worksite specification attribute information sent by the mobile terminal, wherein the worksite specification attribute information is obtained by the mobile terminal through receiving the selection operation of a user on a selection control on an interactive interface; or receiving the graphic information sent by the mobile terminal, wherein the graphic information is generated by the mobile terminal acquiring an image data accessory acquired by a camera and/or an image data accessory stored locally in the terminal and automatically cutting and compressing and encrypting the graphic area of the image data accessory.
Optionally, the method further comprises: determining an integer mileage corresponding to each acquisition element according to an integer mileage interval of each acquisition element in the railway survey data in a railway route, calculating a mileage fraction according to a proportion of the integer mileage of each acquisition element, and generating a table index according to the integer mileage and the mileage fraction, wherein the acquisition elements comprise facility symbols, power lines, communication lines and oil and gas pipelines. In a second aspect, embodiments of the present disclosure provide a data acquisition system for a railroad survey, comprising:
a Web server and a plurality of mobile terminals;
the mobile terminal is used for acquiring railway investigation data and sending the railway investigation data to the Web server;
the Web server is used for creating a socket for communication between parent-child processes so as to realize C/S communication between the Web server and the plurality of mobile terminals; after a communication mechanism is established, responding to a request which is sent by a receiving mobile terminal and carries terminal identification information, generating a socket handle of communication when the terminal identification information meets a preset matching condition, and starting a channel process based on the socket handle;
the Web server is also used for monitoring a specified interface, processing the railway investigation data sent by the mobile terminal based on a subprocess corresponding to the mobile terminal when the railway investigation data sent by the mobile terminal is monitored, generating a railway investigation result matched with a specified template, and sending the railway investigation result to the mobile terminal.
Optionally, the Web server further includes a plurality of acquisition processing units, where the acquisition processing units include an acquisition processing module, a shared memory, and a system monitoring module, each of the mobile terminals corresponds to four acquisition processing units, one acquisition processing unit is in a master control state, and the three acquisition processing units are in a standby state;
the Web server adopts a first acquisition processing unit in a main control state to communicate with a first mobile terminal, and the first mobile terminal also corresponds to a second acquisition processing unit in a standby state;
the Web server is further configured to switch the first acquisition processing unit in a master control state to a second acquisition processing unit in a standby state when the first mobile terminal is detected to be in a network-free state, and perform data caching by adopting the second acquisition processing unit in the standby state, and continuously monitor the network state of the first mobile terminal; when the first mobile terminal is monitored to be in a network state, the second acquisition processing unit in a standby state is switched to the first acquisition processing unit in a main control state, and the first acquisition processing unit in the main control state is adopted to communicate with the first mobile terminal based on the cached data.
Optionally, the mobile terminal is specifically configured to receive a selection operation of a selection control on the interactive interface by a user, obtain the worksite specification attribute information, and send the worksite specification attribute information to the Web server; or alternatively, the process may be performed,
and acquiring an image data accessory acquired by a camera and/or an image data accessory locally stored in a terminal, automatically cutting and compressing a graphic area of the image data accessory and encrypting to generate graphic information, and transmitting the graphic information to a Web server.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: the system has the advantages that the application programming interface of the exploration acquisition mobile terminal is communicated with the high-availability load balancing server, after a socket is established, asynchronous non-blocking is requested based on anti-concurrency web processing, the four-electricity data acquisition system of the high-availability load balancing railway increases the access business of the multi-field exploration acquisition mobile terminal, keeps low resources and low consumption and high performance, the processing unit can access one or more links, acquires, analyzes, processes, forwards and the like input data according to application and business requirements, the connection scheme of digital operation flow and field operation flow of field acquisition to field exploration design is provided, the problem of large multiple data volumes and recorded errors of manual exploration points is solved, the manual operation quantity of exploration operation acquisition is simplified, and the production efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a data acquisition system for a railroad survey provided in accordance with an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an acquisition processing unit according to an embodiment of the disclosure;
fig. 3 is a flowchart of a data acquisition method for railway investigation according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
Fig. 1 is a schematic diagram of a data acquisition system for railway investigation according to an embodiment of the present disclosure, and as shown in fig. 1, the data acquisition system for railway investigation includes a Web server and a plurality of mobile terminals.
The mobile terminal is used for collecting railway investigation data and sending the railway investigation data to the Web server.
And the Web server is used for creating a socket for communication between the parent-child processes so as to realize C/S communication between the Web server and the plurality of mobile terminals. After the communication mechanism is established, responding to a request which is sent by the mobile terminal and carries the terminal identification information, generating a socket handle of the communication when the terminal identification information meets the preset matching condition, and starting a channel process based on the socket handle. The Web server is an Nginx server.
Specifically, the ngx _channel_t channel is a tool for communication between a master process and a worker process of the nmginx, and is implemented by using a native socket pair method, and is used for creating a socket used between parent and child processes so as to enable communication between a mobile terminal program and an nmginx server. Wherein, the process is completed in the program structure: a command object in a TCP (Transmission Control Protocol ) message defining delivery, for example, a process ID of a sending command, indicates a sequence number of the sending command between ngx _process process arrays, and generates a socket handle for communication. After the socket handle is obtained, a channel is opened, a command is sent before channel mode communication is used, the opened channel is closed, and the purpose of closing the socket to release resources is achieved, wherein Nginx defines the following commands for members: ngx_cmd_open_channel, ngx_cmd_close_channel, ngx_cmd_quench, ngx_cmd_cmd_wait, ngx_cmd_ TERMINATE, NGX _cmd_reopen.
In this embodiment, the nginnx server is further configured to: monitoring a specified interface, when railway investigation data sent by a mobile terminal are monitored, processing the railway investigation data sent by the mobile terminal based on a subprocess corresponding to the mobile terminal, generating a railway investigation result matched with a specified template, and sending the railway investigation result to the mobile terminal.
Specifically, a socket generated based on a socket pair sends a command, and before each time a child process is derived, a socket pair method is called, in the method of deriving the child process by Nginx, a socket based on TCP is derived first, and in the process, an array is created for storing socket pairs for communication between a father process and a child process. For a plurality of mobile terminals, each mobile terminal corresponds to one worker process, the survey job acquisition generally faces high concurrency service, and the Nginx server automatically allocates resources and processes concurrency requests and controls for the plurality of worker processes according to preset rules.
In an embodiment of the disclosure, the nginnx server further includes a plurality of acquisition processing units, where the acquisition processing units include an acquisition processing module, a shared memory, and a system monitoring module, as shown in fig. 2, each of the mobile terminals corresponds to four acquisition processing units, one acquisition processing unit is in a master control state, and three acquisition processing units are in a standby state.
The Nginx server adopts a first acquisition processing unit in a main control state to communicate with a first mobile terminal, and the first mobile terminal also corresponds to a second acquisition processing unit in a standby state.
The Nginx server is further used for switching the first acquisition processing unit in the main control state to the second acquisition processing unit in the standby state when the first mobile terminal is detected to be in the network-free state, and adopting the second acquisition processing unit in the standby state to perform data caching and continuously monitoring the network state of the first mobile terminal; when the first mobile terminal is monitored to be in a network state, the second acquisition processing unit in a standby state is switched to the first acquisition processing unit in a main control state, and the first acquisition processing unit in the main control state is adopted to communicate with the first mobile terminal based on the cached data.
Specifically, some mountain areas have no mobile signal problem, and for the no-network state, after the survey designer saves the survey data on site, the data can be cached without network, and then the data is transmitted to the back end through communication with the server. After local caching and waiting for a network, each acquisition processing unit is assigned a unique host ID which is incremented by a number according to instructions submitted by survey design field personnel, and the ID starts from 1. Meanwhile, information such as the total number of the online acquisition processing units, the corresponding port numbers and the like is configured, and the information is recorded into a configuration file. Therefore, data communication under the condition of no network of railway investigation acquisition can be realized, and the stability of data acquisition and processing is ensured.
In one embodiment of the present disclosure, the nmginx server is further configured to: all processes in the Nginx service are stored based on the array, including a master process and a worker process. When a new sub-process is created, the number of processes in the array is obtained, when the number of processes in the array is detected to be smaller than the maximum number, a position is allocated to the new sub-process in a process pool, and when the number of processes in the array is detected to be equal to the maximum number, error reporting prompt information is generated.
Wherein the maximum number is 1024. The Nginx server is particularly used for calling a socketpair to create a domain socket pair and is set to be in an asynchronous mode and closed when the execution is executed; and informing the position of the new sub-process in the process pool of the existing sub-process through the domain nested word. The element that has been occupied is related only to the number of processes that are started, based on defining a plurality of member objects.
In one embodiment of the disclosure, the mobile terminal is specifically configured to receive a selection operation of a selection control on the interactive interface by a user, obtain worksite specification attribute information, and send the worksite specification attribute information to the nginnx server.
Specifically, through the established mobile client graphical interface, the APK or the native IOS package is installed and then loaded to the graphical interface, after the visual graphical interface is logged in according to the role, the railway investigation project engineering can be automatically established through the interactive interface, namely, the operation function of enabling the instruction can be realized and executed according to the set name as a filter condition. And the custom project name information in the interactive interface is created by executing a creation instruction through a creation button. After the project is created, leading in the professional line position accessory before the station related to the project to be surveyed, the initial configuration of the project to be surveyed can be completed, and the project specification attribute information is obtained through the selection button of the interactive interface.
The construction site comprises a building, additional equipment and the like, and the construction site specification attribute information comprises specification dimension parameters and the like. The worksite specification attribute information is obtained by maintenance and setting of an administrator user, for example: type_clb= '12B', specification attribute name is 12B, and project manager can configure to add a plurality of different specification attributes.
Or acquiring an image data accessory acquired by a camera and/or locally stored in the terminal, automatically cutting and compressing a graphic area of the image data accessory and encrypting to generate graphic information, and sending the graphic information to an Nginx server.
The mobile terminal system calls the local camera to shoot, or selects the local image accessory to upload through the instruction. After uploading the accessory, the system automatically cuts out the original graphic area and compresses and encrypts the graphic information. After the multi-accessory is uploaded, the image data accessory and the instruction for selecting the original graph are acquired, and the system automatically cuts, compresses and encrypts the graph information on the original graph area, so that the time cost of the exploration operation is saved and the efficiency of four-electric exploration acquisition of the whole railway is improved through the control of the front end.
In one embodiment of the disclosure, the nginnx server is further configured to determine an integer mileage corresponding to each acquisition element in the railway survey data according to an integer mileage interval where the acquisition element is located in a railway route, calculate a mileage fraction according to a proportion of the integer mileage where the acquisition element is located, and generate a table index according to the integer mileage and the mileage fraction, wherein the acquisition element includes a facility symbol, a power line, a communication line, and an oil gas line.
And loading, editing and visualizing the acquisition result, and automatically generating a statistical form. Specifically, the field investigation design system of the desktop end is realized based on virtual dom, when a table is generated, the integer mileage is positioned by judging the integer mileage interval where the acquisition element is positioned, and then the mileage decimal part is calculated according to the proportion of the integer mileage where the calculation point is positioned, so as to provide an attribute inquiry function, wherein the inquiry range comprises facility symbols, power lines, communication lines, oil gas pipelines and the like. The system constructs a data index in the data acquisition process so as to be convenient for searching and editing the acquired data, thereby ensuring the data storage and management of statistical accuracy.
According to the data acquisition system for railway investigation, the application programming interface of the investigation acquisition mobile terminal is communicated with the high-availability load balancing server, after a socket is established, asynchronous non-blocking is processed based on anti-concurrency nginx, the high-availability load balancing railway four-electricity data acquisition system increases access business of the multi-field investigation acquisition mobile terminal, low resources, low consumption and high performance are maintained, the processing unit can be connected with one or more links, input data can be acquired, analyzed, processed, forwarded and the like according to application and business requirements, a digital operation flow of field investigation design and a linking scheme of field operation flow are provided, effective control of quality of data results can be achieved, risk of early engineering cost hyperbranched is reduced, the problem of large data quantity and recorded error of manual investigation points is solved, steps of manual investigation recording information are reduced, manual operation quantity of manual investigation operation collection is simplified, and production efficiency is improved.
Fig. 3 is a schematic flow chart of a data acquisition method for railway investigation according to an embodiment of the present disclosure, where the method provided by the embodiment of the present disclosure may be performed by a data acquisition device for railway investigation, and the device may be implemented by software and/or hardware and may be integrated on any electronic device having computing capability, such as a smart phone, a tablet computer, or a user terminal.
As shown in fig. 3, a data acquisition method for railway investigation provided by an embodiment of the present disclosure may include:
step 301, creating a socket for communication between parent-child processes to achieve C/S communication between the Nginx server and a plurality of mobile terminals.
Step 302, after the communication mechanism is established, in response to receiving a request carrying terminal identification information sent by a mobile terminal, generating a socket handle of communication when the terminal identification information meets a preset matching condition, and starting a channel process based on the socket handle.
And 303, monitoring a designated interface, processing the railway investigation data sent by the mobile terminal based on a sub-process corresponding to the mobile terminal when the railway investigation data sent by the mobile terminal is monitored, generating a railway investigation result matched with a designated template, and sending the railway investigation result to the mobile terminal.
The method of the embodiment is applied to the Nginx server.
For example, by filling in the socket file location of vue-server in the nmginx configuration file, the application layer data is copied from one process to another; after the file position is obtained, an http request is received through a monitoring 80 port, namely, the http request is routed to a system root directory, and when the system is requested to download an admin file, the http request is reversely proxied to a dty-form; the fastcgi module of the nginx is loaded, and the TCP mode dyt-form is utilized to monitor the IP address and the port; the communication between the dty-form and the nginx is completed through the program, the investigation operation acquisition faces high concurrency service, and the TCP Socket load balancing maintenance efficiency of the scheme is adopted.
In this embodiment, the nginnx server further includes a plurality of acquisition processing units, where the acquisition processing units include an acquisition processing module, a shared memory, and a system monitoring module, each mobile terminal corresponds to four acquisition processing units, one acquisition processing unit is in a master control state, and three acquisition processing units are in a standby state, and the method further includes: the first acquisition processing unit in the main control state is adopted to communicate with the first mobile terminal, and the first mobile terminal also corresponds to the second acquisition processing unit in the standby state; when the first mobile terminal is detected to be in a network-free state, switching a first acquisition processing unit in a main control state to a second acquisition processing unit in a standby state, adopting the second acquisition processing unit in the standby state to perform data caching, and continuously monitoring the network state of the first mobile terminal; when the first mobile terminal is monitored to be in a network state, the second acquisition processing unit in a standby state is switched to the first acquisition processing unit in a main control state, and the first acquisition processing unit in the main control state is adopted to communicate with the first mobile terminal based on the cached data.
In this embodiment, all processes in the nmginx service are stored based on an array; when a new sub-process is created, the number of processes in the array is obtained, when the number of processes in the array is detected to be smaller than the maximum number, a position is allocated for the new sub-process in a process pool, and when the number of processes in the array is detected to be equal to the maximum number, error reporting prompt information is generated.
Wherein the maximum number is 1024. The Nginx server is particularly used for calling a socketpair to create a domain socket pair and is set into an asynchronous mode; and informing the position of the new sub-process in the process pool of the existing sub-process through the domain socket.
According to the data acquisition method for railway investigation, the application programming interface of the investigation acquisition mobile terminal is communicated with the high-availability load balancing server, after a socket is established, asynchronous non-blocking is processed based on anti-concurrency nginx, the high-availability load balancing railway four-electricity data acquisition system increases access business of the multi-field investigation acquisition mobile terminal, low resources, low consumption and high performance are maintained, the processing unit can be connected into one or more links, input data can be acquired, analyzed, processed, forwarded and the like according to application and business requirements, the problem of large data quantity and recorded error of a manual investigation point is solved, steps of manual investigation recording information are reduced, manual operation quantity of investigation operation acquisition is simplified, and production efficiency is improved.
The embodiment of the disclosure also provides a data acquisition device for railway investigation, which comprises: the system comprises a creation module, a generation module and a processing module.
The creating module is used for creating a socket communicated between parent-child processes so as to realize C/S communication between the Web server and a plurality of mobile terminals.
The generation module is used for responding to a request carrying terminal identification information sent by a receiving mobile terminal after a communication mechanism is established, generating a socket handle of communication when the terminal identification information meets a preset matching condition, and starting a channel process based on the socket handle.
The processing module is used for monitoring a specified interface, processing the railway investigation data sent by the mobile terminal based on a subprocess corresponding to the mobile terminal when the railway investigation data sent by the mobile terminal is monitored, generating a railway investigation result matched with a specified template, and sending the railway investigation result to the mobile terminal.
The data acquisition device for railway investigation provided by the embodiment of the disclosure can execute any data acquisition method for railway investigation provided by the embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method. Details of the embodiments of the apparatus of the present disclosure that are not described in detail may refer to descriptions of any of the embodiments of the method of the present disclosure.
The disclosed embodiments also provide an electronic device that includes one or more processors and memory.
The processor may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device to perform the desired functions.
The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, random Access Memory (RAM) and/or cache memory (cache) and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer readable storage medium and a processor may execute the program instructions to implement the methods of embodiments of the present disclosure above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, and the like may also be stored in the computer-readable storage medium.
In one example, the electronic device may further include: input devices and output devices, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown). In addition, the input device may include, for example, a keyboard, a mouse, and the like. The output device may output various information including the determined distance information, direction information, etc., to the outside. The output means may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, etc.
In addition to the methods and apparatus described above, embodiments of the present disclosure may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform any of the methods provided by the embodiments of the present disclosure.
The computer program product 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, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, cause the processor to perform any of the methods provided by the embodiments of the present disclosure.
A computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A data acquisition method for railway investigation, characterized by being applied to a Web server, the method comprising:
creating a socket for communication between parent-child processes to realize C/S communication between the Web server and a plurality of mobile terminals;
after a communication mechanism is established, responding to a request which is sent by a receiving mobile terminal and carries terminal identification information, generating a socket handle of communication when the terminal identification information meets a preset matching condition, and starting a channel process based on the socket handle;
monitoring a specified interface, when railway investigation data sent by the mobile terminal is monitored, processing the railway investigation data sent by the mobile terminal based on a subprocess corresponding to the mobile terminal, generating a railway investigation result matched with a specified template, and sending the railway investigation result to the mobile terminal;
the Web server further comprises a plurality of acquisition processing units, each acquisition processing unit comprises an acquisition processing module, a shared memory and a system monitoring module, wherein each mobile terminal corresponds to four acquisition processing units, one acquisition processing unit is in a main control state, and the three acquisition processing units are in a standby state, and the method further comprises:
the method comprises the steps that a first acquisition processing unit in a main control state is adopted to communicate with a first mobile terminal, and the first mobile terminal also corresponds to a second acquisition processing unit in a standby state;
when the first mobile terminal is detected to be in a network-free state, switching the first acquisition processing unit in a main control state to a second acquisition processing unit in a standby state, adopting the second acquisition processing unit in the standby state to perform data caching, and continuously monitoring the network state of the first mobile terminal; when the first mobile terminal is monitored to be in a network state, the second acquisition processing unit in a standby state is switched to the first acquisition processing unit in a main control state, and the first acquisition processing unit in the main control state is adopted to communicate with the first mobile terminal based on the cached data.
2. The method as recited in claim 1, further comprising:
storing all processes in the Web service based on the array; when a new sub-process is created, the number of processes in the array is obtained, when the number of processes in the array is detected to be smaller than the maximum number, a position is allocated to the new sub-process in a process pool, and when the number of processes in the array is detected to be equal to the maximum number, error reporting prompt information is generated.
3. The method of claim 2, wherein the maximum number is 1024.
4. The method of claim 2, wherein the depositing all processes in the Web service based on the array comprises:
calling a socketpair to create a domain socket pair and setting the domain socket pair into an asynchronous mode; and informing the position of the new sub-process in the process pool of the existing sub-process through the domain nested word.
5. The method of claim 1, wherein the monitoring of the railroad survey data transmitted by the mobile terminal comprises:
receiving the worksite specification attribute information sent by the mobile terminal, wherein the worksite specification attribute information is obtained by the mobile terminal through receiving the selection operation of a user on a selection control on an interactive interface; or alternatively, the process may be performed,
and receiving the graphic information sent by the mobile terminal, wherein the graphic information is generated by the mobile terminal acquiring an image data accessory acquired by a camera and/or an image data accessory locally stored in the terminal and automatically cutting and compressing and encrypting a graphic area of the image data accessory.
6. The method as recited in claim 1, further comprising:
determining an integer mileage corresponding to each acquisition element according to an integer mileage interval of each acquisition element in the railway survey data in a railway route, calculating a mileage fraction according to a proportion of the integer mileage of each acquisition element, and generating a table index according to the integer mileage and the mileage fraction, wherein the acquisition elements comprise facility symbols, power lines, communication lines and oil and gas pipelines.
7. A data acquisition system for a railroad survey, comprising:
a Web server and a plurality of mobile terminals;
the mobile terminal is used for acquiring railway investigation data and sending the railway investigation data to the Web server;
the Web server is used for creating a socket for communication between parent-child processes so as to realize C/S communication between the Web server and the plurality of mobile terminals; after a communication mechanism is established, responding to a request which is sent by a receiving mobile terminal and carries terminal identification information, generating a socket handle of communication when the terminal identification information meets a preset matching condition, and starting a channel process based on the socket handle;
the Web server is also used for monitoring a specified interface, processing the railway investigation data sent by the mobile terminal based on a subprocess corresponding to the mobile terminal when the railway investigation data sent by the mobile terminal is monitored, generating a railway investigation result matched with a specified template, and sending the railway investigation result to the mobile terminal;
the Web server further comprises a plurality of acquisition processing units, wherein each acquisition processing unit comprises an acquisition processing module, a shared memory and a system monitoring module, each mobile terminal corresponds to four acquisition processing units, one acquisition processing unit is in a main control state, and the three acquisition processing units are in a standby state;
the Web server adopts a first acquisition processing unit in a main control state to communicate with a first mobile terminal, and the first mobile terminal also corresponds to a second acquisition processing unit in a standby state;
the Web server is further configured to switch the first acquisition processing unit in a master control state to a second acquisition processing unit in a standby state when the first mobile terminal is detected to be in a network-free state, and perform data caching by adopting the second acquisition processing unit in the standby state, and continuously monitor the network state of the first mobile terminal; when the first mobile terminal is monitored to be in a network state, the second acquisition processing unit in a standby state is switched to the first acquisition processing unit in a main control state, and the first acquisition processing unit in the main control state is adopted to communicate with the first mobile terminal based on the cached data.
8. The system of claim 7, wherein the mobile terminal is specifically configured to receive a selection operation of a selection control on the interactive interface by a user, obtain worksite specification attribute information, and send the worksite specification attribute information to the Web server; or alternatively, the process may be performed,
and acquiring an image data accessory acquired by a camera and/or an image data accessory locally stored in a terminal, automatically cutting and compressing a graphic area of the image data accessory and encrypting to generate graphic information, and transmitting the graphic information to a Web server.
CN202210802323.7A 2022-07-07 2022-07-07 Data acquisition method and system for railway investigation Active CN115190149B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210802323.7A CN115190149B (en) 2022-07-07 2022-07-07 Data acquisition method and system for railway investigation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210802323.7A CN115190149B (en) 2022-07-07 2022-07-07 Data acquisition method and system for railway investigation

Publications (2)

Publication Number Publication Date
CN115190149A CN115190149A (en) 2022-10-14
CN115190149B true CN115190149B (en) 2023-04-25

Family

ID=83516957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210802323.7A Active CN115190149B (en) 2022-07-07 2022-07-07 Data acquisition method and system for railway investigation

Country Status (1)

Country Link
CN (1) CN115190149B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6192389B1 (en) * 1997-03-28 2001-02-20 International Business Machines Corporation Method and apparatus for transferring file descriptors in a multiprocess, multithreaded client/server system
CN106254646A (en) * 2016-08-02 2016-12-21 北京小米移动软件有限公司 Network flux statistical method and device
CN106530655A (en) * 2016-11-08 2017-03-22 山东大学 Heterogeneous network transmission method used for seismic prospecting data wireless acquisition
CN109101615A (en) * 2018-08-07 2018-12-28 中国石油天然气集团有限公司 Method for processing seismic exploration data and device
CN111238571A (en) * 2020-03-09 2020-06-05 南通润雅机电科技有限公司 Remote monitoring system for power utilization condition of elevator control equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017024965A1 (en) * 2015-08-11 2017-02-16 阿里巴巴集团控股有限公司 Method and system for limiting data traffic

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6192389B1 (en) * 1997-03-28 2001-02-20 International Business Machines Corporation Method and apparatus for transferring file descriptors in a multiprocess, multithreaded client/server system
CN106254646A (en) * 2016-08-02 2016-12-21 北京小米移动软件有限公司 Network flux statistical method and device
CN106530655A (en) * 2016-11-08 2017-03-22 山东大学 Heterogeneous network transmission method used for seismic prospecting data wireless acquisition
CN109101615A (en) * 2018-08-07 2018-12-28 中国石油天然气集团有限公司 Method for processing seismic exploration data and device
CN111238571A (en) * 2020-03-09 2020-06-05 南通润雅机电科技有限公司 Remote monitoring system for power utilization condition of elevator control equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
韩立 等."基于Web的网络测试仪器及应用".《中国测试》.2011,第37卷(第6期),全文. *

Also Published As

Publication number Publication date
CN115190149A (en) 2022-10-14

Similar Documents

Publication Publication Date Title
US10275409B2 (en) Metadata manager for analytics system
CN109862064B (en) Configuration method and device for remote monitoring of equipment
TWI536288B (en) Project schedule control method and its system
US20120191649A1 (en) Data Transfer Method and Server Computer System
CN110798445B (en) Public gateway interface testing method and device, computer equipment and storage medium
JP7076471B2 (en) File transmission in instant communication applications
US11502899B2 (en) Dynamic product installation based on user feedback
CN112615746B (en) Edge calculation method, device and system
CN110737726B (en) Method and device for determining test data of interface to be tested
CN112269799A (en) Data query method, device, equipment and medium
US20200363775A1 (en) Recommending visual and execution templates to enable automation of control and data exploration across systems
US20210397646A1 (en) Method, electronic device, and storage medium for processing visual data of deep model
CN115190149B (en) Data acquisition method and system for railway investigation
CN111782382A (en) Task processing method and device, storage medium and electronic equipment
WO2020238131A1 (en) Web crawler system testing method and apparatus, storage medium, and electronic device
CN115860877A (en) Product marketing method, device, equipment and medium
CN111367500A (en) Data processing method and device
CN114297495A (en) Service data searching method and device, electronic equipment and storage medium
CN112860247A (en) Custom generation method, device, equipment and medium for model component
CN111124365A (en) RPA demand collection method and device
CN113515715A (en) Generating method, processing method and related equipment of buried point event code
CN111489227A (en) E-commerce information sharing system
US11880699B2 (en) Platform to control one or more systems and explore data across one or more systems
CN112597220B (en) Data file reading method, device, electronic equipment and medium
JP2023132617A (en) Information processing method, information processor, and program

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
GR01 Patent grant
GR01 Patent grant