Method and device for deploying seismic acquisition algorithm, storage medium and electronic equipment
By deploying the seismic acquisition algorithm developed in C++ or C language on the cloud server and setting an interface layer between the local device and the cloud server, the problem of re-implementation of the seismic acquisition algorithm in the existing technology needs to be re-implemented when deploying in the cloud computing environment, and efficient and low-cost algorithms are achieved.
Patent Information
- Application Number
- CN202311734791.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-06-17
AI Technical Summary
When the existing oil and gas seismic exploration and seismic acquisition algorithm is deployed in a cloud computing environment, it needs to be re-implemented to adapt to the cloud computing framework, resulting in high development thresholds, low efficiency and high cost, and low algorithm operation efficiency.
By deploying a seismic acquisition algorithm developed based on C++ or C language on the cloud server, and setting an interface layer between the local device and the cloud server, the mutual conversion and interaction of data and algorithms are realized, and the reconstruction and development of algorithms is avoided.
The rapid cloud access of earthquake acquisition algorithms is realized, the efficiency and applicability of algorithms are improved, development costs and time are reduced, and the algorithm is operating efficiently.
Smart Images

Figure CN120162049A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of oil and gas seismic exploration software development, and particularly to a method, device, storage medium and electronic device for deploying seismic acquisition algorithms. Background Art
[0002] In the field of oil and gas seismic exploration acquisition, due to the huge amount of data, seismic acquisition algorithms require a large amount of computing resources during the process of running and acquiring seismic acquisition data. In order to improve the computing efficiency, high-performance workstations are needed. And during the computing process, the workstation is in a high-load state, and other work needs to be suspended to wait for the computing to end, which will cause other work to not be effectively processed.
[0003] With the development of cloud computing technology, by submitting seismic acquisition data that occupies a large amount of computing resources to the cloud and using the servers with high-performance computing power in the cloud to accelerate the computing process, not only can the investment in local devices for computing seismic acquisition data be reduced, but also the workload of local devices can be released.
[0004] However, currently, in order to improve the running efficiency of algorithms, seismic acquisition algorithms for oil and gas seismic exploration are generally developed in C++ or C language, while cloud computing frameworks are generally developed in Java. Therefore, if it is necessary to deploy seismic acquisition algorithms to the cloud, receive seismic acquisition data uploaded by local devices based on the cloud computing framework for computing, and return the computing results to local devices through the cloud computing framework to achieve cloud computing, it is necessary to re-implement the seismic acquisition algorithm in a language supported by the cloud computing framework (such as Java language) to support the seismic acquisition data uploaded by the cloud computing framework. It is necessary to reconstruct and develop the seismic acquisition algorithm, which has a high development threshold, resulting in low efficiency and high cost in deploying the seismic acquisition algorithm. Moreover, the reconstructed and developed seismic acquisition algorithm has a lower algorithm running efficiency compared to the seismic acquisition algorithm developed in C++ or C language. Summary of the Invention
[0005] In view of this, the present invention provides a method, device, storage medium and electronic device for deploying seismic acquisition algorithms.
[0006] Specifically, the present invention is implemented through the following technical solutions:
[0007] According to a first aspect of the present invention, there is provided a method for deploying a seismic acquisition algorithm, the method comprising:
[0008] Deploying a seismic acquisition algorithm developed based on C++ language or C language on a cloud server;
[0009] Based on the web development framework language, an interface layer between the local device and the cloud server is set up. The interface layer is used to parse the data in the web development framework language sent to the cloud server into data in C++ language or C language on the cloud server side, and to parse the data in C++ language or C language output by the cloud server into data in the web development framework language on the cloud server side and transmit it to the local device;
[0010] The to-be-calculated seismic acquisition data in the local device and the target seismic acquisition algorithm for calculating the to-be-calculated seismic acquisition data are transmitted to the cloud server by using the interface layer, and the calculation result of the cloud server calculating the to-be-calculated seismic acquisition data according to the target seismic acquisition algorithm is obtained.
[0011] In the method for deploying the seismic acquisition algorithm in this embodiment, an interface layer is established between the call layer and the algorithm layer to mutually convert the data in the web development framework language and the data in C++ language or C language. The interface layer is responsible for functions such as cloud computing data interaction and network communication. The algorithm layer can support local algorithms, so as to realize the rapid cloudification of existing algorithms such as C++ and C in local applications, and has better algorithm cloudification efficiency and applicability.
[0012] According to the second aspect of the present invention, a device for deploying a seismic acquisition algorithm is provided. The fatigue detection device for driving training includes:
[0013] An algorithm deployment module for deploying a seismic acquisition algorithm developed in C++ language or C language on the cloud server;
[0014] An interface setting module for setting an interface layer between the local device and the cloud server based on the web development framework language. The interface layer is used to parse the data in the web development framework language sent to the cloud server into data in C++ language or C language on the cloud server side, and to parse the data in C++ language or C language output by the cloud server into data in the web development framework language on the cloud server side and transmit it to the local device;
[0015] A cloud computing module for transmitting the to-be-calculated seismic acquisition data in the local device and the target seismic acquisition algorithm for calculating the to-be-calculated seismic acquisition data to the cloud server by using the interface layer, and obtaining the calculation result of the cloud server calculating the to-be-calculated seismic acquisition data according to the target seismic acquisition algorithm.
[0016] According to a third aspect of the present invention, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for deploying a seismic acquisition algorithm in any possible implementation manner of the first aspect.
[0017] According to a fourth aspect of the present invention, there is provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for deploying a seismic acquisition algorithm in any possible implementation manner of the first aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present invention and, together with the specification, are used to explain the principles of the present invention.
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the related art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0020] Figure 1 It is a schematic flowchart of a method for deploying a seismic acquisition algorithm provided by an embodiment of the present invention;
[0021] Figure 2 It is a schematic diagram of data structure conversion in a method for deploying a seismic acquisition algorithm provided by an embodiment of the present invention;
[0022] Figure 3 It is a schematic diagram of an input parameter information interaction interface in a method for deploying a seismic acquisition algorithm provided by an embodiment of the present invention;
[0023] Figure 4 It is another schematic flowchart of a method for deploying a seismic acquisition algorithm provided by an embodiment of the present invention;
[0024] Figure 5 It is a schematic diagram of a device for deploying a seismic acquisition algorithm provided by an embodiment of the present invention;
[0025] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0027] By submitting seismic acquisition data that occupies a large amount of computing resources to the cloud to implement cloud computing, high-performance computing servers in the cloud can be utilized to accelerate the computing process. On the one hand, it reduces the investment in local devices for computing seismic acquisition data, and on the other hand, it can also relieve the workload of local devices so as not to affect the normal processing of other tasks.
[0028] In the related art, seismic acquisition algorithms for oil and gas seismic exploration are generally developed using C++ and C languages to improve the operation efficiency of the algorithms, while cloud computing frameworks are generally developed using Java. Therefore, when deploying seismic acquisition algorithms to the cloud to implement cloud computing, it is necessary to re-implement the seismic acquisition algorithms using languages supported by the cloud computing framework (such as Java language) to be compatible with the seismic acquisition data uploaded by the cloud computing framework. The development threshold is high and the development time required is long, resulting in low efficiency and high cost in deploying seismic acquisition algorithms. Moreover, the seismic acquisition algorithms re-developed based on the Java language have relatively lower operation efficiency compared to the seismic acquisition algorithms developed using C++ and C languages.
[0029] In this embodiment, it is considered to deploy seismic acquisition algorithms developed using C++ and C languages on the cloud server. By setting an interface based on the cloud computing framework as a communication relay, the seismic acquisition data supported by the cloud computing framework is converted into seismic acquisition data supported by C++ and C languages, realizing the interaction and communication of seismic acquisition data between the seismic acquisition algorithms based on C++ and C languages deployed on the cloud server and local devices. Thus, by using the interface, without reconstructing the seismic acquisition algorithms developed in languages such as C++ and C, the low-cost cloudification of seismic acquisition algorithms can be achieved.
[0030] See Figure 1 , the embodiments of the present invention provide a method for deploying seismic acquisition algorithms, and the method may include the following steps:
[0031] S101. Deploy the seismic acquisition algorithm developed based on the C++ language or C language on the cloud server;
[0032] In this embodiment, taking the seismic acquisition algorithm as the tomography static correction algorithm in the field of seismic exploration as an example, the tomography static correction algorithm has the following characteristics: long calculation time and high computing power requirements. Therefore, there is a need for cloud computing. By performing cloud deployment on the tomography static correction algorithm, cloud computing can be carried out using the cloud server with high-performance computing power in the cloud, avoiding the need to upgrade the performance and computing power of local devices, resulting in high computing costs and affecting the operation of other services on local devices.
[0033] S102. Based on the network development framework language, set the interface layer between the local device and the cloud server. The interface layer is used to parse the data based on the network development framework language sent to the cloud server into data based on C++ language or C language on the cloud server side, and to parse the data based on C++ language or C language output by the cloud server into data based on the network development framework language on the cloud server side and transmit it to the local device.
[0034] In this embodiment, by setting up a network development framework including a call layer, an interface layer, and an algorithm layer, the interface layer is between the call layer and the algorithm layer and is implemented based on the network development framework. Among them, the local device corresponds to the call layer, the cloud server corresponds to the algorithm layer, and the interface corresponds to the interface layer. As an optional embodiment, the network development framework includes but is not limited to: Java framework, Python framework, Go framework, etc., which are used to implement functions such as cloud computing data interaction and network communication between the algorithm layer and the interface layer, and between the interface layer and the call layer. The algorithm layer is used to deploy the seismic acquisition algorithm. The seismic acquisition algorithm deployed in the algorithm layer is the same as that deployed on the local device, and it can support development using C language, C++ language, etc., without modifying the existing seismic acquisition algorithm, which can ensure a high operation efficiency of the algorithm.
[0035] In this embodiment, the interface layer serves as a transfer layer for the algorithm layer. As an optional embodiment, the interface layer and the call layer establish a HyperText Transfer Protocol (HTTP) connection, and the interface layer and the algorithm layer establish a socket (SOCKET) connection. In this way, the algorithm layer only needs to focus on the algorithm, and the interface layer only needs to focus on network-related technologies, thus realizing the rapid migration of existing algorithms developed based on languages such as C++ and C to the cloud.
[0036] In this embodiment, a parameter passing method is predefined at the interface layer. As an alternative embodiment, the parameter passing method includes: a method for uploading seismic acquisition data calculated by a seismic acquisition algorithm for a cloud server, and a method for downloading the calculation result back to a local device (client), that is, data based on a web development framework language sent to the cloud server is parsed into data based on the C++ language or the C language on the cloud server, and data based on the C++ language or the C language output by the cloud server is parsed into data based on the web development framework language on the cloud server side.
[0037] In this embodiment, the seismic acquisition algorithm can be deployed in one or more cloud servers. For the case of being deployed in multiple cloud servers, as an alternative embodiment, a resource management and deployment method can also be defined at the interface layer. The resource management and deployment method is used to control the cloud computing deployment of the seismic acquisition algorithm, and the allocation and load balancing of computing resources such as CPUs, GPUs, and memory. As another alternative embodiment, during the operation of the cloud server, the seismic acquisition algorithm can also be scheduled. Therefore, an algorithm scheduling method can also be defined at the interface layer. The algorithm scheduling method is used to schedule the start, stop, pause, and calculation progress feedback method of the seismic acquisition algorithm on the cloud server.
[0038] In this embodiment, taking the cloud deployment of the tomographic static correction algorithm as an example, the cloud deployment is architecturally divided into a call layer, an interface layer, and an algorithm layer; the call layer (local device) serves as the initiator of cloud computing and the receiver of calculation results. The interface layer implements a network API for interacting with the local device through the HTTP protocol and establishing a long connection with the algorithm layer through the SOCKET protocol for transmitting data, starting and stopping calculation instructions, and receiving calculation results. In this way, by setting the interface layer, developers only need to add the tomographic static correction algorithm developed based on C++ to the algorithm layer without caring about the web development framework related to cloud computing, thus achieving the goal of quickly deploying the tomographic static correction algorithm to the cloud.
[0039] In this embodiment, the interface layer and the algorithm layer adopt microservices and are encapsulated using container technology, which can be seamlessly embedded into the cloud native ecosystem and thus deployed to the cloud native platform. By applying container orchestration technology, computing resources can be flexibly allocated, and each seismic acquisition algorithm instance is independently deployed and securely isolated. It can support the cluster deployment of multiple seismic acquisition algorithm instances, ensuring that in the case of a failure of a certain seismic acquisition instance, through the scheduling of the interface layer, the cloud (algorithm layer) can still provide stable services, achieving the goal of high availability.
[0040] S103. Transmit the seismic acquisition data to be calculated in the local device and the target seismic acquisition algorithm for calculating the seismic acquisition data to be calculated to the cloud server through the interface layer, and obtain the calculation result of the cloud server calculating the seismic acquisition data to be calculated according to the target seismic acquisition algorithm.
[0041] In this embodiment, for the case where multiple cloud servers are deployed with seismic acquisition algorithms, it is necessary to determine the cloud server for calculating seismic acquisition data. As an alternative embodiment, before transmitting to the cloud server through the interface layer, the method further includes:
[0042] Obtain the loads of each cloud server deployed with the target seismic acquisition algorithm;
[0043] Based on the load balancing strategy, select a target cloud server, and transmit the seismic acquisition data to be calculated and the target seismic acquisition algorithm to the target cloud server.
[0044] In this embodiment, when the interface layer calls the algorithm layer to calculate seismic acquisition data, weights are assigned according to the static computing power performance of each seismic acquisition algorithm instance (the computing power performance of the cloud server), and in combination with the current occupancy rates of the CPU, GPU, memory, etc., the calculation task is assigned to the cloud server corresponding to the most suitable seismic acquisition algorithm instance, so as to achieve dynamic load balancing of each cloud server.
[0045] In this embodiment, the interface layer and the algorithm layer are deployed on the cloud native platform in the form of containers, allowing multiple algorithm instances to achieve high system availability; when the interface layer is called, the calculation tasks are assigned to the most suitable algorithm instance among multiple algorithm instances according to the pre-allocated computing power weights and in combination with the current computing resource occupancy rates, so as to achieve dynamic load balancing of the system.
[0046] In this embodiment, as an alternative embodiment, transmitting the seismic acquisition data to be calculated in the local device and the target seismic acquisition algorithm for calculating the seismic acquisition data to be calculated to the cloud server through the interface layer includes:
[0047] A11. Determine the storage path of the seismic acquisition data to be calculated in the local device and the target seismic acquisition algorithm for calculating the seismic acquisition data to be calculated;
[0048] In this embodiment, for seismic acquisition data with a large amount of data, directly performing data transmission requires a long data transmission time. As an alternative embodiment, the seismic acquisition data is pre-uploaded to the cloud for storage, and the storage path of the storage is obtained.
[0049] In this embodiment, as an alternative embodiment, the local device needs to convert the data structure of the stored data into the data structure on the network development framework side for transmission. Among them, the data structure on the network development framework side is a file group structure, and the cloud storage stores and manages the file group in the form of data nodes.
[0050] Figure 2 It is a schematic diagram of data structure conversion in a method for deploying a seismic acquisition algorithm provided by an embodiment of the present invention. As Figure 2 shown, on the left side of the figure is the data structure (data information table) of the local device, and on the right side is the data structure on the network development framework side. By parsing the data structure of the local device, each file name (file-name) is obtained from the file list (file-list) of the local device, a file identifier (file-id) is set for each file name, and based on the data identifier (data-id) and data name (data-name) corresponding to each file name, the data size (Size) of the corresponding file name is obtained. According to the file name, file identifier, and data size, a file structure (file information table) on the network development framework side is constructed. In this embodiment, as an alternative embodiment, the network development framework side manages data through data nodes, completes the conversion between the data structure and the file. In this way, file type parameters are uploaded to the cloud storage in advance and transmitted in the form of a storage link; the data structure is converted into a form of a group of files, managed by data nodes, and after the group of files is uploaded to the cloud storage, it is transmitted in the form of a node ID. In subsequent calculations, the seismic acquisition algorithm can directly obtain the internal data structure for calculation by calling the data node.
[0051] A12. Using the network development framework language, encapsulate the storage path and the target seismic acquisition algorithm, and transmit them to the cloud server through the interface layer;
[0052] In this embodiment, the local device and the interface communicate using the http protocol. As an alternative embodiment, the local device encapsulates the storage path and the target seismic acquisition algorithm into an http protocol algorithm parameter acquisition message using the network development framework language and sends it to the interface. The interface converts the http protocol algorithm parameter acquisition message into a socket protocol algorithm parameter acquisition message and sends it to the cloud server.
[0053] A13. Parse the storage path and the target seismic acquisition algorithm encapsulated using the network development framework language to obtain the storage path and the target seismic acquisition algorithm;
[0054] In this embodiment, the interface for the cloud server to receive data (the output interface of the interface layer) receives the socket protocol algorithm parameter acquisition message and parses it into a storage path and a target seismic acquisition algorithm based on the C++ language or the C language.
[0055] A14. Obtain the description information and parameter information of the target seismic acquisition algorithm in the cloud server, encapsulate the description information and parameter information using the network development framework language to obtain an algorithm encapsulation file, and transmit it to the local device through the interface layer;
[0056] In this embodiment, based on the parsed target seismic acquisition algorithm, the cloud server extracts the description information and parameter information of the target seismic acquisition algorithm. As an alternative embodiment, the description information is the basic information used to describe the algorithm, including but not limited to: algorithm name, algorithm version, algorithm description, algorithm author, algorithm release date, and the parameter information includes but not limited to: input parameter information and output parameter information.
[0057] A15. Parse the algorithm encapsulation file, edit the parsed parameter information, encapsulate and generate parameter editing information using the network development framework language, and transmit it to the cloud server through the interface layer;
[0058] In this embodiment, as an alternative embodiment, the basic information (description information) of the parsed algorithm is represented in the form of {"name":"","version":"","desp":"","author":"","date":""}.
[0059] In this embodiment, as an alternative embodiment, encapsulating and generating parameter editing information using the network development framework language includes:
[0060] Map the basic data type information in the edited parameter information to JSON key-value pair information;
[0061] For the non-basic data type information in the edited parameter information, upload the non-basic data type information to cloud storage, and use JSON to record the cloud storage location to obtain JSON cloud storage location information;
[0062] Use the network development framework language to encapsulate the JSON key-value pair information and JSON cloud storage location information to generate parameter editing information.
[0063] In this embodiment, taking the input parameter information as an example, it includes: basic data type information and non-basic data type information. For the basic data type information, when encapsulating after editing, for example, information such as string type, integer type, floating point type, etc., it can be directly represented in the form of JSON key-value pairs; for the non-basic data type information, for example, information such as external files, internal data structures, etc., the non-basic data type information is uploaded to cloud storage, and the cloud storage location is recorded using JSON. For the output parameter information, after the calculation is completed, the calculation result is temporarily stored in cloud storage, and the cloud storage location is recorded using JSON. The client obtains the calculation result from the cloud storage and downloads it according to the returned JSON record.
[0064] In this embodiment, for the non-basic data type information, as an alternative embodiment, the data structure of the local device includes: file name, file type, and file storage path, that is: {"fileName":"","fileType":"","fileUrl":[""]}, where, as an alternative embodiment, fileType is the file suffix name, which is used to filter files that meet the requirements of the seismic acquisition algorithm when uploading files, and fileUrl records the file link address uploaded to cloud storage, that is, the file storage path. After data structure conversion, the corresponding JSON record is: {"nodeType":"","nodeId":""}, where nodeType represents the type of the data structure, and the storage location of the data node can be obtained through nodeId.
[0065] In this embodiment, as an alternative embodiment, the web development framework language includes but is not limited to JSON language. Using JSON language as the language for encapsulating description information and parameter information, by defining description information and parameter information using JSON language, when displaying on the client side, the basic information of the algorithm can be obtained according to the description information of the seismic acquisition algorithm, and the calculation data can be organized, the parameter values can be edited, and the calculation result download path can be set according to the parameter information.
[0066] In this embodiment, according to the JSON descriptions of the input parameter information and the output parameter information, an interactive interface for input parameter information and calculation result output is constructed on the client side to facilitate user setting.
[0067] Figure 3 It is a schematic diagram of the input parameter information interactive interface in a method for deploying a seismic acquisition algorithm provided by an embodiment of the present invention. As Figure 3As shown. In this embodiment, according to the actual usage parameters of the algorithm, input parameter information is generated. As an alternative embodiment, the input parameter information (cloud computing input parameters) interaction interface includes, but is not limited to: basic data type information (algorithm description), non-basic data type information, where the non-basic data type information includes mandatory parameters and optional parameters. Among them, the algorithm description includes: algorithm name, author, version, and release date. The mandatory parameters include: project, sheme, first parameter value, second parameter value, third parameter value, file storage path, and data node name. In this embodiment, the input parameter information is described using JSON.
[0068] In this embodiment, the call layer automatically constructs a user interaction interface according to the input parameter information definition and output parameter information definition of the seismic acquisition algorithm, customizes and describes the information, input parameter information, and output parameter information using JSON markup language, edits the parameter content, fills it into the algorithm description JSON, and then transfers it between the call layer and the interface layer.
[0069] A16, parse the parameter editing information encapsulated using the network development framework language, obtain the edited parameter information, and assign values to the target seismic acquisition algorithm in the cloud server.
[0070] In this embodiment, the calling layer encapsulates the seismic acquisition data to be calculated and the seismic acquisition target algorithm using a web development framework language. That is, for the basic data type information in the seismic acquisition data to be calculated, it is converted into JSON key-value pairs; for the non-basic data type information in the seismic acquisition data to be calculated, the non-basic data type information is uploaded to cloud storage, and the cloud storage location is recorded using JSON, and the file storage Uniform Resource Locator (URL) information is obtained. For example, the seismic acquisition data to be calculated is stored in an Object Storage Service (OBS), and the JSON key-value pairs, URL information, and the seismic acquisition target algorithm are encapsulated to obtain the seismic acquisition data file to be calculated. The interface layer parses the received seismic acquisition data file on the cloud server side, encapsulates it into a file based on the C language or C++ language according to the parsed result, and transmits it to the cloud server. The cloud server parses it, obtains the input parameter information of the seismic acquisition target algorithm based on the parsed result, and the calling layer edits according to the input parameter information returned by the interface layer to improve the JSON description of the input parameter information, stores the returned file storage URL information, encapsulates the improved input parameter information (JSON content) into JSON format information, submits it to the interface layer, and forwards it to the algorithm layer through the interface layer. The algorithm layer parses and obtains the edited input parameter information, extracts the seismic acquisition data file to be calculated according to the file storage URL information, runs the seismic acquisition target algorithm based on the edited input parameter information, and calculates the extracted seismic acquisition data file to obtain the calculation result.
[0071] In this embodiment, as an optional embodiment, obtaining the calculation result of the seismic acquisition data to be calculated by the cloud server according to the target seismic acquisition algorithm includes:
[0072] B11, the cloud server starts the assigned target seismic acquisition algorithm, reads the seismic acquisition data to be calculated from the storage path for operation, and obtains the calculation result;
[0073] In this embodiment, in the algorithm layer, according to the JSON description of the seismic acquisition algorithm, a call class of the seismic acquisition algorithm is implemented, and the data structures of the input parameter information and output parameter information of the algorithm, as well as the management interfaces such as the start, stop, and progress of the algorithm are implemented in the call class. As an optional embodiment, the input parameter information JSON of the algorithm is instantiated into an algorithm call class object through a JSON serialization tool.
[0074] B12, store the calculation result, and obtain the result file storage path information for storing the calculation result;
[0075] B13. Use the network development framework language to encapsulate the result file storage path information to obtain a result encapsulation file, and transmit it to the local device through the interface layer;
[0076] In this embodiment, in the algorithm layer, the description information is parsed and obtained, and the tool for deserializing the JSON sequence representing the description information into a C++ Object is used. According to the algorithm name or algorithm ID in the description information, the C++ class (Object) sequence is instantiated, and operations are performed based on the seismic acquisition data to be calculated to obtain the calculation result.
[0077] After obtaining the calculation result, use the reflection mechanism of JAVA to serialize the calculation result into a JSON output parameter. That is, serialize the calculation result represented by the C++ Object sequence into a JSON sequence, so that the input parameter information received can be quickly deserialized into the C++ class sequence of the C++ internal data structure, and the calculation result can be serialized into a JSON sequence for output. In this way, through the interaction with the call layer, the purpose of cloud computing is achieved.
[0078] In this embodiment, the interface layer uses functions such as start(), stop(), and progress() to implement functions such as starting, stopping, and progress reporting of the seismic acquisition algorithm through the SOCKET connection established with the algorithm layer.
[0079] In this embodiment, part of the pseudo-code for encapsulating the description method (description information) into a C++ class sequence is as follows:
[0080]
[0081]
[0082] In this embodiment, two core function examples of the JSON serialization tool are as follows:
[0083] std::string toJson();
[0084] Object* fromJson(std::string& jsonStr);
[0085] B14. Parse the result encapsulation file, obtain the result file storage path information, and download the calculation result based on the result file storage path information.
[0086] In this embodiment, after cloud computing ends, the algorithm layer uploads the calculation result file back to the interface layer. The interface layer stores the file type result file in the calculation result file into OBS, generates the output parameter information described in JSON based on the non-file type result file and the output file URL in the calculation result file, and uploads the generated output parameter information described in JSON back to the calling layer.
[0087] Figure 4 Another process schematic diagram of a method for deploying a seismic acquisition algorithm provided by an embodiment of the present invention. As Figure 4 shown, the method may include the following steps:
[0088] S401. Determine the seismic acquisition target algorithm for seismic acquisition data calculation in the calling layer, encapsulate the seismic acquisition target algorithm identifier into an http protocol message, and transmit it to the interface layer;
[0089] S402. The interface layer parses the http protocol message, encapsulates the obtained seismic acquisition target algorithm identifier into a socket protocol message, and transmits it to the algorithm layer;
[0090] S403. The algorithm layer parses the socket protocol message, obtains the corresponding description information according to the obtained seismic acquisition target algorithm identifier, generates information in the format of a Json string (Str), and transmits it to the interface layer;
[0091] S404. The interface layer transmits the information in JsonStr format to the calling layer;
[0092] S405. The calling layer generates a digital line graphic (DLG, Digital Line Graphic) according to the received information in JsonStr format;
[0093] S406. Generate a parameter passing file based on Json according to the user's editing in the digital line graphic;
[0094] S407. The calling layer converts the parameter passing file into character information with a parameterized JsonStr and transmits it to the interface layer;
[0095] S408. The interface layer transmits the received character information with a parameterized JsonStr to the algorithm layer;
[0096] S409. The algorithm layer parses the character information with a parameterized JsonStr, selects a seismic acquisition algorithm according to each seismic acquisition algorithm, assigns values to the selected seismic acquisition algorithm according to the parsed result, calculates the seismic acquisition data, and obtains the calculation result;
[0097] S410. Perform cloud storage on the calculation result;
[0098] S411. Convert the calculation result into a JSON string and output it to the interface layer;
[0099] S412. The interface layer transmits the JSON string to the calling layer;
[0100] S413. The calling layer generates a display interface based on the JSON string, and downloads the calculation result at the node corresponding to the node name in the storage path of the calculation result file name according to the storage path of the calculation result file name and the node name of the display interface.
[0101] In this embodiment, by dividing the deployed cloud structure into a calling layer, an interface layer, and an algorithm layer, the network function of cloud computing for data calculation is limited to the interface layer, the seismic acquisition algorithm is described to obtain an algorithm description, and the algorithm description includes: basic information of the algorithm and algorithm parameters; the calling layer constructs a user interaction interface according to the algorithm parameters and transfers the edited algorithm parameters between the calling layer and the interface layer; the interface layer establishes a long connection with the algorithm layer to transfer algorithm parameters and manage the operation of the algorithm. In this way, by establishing an interface layer between the calling layer and the algorithm layer and using the interface layer as a transfer layer for cloud computing, the interface layer interacts with the calling layer through the HTTP protocol and transmits algorithm parameters to the algorithm layer through the SOCKET protocol. The algorithm layer only needs to focus on the algorithm itself, and the interface layer only needs to focus on network-related technologies, so as to realize the rapid cloudification of existing algorithms such as C++ and C in local applications, with better algorithm cloudification efficiency and applicability, which can solve the problem of insufficient algorithm computing power and low operation efficiency of local devices. For the seismic acquisition algorithm, there is no need to re-develop the algorithm. On the basis of not modifying the basic data management and processing logic of the algorithm, only simple cloudification transformation of the input and output of the algorithm is required to realize the cloud deployment and processing of the seismic acquisition algorithm, greatly improving the cloudification efficiency of the algorithm and reducing the cloudification cost.
[0102] Based on the same inventive concept, as Figure 5 shown, an embodiment of the present invention further provides a device for deploying a seismic acquisition algorithm, and the device includes:
[0103] An algorithm deployment module 501, configured to deploy a seismic acquisition algorithm developed based on the C++ language or the C language on a cloud server;
[0104] An interface setting module 502, configured to set an interface layer between a local device and the cloud server based on a network development framework language, where the interface layer is used to parse data based on the network development framework language sent to the cloud server into data based on the C++ language or the C language on the cloud server side, and parse data based on the C++ language or the C language output by the cloud server into data based on the network development framework language on the cloud server side and transmit it to the local device;
[0105] A cloud computing module 503, configured to transmit the seismic acquisition data to be calculated in the local device and the target seismic acquisition algorithm for calculating the seismic acquisition data to be calculated to the cloud server by using the interface layer, and obtain the calculation result of the cloud server calculating the seismic acquisition data to be calculated according to the target seismic acquisition algorithm.
[0106] In this embodiment, as an alternative embodiment, the cloud computing module 503 includes:
[0107] An algorithm determination unit (not shown in the figure), configured to determine the storage path of the seismic acquisition data to be calculated in the local device and the target seismic acquisition algorithm for calculating the seismic acquisition data to be calculated;
[0108] A first transmission unit, configured to encapsulate the storage path and the target seismic acquisition algorithm by using the network development framework language and transmit them to the cloud server through the interface layer;
[0109] A parameter acquisition unit, configured to parse the storage path and the target seismic acquisition algorithm encapsulated by using the network development framework language to obtain the storage path and the target seismic acquisition algorithm;
[0110] A second transmission unit, configured to obtain the description information and parameter information of the target seismic acquisition algorithm in the cloud server, encapsulate the description information and parameter information by using the network development framework language to obtain an algorithm encapsulation file, and transmit the algorithm encapsulation file to the local device through the interface layer;
[0111] A third transmission unit, configured to parse the algorithm encapsulation file, edit the parsed parameter information, encapsulate the edited parameter information by using the network development framework language to generate parameter editing information, and transmit the parameter editing information to the cloud server through the interface layer;
[0112] An assignment unit, configured to parse the parameter editing information encapsulated by using the network development framework language to obtain the edited parameter information and assign the edited parameter information to the target seismic acquisition algorithm in the cloud server.
[0113] In this embodiment, as an alternative embodiment, the third transmission unit is specifically configured to:
[0114] Map the basic data type information in the edited parameter information to JSON key-value pair information;
[0115] For the non-basic data type information in the edited parameter information, upload the non-basic data type information to cloud storage, record the cloud storage location by using JSON to obtain JSON cloud storage location information;
[0116] Using the network development framework language, encapsulate the JSON key-value pair information and the JSON cloud storage location information to generate parameter editing information.
[0117] In this embodiment, as another optional embodiment, the cloud computing module 503 further includes:
[0118] A calculation unit, configured to start and assign the target seismic acquisition algorithm by the cloud server, read the seismic acquisition data to be calculated from the storage path for operation, and obtain a calculation result;
[0119] A storage unit, configured to store the calculation result and obtain the result file storage path information for storing the calculation result;
[0120] A fourth transmission unit, configured to encapsulate the result file storage path information by using the network development framework language to obtain a result encapsulation file, and transmit the result encapsulation file to the local device through the interface layer;
[0121] An analysis unit, configured to analyze the result encapsulation file, obtain the result file storage path information, and download the calculation result based on the result file storage path information.
[0122] In this embodiment, as an optional embodiment, the fourth transmission unit is specifically configured to:
[0123] Use the reflection mechanism of JAVA to serialize the calculation result represented by the C++ Object sequence into a JSON sequence, and encapsulate the JSON sequence to obtain the result encapsulation file.
[0124] In this embodiment, as an optional embodiment, the device further includes:
[0125] A scheduling module (not shown in the figure), configured to obtain the loads of each cloud server on which the target seismic acquisition algorithm is deployed; based on a load balancing policy, select a target cloud server, and transmit the seismic acquisition data to be calculated and the target seismic acquisition algorithm to the target cloud server.
[0126] In this embodiment, as an optional embodiment, the interface layer and the call layer are connected by a hypertext transfer protocol, and the interface layer and the algorithm layer are connected by a socket.
[0127] Based on the same inventive concept, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the fatigue detection method for driving training in any possible implementation manner described above are implemented.
[0128] Optionally, the storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0129] Based on the same inventive concept, refer to Figure 6 , an embodiment of the present invention further provides an electronic device, including a memory 101 (such as a non-volatile memory), a processor 102, and a computer program stored on the memory 101 and executable on the processor 102. When the processor 102 executes the program, it implements the steps of the fatigue detection method for driving training in any possible implementation manner described above, which is equivalent to the fatigue detection device for driving training as described above. Of course, the processor can also be used to process other data or perform operations. The electronic device may be a device such as a PC, a server, a terminal, etc.
[0130] As Figure 6 shown, the electronic device generally may further include: a memory 103, a network interface 104, and an internal bus 105. In addition to these components, other hardware may also be included, which will not be elaborated here.
[0131] It should be noted that the above-mentioned fatigue detection device for driving training can be implemented by software. As a logically meaningful device, it is formed by the processor 102 of the electronic device where it is located reading the computer program instructions stored in the non-volatile memory into the memory 103 and running them.
[0132] The embodiments of the subject matter and functional operations described in this specification can be implemented in the following: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more of them. The embodiments of the subject matter described in this specification can be implemented as one or more computer programs, that is, one or more modules in computer program instructions encoded on a tangible non-transitory program carrier to be executed by a data processing device or to control the operation of a data processing device. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal, such as a machine-generated electrical, optical, or electromagnetic signal, which is generated to encode information and transmit it to a suitable receiver device for execution by a data processing device. The computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
[0133] The processes and logical flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform the corresponding functions by operating on input data and generating output. The processes and logical flows can also be performed by, for example, FPGA (Field Programmable Gate Array) or ASIC (Application Specific Integrated Circuit) of special logic circuits, and the apparatus can also be implemented as special logic circuits.
[0134] Computers suitable for executing computer programs include, for example, general and / or special microprocessors, or any other type of central processing unit. Generally, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, etc., or the computer will be operatively coupled to such mass storage devices to receive data therefrom or transfer data thereto, or both. However, a computer is not necessarily required to have such devices. In addition, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name just a few.
[0135] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special logic circuits.
[0136] Although this specification contains many specific implementation details, these should not be construed as limiting the scope of any invention or the scope of what is claimed, but rather are mainly used to describe the features of specific embodiments of a particular invention. Certain features described in multiple embodiments in this specification can also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment can also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features can operate in certain combinations as described above and are even initially claimed as such, one or more features from the claimed combination can in some cases be removed from the combination, and the claimed combination can be directed to a sub-combination or a variation of a sub-combination.
[0137] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or performed sequentially, or that all illustrated operations be performed, to achieve desired results. In certain circumstances, multitasking and parallel processing may be advantageous.
[0138] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the particular order shown or sequential order to achieve the desired results.
[0139] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0140] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for deploying a seismic acquisition algorithm, characterized in that, Including: Deploy the seismic acquisition algorithm developed based on C++ or C language on the cloud server; Based on the web development framework language, set up the interface layer between the local device and the cloud server. The interface layer is used to parse the data based on the web development framework language sent to the cloud server into data based on C++ or C language on the cloud server side, and to parse the data based on C++ or C language output by the cloud server into data based on the web development framework language on the cloud server side and transmit it to the local device; Transmit the seismic acquisition data to be calculated in the local device and the target seismic acquisition algorithm for calculating the seismic acquisition data to be calculated to the cloud server through the interface layer, and obtain the calculation result of the seismic acquisition data to be calculated by the cloud server according to the target seismic acquisition algorithm.
2. The method according to claim 1, characterized in that, The step of transmitting the seismic acquisition data to be calculated in the local device and the target seismic acquisition algorithm for calculating the seismic acquisition data to be calculated to the cloud server through the interface layer includes: Determine the storage path of the seismic acquisition data to be calculated in the local device and the target seismic acquisition algorithm for calculating the seismic acquisition data to be calculated; Package the storage path and the target seismic acquisition algorithm using the web development framework language and transmit them to the cloud server through the interface layer; Parse the storage path and the target seismic acquisition algorithm packaged using the web development framework language to obtain the storage path and the target seismic acquisition algorithm; Obtain the description information and parameter information of the target seismic acquisition algorithm in the cloud server, package the description information and parameter information using the web development framework language to obtain an algorithm package file, and transmit it to the local device through the interface layer; Parse the algorithm package file, edit the parsed parameter information, package the generated parameter editing information using the web development framework language, and transmit it to the cloud server through the interface layer; Parse the parameter editing information packaged using the web development framework language to obtain the edited parameter information, and assign values to the target seismic acquisition algorithm in the cloud server.
3. The method according to claim 2, characterized in that, The step of packaging the generated parameter editing information using the web development framework language includes: Map the basic data type information in the edited parameter information to JSON key-value pair information; For the non-basic data type information in the edited parameter information, upload the non-basic data type information to cloud storage, and use JSON to record the cloud storage location to obtain JSON cloud storage location information; Package the JSON key-value pair information and the JSON cloud storage location information using the web development framework language to generate parameter editing information.
4. The method according to claim 2, characterized in that, The step of obtaining the calculation result of the seismic acquisition data to be calculated by the cloud server according to the target seismic acquisition algorithm includes: The cloud server starts the assigned target seismic acquisition algorithm, reads the seismic acquisition data to be calculated from the storage path for operation, and obtains the calculation result; Stores the calculation result, and obtains the result file storage path information for storing the calculation result; Encapsulates the result file storage path information using the network development framework language to obtain a result encapsulation file, and transmits it to the local device through the interface layer; Parses the result encapsulation file, obtains the result file storage path information, and downloads the calculation result based on the result file storage path information.
5. The method according to claim 4, characterized in that, The encapsulating the result file storage path information using the network development framework language to obtain a result encapsulation file includes: Using the reflection mechanism of JAVA, serializes the calculation result represented by the C++ Object sequence into a JSON sequence, and encapsulates the JSON sequence to obtain the result encapsulation file.
6. The method according to any one of claims 1 to 5, characterized in that, Before transmitting to the cloud server using the interface layer, the method further includes: Obtaining the loads of each cloud server on which the target seismic acquisition algorithm is deployed; Based on the load balancing strategy, selecting a target cloud server, and transmitting the seismic acquisition data to be calculated and the target seismic acquisition algorithm to the target cloud server.
7. The method according to any one of claims 1 to 5, characterized in that, The interface layer and the call layer are connected by the Hypertext Transfer Protocol, and the interface layer and the algorithm layer are connected by a socket.
8. A device for deploying a seismic acquisition algorithm, characterized in that, The device for deploying the seismic acquisition algorithm includes: An algorithm deployment module for deploying a seismic acquisition algorithm developed based on C++ language or C language on a cloud server; An interface setting module for setting an interface layer between the local device and the cloud server based on the network development framework language. The interface layer is used to parse the data based on the network development framework language sent to the cloud server into data based on C++ language or C language on the cloud server side, and to parse the data based on C++ language or C language output by the cloud server into data based on the network development framework language on the cloud server side and transmit it to the local device; A cloud computing module for transmitting the seismic acquisition data to be calculated in the local device and the target seismic acquisition algorithm for calculating the seismic acquisition data to be calculated to the cloud server using the interface layer, and obtaining the calculation result of the cloud server calculating the seismic acquisition data to be calculated according to the target seismic acquisition algorithm.
9. A storage medium, characterized in that, A program or instruction is stored on a storage medium, and when the program or instruction is run by a processor, the steps of the method for deploying a seismic acquisition algorithm according to any one of claims 1 to 7 are implemented.
10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, the steps of the method for deploying a seismic acquisition algorithm according to any one of claims 1 to 7 are implemented.
