CN109862072B - Application task response method and device - Google Patents

Application task response method and device Download PDF

Info

Publication number
CN109862072B
CN109862072B CN201811592654.2A CN201811592654A CN109862072B CN 109862072 B CN109862072 B CN 109862072B CN 201811592654 A CN201811592654 A CN 201811592654A CN 109862072 B CN109862072 B CN 109862072B
Authority
CN
China
Prior art keywords
task
application
terminal
data
application task
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
CN201811592654.2A
Other languages
Chinese (zh)
Other versions
CN109862072A (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.)
Dingxin Information Technology Co Ltd
Original Assignee
Dingxin Information Technology 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 Dingxin Information Technology Co Ltd filed Critical Dingxin Information Technology Co Ltd
Priority to CN201811592654.2A priority Critical patent/CN109862072B/en
Publication of CN109862072A publication Critical patent/CN109862072A/en
Application granted granted Critical
Publication of CN109862072B publication Critical patent/CN109862072B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to a response method and device for an application task, computer equipment and a computer storage medium. The response method of the application task comprises the following steps: receiving an application task sent by an external device, and detecting whether the application task carries a communication authority identifier; if the application task carries the communication authority identification, converting the application task into a task message which can be identified by the terminal, and sending the task message to a task pool; and sending the task message cached in the task pool to the terminal, receiving response data fed back by the terminal, and returning the response data to the external equipment. The invention enables the application task sent by the external equipment to be timely corresponding, and improves the response effect aiming at the application task from the external equipment.

Description

Application task response method and device
Technical Field
The present invention relates to the field of power technologies, and in particular, to a method and an apparatus for responding to an application task, a computer device, and a computer storage medium.
Background
The metering automation system of the power system comprises various electric energy meters, a mass terminal, a relevant main station and the like, and can provide collected metering data such as electric energy data and the like for external equipment such as a marketing system or a mass system. When a metering automation system of an electric power system provides relevant metering data to an external device and accesses the external device to perform operations such as system upgrade, it is necessary to respond to an application task sent by the external device in time to complete a corresponding operation, specifically, the external device needs to communicate with devices such as a plurality of terminals of the metering automation system, so that the terminals of the metering automation system respond to the corresponding application task.
Disclosure of Invention
Based on this, it is necessary to provide a response method and apparatus for an application task, a computer device, and a computer storage medium, for solving the technical problem that the response effect of a metering automation system for the application task sent by an external device is poor due to the conventional scheme.
A response method for an application task, comprising:
receiving an application task sent by an external device, and detecting whether the application task carries a communication authority identifier;
if the application task carries the communication authority identification, the application task is converted into a task message which can be identified by the terminal, and the task message is issued to a task pool;
and sending the task message cached in the task pool to the terminal, receiving response data fed back by the terminal, and returning the response data to the external equipment.
In one embodiment, after receiving an application task sent by an external device and detecting whether the application task carries a communication authority identifier, the method further includes:
and if the application task does not carry the communication authority identification, outputting prompt information for applying the communication authority.
As an embodiment, after outputting the prompt information for applying the communication right if the application task does not carry the communication right identifier, the method further includes:
and after the communication authority application of the application task passes, adding a communication authority identifier to the application task in the external equipment.
In one embodiment, after the task packet cached in the task pool is sent to the terminal, the method includes:
the terminal receives the task message, reads task configuration information of the task message, performs data acquisition according to the task configuration information to obtain response data, and sends the response data to the master station.
As an embodiment, the sending the response data to the primary station includes:
and analyzing the response data into a data plaintext with a set format, and sending the data plaintext to the master station.
In one embodiment, the application task includes a task type;
converting the application task into a task message which can be identified by the terminal, comprising the following steps:
and identifying the terminal associated with the task type to obtain a target terminal, and converting the application task into a task message which can be identified by the target terminal.
A task-applying response device comprising: locate the receiving module, conversion module and the module of sending down of main website:
the receiving module is used for receiving an application task sent by external equipment and detecting whether the application task carries a communication authority identifier;
the conversion module is used for converting the application task into a task message which can be identified by the terminal if the application task carries the communication authority identification, and sending the task message to the task pool;
the issuing module is used for issuing the task message cached in the task pool to the terminal, receiving response data fed back by the terminal and returning the response data to the external equipment.
In an embodiment, the response device for requesting for the task further includes an output module disposed at the master station:
and the output module is used for outputting prompt information for applying the communication authority if the application task does not carry the communication authority identification.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a response method for an application task provided by any of the above embodiments when executing the computer program.
A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the method of responding to an application task provided by any of the above embodiments.
In the response method, the device, the computer equipment and the computer storage medium for applying for the task, when the master station of the metering automation system receives the application task sent by the external equipment, can detect whether the application task carries the communication authority identification, if the application task carries the communication authority identification, the application task is converted into a task message which can be identified by the terminal, the task message is issued to a task pool, and the task message cached in the task pool is sent to the terminal, so that the terminal responds to the task message and feeds back response data to the master station, then the master station can receive the response data fed back by the terminal, return the response data to the external device, the application tasks sent by the external equipment can be responded in time, and the response effect of the application tasks from the external equipment is improved.
Drawings
FIG. 1 is a flow diagram of a response method for an application task according to one embodiment;
FIG. 2 is a schematic diagram of a response device for an application task according to an embodiment;
FIG. 3 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the detailed description and specific examples, while indicating the scope of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
It should be noted that the terms "first \ second \ third" related to the embodiments of the present invention only distinguish similar objects, and do not represent a specific ordering for the objects, and it should be understood that "first \ second \ third" may exchange a specific order or sequence when allowed. It should be understood that the terms first, second, and third, as used herein, are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or otherwise described herein.
The terms "comprises" and "comprising," and any variations thereof, of embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, product, or device.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Referring to fig. 1, fig. 1 is a flowchart of a response method of an application task according to an embodiment, including:
s10, receiving an application task sent by an external device, and detecting whether the application task carries a communication authority identifier;
the external devices may include external systems such as an external upgrading system, a marketing system, and a mass system that need to communicate with the metering automation system, and may also include other smart devices that need to communicate with the metering automation system. The external device needs to configure a communication interface which accords with an interface specification defined by the metering automation system, and sends an application task to the metering automation system through the communication interface. The application task can comprise a task type and a communication authority identifier which indicates whether the external device sending the application task has the communication authority, so that the metering automation system can detect whether the communication authority identifier carries the communication authority identifier and communicate with the corresponding external device according to the detection result. The task types can include types of electric energy data acquisition and/or system upgrading and the like, and the metering automation system can determine the terminal related to the corresponding application task according to the task types so as to control the corresponding terminal to respond to the application task.
S20, if the application task carries the communication authority identification, the application task is converted into a task message which can be identified by the terminal, and the task message is issued to a task pool;
if the application task carries the communication authority identification, the external device sending the application task is indicated to be a safety device, the application task sent by the external device is an application task subjected to relevant approval, and the metering automation system needs to respond in time. The task pool refers to a cache queue for caching various tasks issued by the master station of the metering automation system.
Specifically, the master station of the metering automation system may perform multi-protocol adaptation for the application task, and convert the application task into a task packet that can be identified by the terminal associated with the application task, so that the terminal can smoothly read the task packet.
And S30, sending the task message cached in the task pool to the terminal, receiving response data fed back by the terminal, and returning the response data to the external device.
The terminal receives the task message, specifically can read task configuration information of the task message, performs data acquisition according to the task configuration information to obtain response data, and sends the response data to the master station, so that the master station can respond to an application task of an external device in time.
In this embodiment, when receiving the application task that external device sent, the master station of measurement automation system can detect whether the application task carries communication authority identification, if the application task carries communication authority identification, just will the application task converts the task into the task message that can be identified by the terminal, issues the task message to the task pool, and will the task message of task pool buffer memory issues to the terminal, makes the terminal respond to above-mentioned task message and feeds back the response data of response to the master station, and at this moment the master station alright with the response data that receives the terminal feedback, returns the response data to external device to the application task that the response external device sent, makes the application task that external device sent can obtain in time corresponding, has improved the response effect to the application task that comes from external device.
In one embodiment, after receiving an application task sent by an external device and detecting whether the application task carries a communication authority identifier, the method further includes:
and if the application task does not carry the communication authority identification, outputting prompt information for applying the communication authority.
In this embodiment, if the master station of the metering automation system does not detect the communication permission identifier in the application task, the master station outputs the prompt information for applying the communication permission, so that the external device applies the communication permission of the corresponding application task, and the smooth proceeding of the applied task is ensured.
As an embodiment, after outputting the prompt information for applying the communication right if the application task does not carry the communication right identifier, the method further includes:
and after the communication authority application of the application task passes, adding a communication authority identifier to the application task in the external equipment.
Specifically, specific contents such as a task type corresponding to the application task can be manually approved to identify whether the application task is the application task corresponding to the metering automation system, and if the application task is the application task corresponding to the metering automation system, a communication permission identifier can be added to the application task in an external device, so that the application task carries the communication permission identifier, and thus, when a master station of the metering automation system receives the application task, the master station can correspondingly detect the communication permission identifier.
In one embodiment, after the task packet cached in the task pool is sent to the terminal, the method includes:
the terminal receives the task message, reads task configuration information of the task message, performs data acquisition according to the task configuration information to obtain response data, and sends the response data to the master station.
In this embodiment, the terminal may read task configuration information of the task packet, perform data acquisition according to the task configuration information, obtain response data, and send the response data to the master station, so that the master station responds to the corresponding application task.
As one embodiment, the transmitting the response data to the primary station includes:
and analyzing the response data into a data plaintext with a set format, and sending the data plaintext to the master station.
The setting format can be set according to format characteristics that can be recognized by the terminal, such as a json plaintext format.
In this embodiment, the terminal can interpret the response data through a multiple-protocol rule to generate a data plaintext with a set format, and send the data plaintext to the master station, so that the master station can feed back the data plaintext to the corresponding external device, and the external device does not need to perform analysis processing according to the terminal protocol associated with the application task after receiving the data plaintext, and can directly read the required content from the data plaintext.
In one embodiment, the application task includes a task type;
converting the application task into a task message which can be identified by the terminal, comprising the following steps:
and identifying the terminal associated with the task type to obtain a target terminal, and converting the application task into a task message which can be identified by the target terminal.
The task type may include types of electric energy data acquisition and/or system upgrade, and the master station of the metering automation system may determine a terminal associated with a corresponding application task according to the task type, for example, if the task type is electric energy data acquisition, the master station of the metering automation system may determine a terminal capable of providing electric energy data as the terminal associated with the task type, and determine the terminal associated with the task type as a target terminal, so as to convert the application task into a task packet (i.e., a protocol packet corresponding to the target terminal) that can be recognized by the target terminal, so that a subsequent target terminal may smoothly read the task packet.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a response device for requesting a task according to an embodiment, and the response device includes a receiving module 10, a converting module 20, and a sending module 30, which are disposed at a master station:
the receiving module 10 is configured to receive an application task sent by an external device, and detect whether the application task carries a communication permission identifier;
the conversion module 20 is configured to convert the application task into a task message that can be recognized by the terminal if the application task carries the communication permission identifier, and issue the task message to a task pool;
the issuing module 30 is configured to issue the task packet cached in the task pool to the terminal, receive response data fed back by the terminal, and return the response data to the external device.
In an embodiment, the response device for requesting for the task further includes an output module disposed at the master station:
and the output module is used for outputting prompt information for applying the communication authority if the application task does not carry the communication authority identification.
As an embodiment, the response device of the above application task further includes an adding module disposed in the external device:
the adding module is used for adding the communication authority identification to the application task after the communication authority application of the application task passes.
In an embodiment, the response device for the application task further includes a sending module disposed at the terminal:
the sending module is used for receiving the task message, reading task configuration information of the task message, collecting data according to the task configuration information to obtain response data, and sending the response data to the master station.
As an embodiment, the sending module is further configured to:
and analyzing the response data into a data plaintext with a set format, and sending the data plaintext to the master station.
In one embodiment, the application task includes a task type;
the conversion module is further configured to:
and identifying the terminal associated with the task type to obtain a target terminal, and converting the application task into a task message which can be identified by the target terminal.
For the specific limitations of the response device of the application task, reference may be made to the above limitations of the response method of the application task, which are not described herein again. The various modules in the responding device of the above-mentioned application task may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing relevant messages and/or response data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a response method for an application task.
Those skilled in the art will appreciate that the architecture shown in fig. 3 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Based on the examples described above, there is also provided in one embodiment a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements the response method for any one of the application tasks in the embodiments described above.
According to the computer equipment, the response effect of the application task from the external equipment is improved through the computer program running on the processor.
It will be understood by those skilled in the art that all or part of the processes in the methods of the embodiments described above may be implemented by a computer program, which is stored in a non-volatile computer readable storage medium, and executed by at least one processor in a computer system, to implement the processes of the embodiments including the response method of the above-mentioned application task. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Accordingly, in an embodiment, a computer storage medium is also provided, on which a computer program is stored, wherein the program, when executed by a processor, implements the response method for the application task as in any one of the above embodiments.
The computer storage medium can enable the application task sent by the external equipment to be timely corresponding through the stored computer program, and improves the response effect of the application task from the external equipment.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A response method for a requested task, comprising:
receiving an application task sent by an external device, and detecting whether the application task carries a communication authority identifier;
if the application task carries the communication authority identification, determining that the external equipment is safety equipment, converting the application task into a task message which can be identified by a terminal, and issuing the task message to a task pool;
the task message cached in the task pool is sent to the terminal, response data fed back by the terminal is received, and a data plaintext of the response data is returned to the external equipment; the data plaintext is a data plaintext with a set format generated after the terminal performs data interpretation on the response data through a multi-protocol rule;
and if the application task does not carry the communication authority identification, outputting prompt information of the application communication authority until the communication authority of the application task passes the application, and adding the communication authority identification to the application task in the external equipment.
2. The method according to claim 1, wherein after the task packet buffered in the task pool is sent to the terminal, the method comprises:
and the terminal receives the task message, reads task configuration information of the task message, acquires data according to the task configuration information to obtain response data, and sends the response data to the master station.
3. The method of claim 2, wherein the sending the response data to the primary station comprises:
and analyzing the response data into a data plaintext with a set format, and sending the data plaintext to the master station.
4. A response method for applying for a task according to any one of claims 1 to 3, wherein the application task includes a task type;
the converting the application task into a task message which can be identified by the terminal comprises the following steps:
and identifying the terminal associated with the task type to obtain a target terminal, and converting the application task into a task message which can be identified by the target terminal.
5. The response device for applying for the task is characterized by comprising a receiving module, a conversion module, a sending module and an adding module which are arranged on a main station:
the receiving module is used for receiving an application task sent by an external device and detecting whether the application task carries a communication authority identifier;
the conversion module is used for determining the external equipment as safety equipment if the application task carries the communication authority identification, converting the application task into a task message which can be identified by a terminal and issuing the task message to a task pool;
the issuing module is used for issuing the task message cached in the task pool to the terminal, receiving response data fed back by the terminal and returning the data plaintext of the response data to the external equipment; the data plaintext is a data plaintext with a set format generated after the terminal performs data interpretation on the response data through a multi-protocol rule;
and the adding module is used for outputting prompt information for applying the communication authority if the application task does not carry the communication authority identification until the communication authority of the application task passes the application, and adding the communication authority identification to the application task in the external equipment.
6. The apparatus for responding to a request for a task according to claim 5, further comprising a sending module provided in the terminal:
the sending module is used for receiving the task message, reading task configuration information of the task message, performing data acquisition according to the task configuration information to obtain the response data, and sending the response data to the master station.
7. The task application response device of claim 6, wherein the sending module is further configured to parse the response data into a data plaintext with a set format, and send the data plaintext to the primary station.
8. A task-requesting response unit according to any of claims 5-7, wherein said task-requesting includes a task type; the conversion module is also used for identifying the terminal associated with the task type to obtain a target terminal, and converting the application task into a task message which can be identified by the target terminal.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements a response method to an application task according to any one of claims 1 to 4 when executing the computer program.
10. A computer storage medium on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out a method of responding to an application task according to any one of claims 1 to 4.
CN201811592654.2A 2018-12-25 2018-12-25 Application task response method and device Active CN109862072B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811592654.2A CN109862072B (en) 2018-12-25 2018-12-25 Application task response method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811592654.2A CN109862072B (en) 2018-12-25 2018-12-25 Application task response method and device

Publications (2)

Publication Number Publication Date
CN109862072A CN109862072A (en) 2019-06-07
CN109862072B true CN109862072B (en) 2020-03-31

Family

ID=66892418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811592654.2A Active CN109862072B (en) 2018-12-25 2018-12-25 Application task response method and device

Country Status (1)

Country Link
CN (1) CN109862072B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280367A (en) * 2018-01-22 2018-07-13 腾讯科技(深圳)有限公司 Management method, device, computing device and the storage medium of data manipulation permission
CN108446172A (en) * 2018-02-26 2018-08-24 平安普惠企业管理有限公司 Data transfer method, apparatus, computer equipment and storage medium
CN109033123A (en) * 2018-05-31 2018-12-18 康键信息技术(深圳)有限公司 Querying method, device, computer equipment and storage medium based on big data
CN109034720A (en) * 2018-06-08 2018-12-18 山东电力调度控制中心 A kind of mobile oa platform and device suitable for power scheduling service management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280367A (en) * 2018-01-22 2018-07-13 腾讯科技(深圳)有限公司 Management method, device, computing device and the storage medium of data manipulation permission
CN108446172A (en) * 2018-02-26 2018-08-24 平安普惠企业管理有限公司 Data transfer method, apparatus, computer equipment and storage medium
CN109033123A (en) * 2018-05-31 2018-12-18 康键信息技术(深圳)有限公司 Querying method, device, computer equipment and storage medium based on big data
CN109034720A (en) * 2018-06-08 2018-12-18 山东电力调度控制中心 A kind of mobile oa platform and device suitable for power scheduling service management

Also Published As

Publication number Publication date
CN109862072A (en) 2019-06-07

Similar Documents

Publication Publication Date Title
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
CN107844421B (en) Interface testing method and device, computer equipment and storage medium
CN111540190B (en) Data distribution method and device based on double-core intelligent electric meter and computer equipment
CN108833510B (en) Message processing method and device
CN107528818B (en) Data processing method and device for media file
CN109669787B (en) Data transmission method and device, storage medium and electronic equipment
CN112448969A (en) Link tracking method, device, system, equipment and readable storage medium
CN105490917A (en) Sharing method and device in application
CN107861765B (en) Product configuration method, apparatus, and computer-readable storage medium
CN108600377A (en) A kind of pause method of file download, device, terminal and storage medium
CN106454403B (en) Data display method, equipment and system
CN113961836A (en) Page jump method and device, electronic equipment and storage medium
CN114257640A (en) Cloud computing scheduling method and system
CN109862072B (en) Application task response method and device
CN109286689B (en) Information sending method and device and vehicle-mounted man-vehicle interaction terminal
CN112950447B (en) Resource scheduling method, device, server and storage medium
CN114201701B (en) Method and device for identifying operating environment, storage medium, server and client
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN107025294B (en) Information acquisition method and device
CN111131369B (en) APP use condition transmission method and device, electronic equipment and storage medium
CN112084445B (en) Information processing system, method, apparatus, and storage medium
CN109842620B (en) Service publishing method and device
CN108920589B (en) Browsing hijacking identification method, device, server and storage medium
CN112187561A (en) Communication module testing method, device, computer equipment and storage medium
CN116599917B (en) Network port determining method, device, equipment and storage medium

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